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

XSL and entities

Subject: XSL and entities
From: "Philippe Le Hégaret" <Philippe.Le_Hegaret@xxxxxxxxxxxxxxx>
Date: Fri, 18 Sep 1998 14:18:33 +0200
latex kangas
I'm currently working on an XML report. I use
my own DTD. To show an example, I introduced
the element 'code':
<!ELEMENT code (#PCDATA)*>
<!ATTLIST code
    %book.generalAttr;>

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.

latex.xsl:
    <xsl:template match='code'>
      <xsl:text>\begin{center}\scriptsize
                \begin{verbatim}</xsl:text>
      <xsl:process-children/>
      <xsl:text>\end{verbatim}
                \end{center}</xsl:text>
    </xsl:template>

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 incorrect. If I put &amp;lt; , the LaTeX output
will be incorrect.

  Is there a XSL solution to do this ?

Philippe.


 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.