This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Re: Displaying document( ) output within CDATA
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Re: Displaying document( ) output within CDATA
- From: "Chris Bayes" <Chris at Bayes dot co dot uk>
- Date: Thu, 28 Jun 2001 11:58:56 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
Mark,
I have a submission at exslt that will do this for you if you are using
msxml. It isn't up yet but I can let you have a preview copy if you want to
test it out.
Ciao Chris
XML/XSL Portal
http://www.bayes.co.uk/xml
>-----Original Message-----
>From: owner-xsl-list@lists.mulberrytech.com
>[mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Mark Miller
>Sent: 28 June 2001 11:43
>To: xsl-list@lists.mulberrytech.com
>Subject: [xsl] Re: Displaying document( ) output 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
>
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list