Subject: Re: [xsl] Removing namespaces without escaping CDATA??? From: Abel Braaksma <abel.online@xxxxxxxxx> Date: Mon, 09 Apr 2007 21:34:16 +0200 |
On 4/9/07, G. Ken Holman <gkholman@xxxxxxxxxxxxxxxxxxxx> wrote:No ... remember that the emitted result tree cannot be addressed in any fashion and the distinction between the different contexts of "y" in the result tree is, effectively, trying to address the result tree to know "where am I now in the result tree?" in order to selectively apply the serialization rule.
Note in XSLT 2.0 Section 20 and XSLT 1.0 Section 16 that the data
type of the cdata-section-elements is just a white-space-separated
list of QNames ... there is no opportunity to specify context for each one.
When I said, I want CDATA section to appear at location /x/p/q/y, my intention was to specify the location (using a syntax which is familiar). You rightly said, result tree cannot be addressed. I am aware of this fact.
For somebody, CDATA section could be useful at location /x/p/q/y, and not at location /x/y. But this cannot be achieved, with current syntax <xsl:output cdata-section-elements="qnames" />.
I suggested an improvement to the xsl:element instruction, with <xsl:element name="qname" cdata-section="yes | no" .. As Mike said, this is architecturally bad from XSLT processor design point of view (but is it that bad?). But it seems to be an useful feature from end user's point of view.
<xsl:character-map name="cdata"> <xsl:output-character character="" string="<![CDATA["/> <xsl:output-character character="" string="]]>"/> <xsl:output-character character="" string="<"/> <xsl:output-character character="" string="&"/> </xsl:character-map>
<!-- output of the above --> <my-cdata><![CDATA[less-then < and ampersand: &]]></my-cdata>
Cheers, -- Abel Braaksma http://www.nuntia.nl
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Removing namespaces witho, Michael Kay | Thread | Re: [xsl] Removing namespaces witho, Mukul Gandhi |
Re: [xsl] XSLT 2.0 contains questio, G. Ken Holman | Date | Re: [xsl] XSLT 2.0 contains questio, Abel Braaksma |
Month |