This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Displaying document( ) output within CDATA
- To: storefront2000 at yahoo dot com
- Subject: [xsl] Re: Displaying document( ) output within CDATA
- From: Dimitre Novatchev <dnovatchev at yahoo dot com>
- Date: Thu, 28 Jun 2001 11:30:06 -0700 (PDT)
- Cc: xsl-list at lists dot mulberrytech dot com
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi Mark,
> 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.
This is my second attempt -- obviously a nice solution if you are using IE:
xml source:
----------
<examples>
<example>
<codeReference href="identity.xsl"/>
</example>
</examples>
Stylesheet:
----------
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="codeReference">
<IFRAME id="xmlFrame" name="xmlFrame" align="center" width="80%" height="70%"
src="{@href}"/>
</xsl:template>
</xsl:stylesheet>
Result:
------
<html>
<body>
<IFRAME id="xmlFrame" name="xmlFrame" align="center" width="80%" height="70%"
src="identity.xsl"></IFRAME>
</body>
</html>
IE displays:
-----------
A nice outline style of "identity.xsl" -- using its default stylesheet.
And of course -- Mike Kay was right, the file is not accessed at all by "our"
stylesheet.
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