|
Subject: Re: XSL and entities From: James Clark <jjc@xxxxxxxxxx> Date: Mon, 21 Sep 1998 11:56:37 +0700 |
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
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: XSL and entities, Paul Prescod | Thread | RE: XSL and entities, Ed Nixon |
| Re: XSL Trans, Paul Prescod | Date | Re: XSL and entities, James Clark |
| Month |