|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSL and entities
Philippe Le Hégaret wrote:
> Here is an example of this element:
>
> <code>
> <!ELEMENT paragraph (#PCDATA)*>
>
> <!ELEMENT item (paragraph)+>
>
> <!ELEMENT list (item)+>
> <!ATTLIST list
> type (ordered|unordered) "unordered">
> </code>
>
> Now, I want to transform this document in LaTeX,
> and HTML.
> html.xsl:
> <xsl:template match='code'>
> <pre>
> <xsl:process-children/>
> </pre>
> </xsl:template>
>
> The problem appears during the HTML transformation.
> It produces this result :
> <pre>
> <!ELEMENT paragraph (#PCDATA)*>
>
> <!ELEMENT item (paragraph)+>
>
> <!ELEMENT list (item)+>
> <!ATTLIST list
> type (ordered|unordered) "unordered">
> </pre>
This is a bug in your XSL processor. It should produce
<pre>
<!ELEMENT paragraph (#PCDATA)*>
<!ELEMENT item (paragraph)+>
<!ELEMENT list (item)+>
<!ATTLIST list
type (ordered|unordered) "unordered">
</pre>
or something equivalent.
Here's the relevant part of the XSL WD:
Processing a character in the source tree adds the character to the
result tree. Note that this works at the tree level. Thus,
markup of < in content will be represented by a character < in the
source tree which will, with the built-in template rules,
turn into a < character in the result tree, which would be represented
by the markup < (or an equivalent character
reference) when the result tree is externalized as an XML document.
James
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








