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

Displaying document( ) output within CDATA

Subject: Displaying document( ) output within CDATA
From: Mark Miller <storefront2000@xxxxxxxxx>
Date: Wed, 27 Jun 2001 21:05:17 -0700 (PDT)
output in cdata
Greetings,

I am creating a stylesheet for tutorials. Code is
displayed as part of each tutorial page. I would like
to insert the actual code using the document()
function so I won't have to cut and paste the
examples. 

I have not been able to figure out a way to include
the code that is output from the document() function
within a CDATA section.

This template accesses the code file I want to insert
as the example code. Because it is not within a CDATA
section, it is parsed and the output is shown instead
of the raw code.

<xsl:template match="preformatted">

<xsl:variable name="codeSample" 
     select="document(following::link[2]/@xslInput)"/>

<div style="text-align:center;">Code Sample</div>
   <pre>
      <xsl:value-of select="$codeSample"/>
   </pre>
</div>
</xsl:template>


Any suggestions on how to insert code from an external
file into a CDATA section would be appreciated.

Thanks,
Mark





__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

 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.