Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

XML::XSLT should just ignore the fo stuff, though that isn't being tested.

But yes you have uncovered a bug in a code path which wasn't being tested. Basically the problem is with an outer <xsl:variable /> declaration where there is a literal value (like you have there) rather than supplied with a value attribute. It needs to create a document fragment to store the results of evaluating the literal value and createDocumentFragment() needs to be called as a method of the XML::DOM::Document object, but as the top level variables are evaluated on the first parse of the XSL document there isn't an XML::DOM::Document yet :-(.

The bottom line is that whilst your example above could quite happily be expressed as:

<xsl:variable name="TextFontSize" value="10" />
I can't promise a quick fix that does the right thing as surprisingly it's going to require quite a large change, You might want to check out the version in CVS but that cheats with the document fragment and elicits a warning from XML::DOM and also doesn't respect any XML in the variable value but YMMV. Caveat Emptor etc etc.

But I have a test for this now so it will get fixed eventually

Thanks for the bug report, sorry I can't help you straight away.

/J\


In reply to Re^7: XML::XSLT problem by gellyfish
in thread XML::XSLT problem by artist

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-03-28 23:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found