Subject: Re: [xsl] CDATA or escape in the result tree problems|
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Wed, 01 Nov 2006 00:02:27 +0100
The textarea element is in the default namespace of the stylesheet, I have not assigned any namespace to that.you mean that your xpatch declaration is in the default namespace, your source document, or the textarea element in the source document? The xpath namespace must match the namespace of the textarea in the source document. Perhaps you can provide us with a smallest working example (with your error in it) with source/xslt/output?
The fragment I get from TinyMCE is asserted to be XHTML under some conditions I think I have met, but I have not actually seen a namespace on these elements either.
I suspect "valid XHTML" ignores a few things, such as the namespace
declaration. Also, TinyMCE gives me a whole document, but I manipulate the DOM in my application to only include children of the body.
I tried to insert a xmlns:xhtml="http://www.w3.org/1999/xhtml" and xhtml:textarea, but it made no difference.
And this is your XSLT: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<xsl:template match="/"> <xsl:apply-template select="xhtml:textarea" /> </xsl:template> <xsl:template match="xhtml:textarea"> <textarea> Do something with this node </textarea> </xsl:template>
Then your output will look like this: <textarea xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xhtml="http://www.w3.org/1999/xhtml"> Do something with this node </textarea>
Cheers, -- Abel Braaksma http://www.nuntia.com