cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Cordes <mcord...@maine.edu>
Subject xsl:copy-of & taglib difficulty
Date Wed, 08 Nov 2000 22:12:38 GMT
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

Mime
View raw message