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

Emulating <xsl:copy-of> with MSXML (was : Passing parameters

Subject: Emulating <xsl:copy-of> with MSXML (was : Passing parameters to XSL...)
From: BOUCHET Sébastien <sebastien.bouchet@xxxxxxx>
Date: Wed, 29 Sep 1999 11:40:10 +0200
msxml xsl parameter
Title: Emulating <xsl:copy-of> with MSXML (was : Passing parameters to XSL...)

Chuck white wrote :
>Valid MS XSL elements are:
>xsl:stylesheet, xsl:attribute,  xsl:choose, xsl:comment, xsl:copy, xsl:element, xsl:for-each,  >xsl:if, xsl:eval,  xsl:otherwise,  xsl:pi (xsl:processing-instruction in current draft),  xsl:script  >(for global variables and extensions),  xsl:stylesheet, xsl:template,  xsl:value-of, xsl:when

Aargh, it means that <xsl:copy-of> is not supported ! What I'm trying to do is something like XSL code generation (workaround for the absence of support of <xsl:param>... :

<Template><![CDATA[<xsl:stylesheet><xsl:template match="]]><Parameter/><!CDATA[[<xsl...]]></Template>

is transformed with something like :

<xsl:template match="text()"><xsl:copy-of select="."/></xsl:template>
<xsl:template match="Parameter">My value<xsl:apply-templates/></xsl:template>

which, I thought, would output :
<xsl:stylesheet xmlns="...">... blah ...</xsl:stylesheet> that I could re-feed the processor with.

Actually, it works BUT escapes the "<,>" and what I feed the processor with is then :
&lt;xsl:stylesheet&gt; ... Which of course is not understood

This is apparently the right beahviour (see the XSL specs : xsl:value-of converts to strings). Therefore xsl:copy-of would fulfill my needs, but it is not implemented in MSXML.

I tried using <xsl:copy> instead of <xsl:value-of> but then the <![CDATA[ and ]]> are not stripped.

Has anyone got any ideas ?

Cheers,

Sebastien

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.