You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Matthew Cordes <mc...@maine.edu> on 2000/11/08 23:12:38 UTC
xsl:copy-of & taglib difficulty
Hello all,
I'm having a bit of a problem and would appreciate
any help. In my xml file I have the following:
<xsp:page
xmlns:myTagLib="http://xyz.com"
xmlns:xsp="http://apache/..."
>
<page>
<xsp:logic>
Document doc = xspParser.parse( new InputSource(
new StringReader( "<data>well formatted database data</data>" )));
xspCurrentNode.appendChild(
document.importNode( doc.getFirstChild(), true );
</xsp:logic>
</page>
</xsp:page>
then in my xsl I want to display the well-formed xml as is with :
<textarea>
<xsl:copy-of select="data/node()"/>
</textarea>
The problem here is that I get this as output:
<textarea>
<data xmlns:mytaglib="http://xyz.com">
well formatted database data
</data>
</textarea>
Notice there is a namespace declaration within the data tag.
I tried including this within my stylesheet
<xsl:stylesheet
...
xmlns:MyTagLib="http://xyz.com"
exclude-result-prefixes="MyTagLib"
>
w/o an effect. The reason I post this on the cocoon list and
not an XSLT one is I hoped someone could explain why the MyTagLib
prefix was appearing on the data, but the xsp prefix does not.
-matt