[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] [CDATA section] To preserve boundaries after XSL tran
Hi all I'm trying to transform an XML node (see APPENDIX) preserving any CDATA section may be encountered. I don't want to output *all* the elements marked with the same expanded-name, wrapping them inside CDATA sections as performed by the xsl:output.cdata-section-elements attribute behavior ([1], chapter 16, 16.1): I just want that *any* input element with a preexisting CDATA section is put out unchanged, that is with its damn CDATA section boundaries! Any suggestion? Thanks Stefano REFERENCES [1] XSL Transformations (XSLT) Version 1.0, http://www.w3.org/TR/1999/REC-xslt-19991116 APPENDIX CDATA attempt I've tried to transform the following "fields" element node via MSXML 4.0 (note the CDATA section inside the field element): <documents xmlns="http://www.aaa.it/cns/xdmModel"> [...] <page template="OFF001.pdf"> <fields> <field name="OF1001"><![CDATA[UNITA' OPERATIVA DI BRESCIA]]></field> [...] </fields> </page> [...] </documents> using this XSLT: <xsl:template match="xdm:fields"> <form src="{../@template}"> <xsl:apply-templates/> </form> </xsl:template> [...] <xsl:template match="xdm:field[@name='OF1001']"> <label x="52" y="0" width="11"> <xsl:value-of select="."/> </label> </xsl:template> but (obviously) the result has lost my precious CDATA boundaries... <form src="OFF001.pdf"> <text x="52" y="0" width="11">UNITA' OPERATIVA DI BRESCIA</text> [...] </form>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|