[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSL and entities

Subject: Re: XSL and entities
From: James Clark <jjc@xxxxxxxxxx>
Date: Mon, 21 Sep 1998 11:56:37 +0700
lt list of entities
Philippe Le Hégaret wrote:

> Here is an example of this element:
> 
> <code>
> &lt;!ELEMENT paragraph (#PCDATA)*>
> 
> &lt;!ELEMENT item (paragraph)+>
> 
> &lt;!ELEMENT list (item)+>
> &lt;!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>
&lt;!ELEMENT paragraph (#PCDATA)*>

&lt;!ELEMENT item (paragraph)+>

&lt;!ELEMENT list (item)+>
&lt;!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 &lt; 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 &lt; (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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.