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

Re: Displaying document( ) output within CDATA

Subject: Re: Displaying document( ) output within CDATA
From: Mark Miller <storefront2000@xxxxxxxxx>
Date: Thu, 28 Jun 2001 03:43:08 -0700 (PDT)
codes within cdata
Dimitre,

You are correct that I should be using 'copy-of'
instead of 'value-of' to get a copy of the desired
document. However, this does not solve the original
problem.

I want to display the literal code on the page, not
the results of the code. I am able to do this by
cutting and pasting the code into a CDATA section, but
I'd prefer to do it by generating the example code
dynamically from an external file.

Rephrasing the question, "How can I output literal
code, not the results of the code, into HTML when the
code is stored in an eternal file?"

Mark

> Putting the code into a CDATA section is not the
> best decision and does not allways
> work -- e.g. what if the example code has its own
> CDATA???
> 
> And the reason for the specific problem you describe
> lies in the following:
> 
> >    <pre>
> >       <xsl:value-of select="$codeSample"/>
> >    </pre>
> 
> In case you use xsl:copy-of, all nodes of
> $codeSample will be properly copied into
> the "pre" element. 
> 
> Therefore use:
> 
>     <pre>
>        <xsl:copy-of select="$codeSample"/>
>     </pre>
> 
> 
> Hope this helped.
> 
> Cheers,
> Dimitre Novatchev.
> 


__________________________________________________
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.