You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Sven Doerr <do...@time4you.de> on 2000/12/18 08:32:05 UTC
xalan drops namespaces in dom
xalan 1.2.2 (and 1.2.1) drops namespaces,
when transforming into a dom.
i added two lines to the TransformToDom.java sample
that print info on the root node:
System.out.println( out.getDocumentElement().getNodeName() );
System.out.println( out.getDocumentElement().getNamespaceURI() );
and then added a namespace to the foo.xsl:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:n="N"
>
<xsl:template match="doc">
<n:out><xsl:value-of select="."/></n:out>
</xsl:template>
</xsl:stylesheet>
the output is:
n:out
null
<?xml version="1.0" encoding="UTF-8"?>
<n:out xmlns:n="N">Hello</n:out>
this "null" shows that the namespace "N" got lost
in the dom element.
regards,
-sven-
--
time4you GmbH
Geschäftsleitung
PS: Besuchen Sie uns auf der LEARNTEC 2001 in Karlsruhe auf unserem
Stand 157 in der Schwarzwaldhalle...
******************************************************************
IBT ® SERVER eLearning suite. Software-at-work! All-in-one &
plug-able...
Unsere Campus-Management-Plattform liegt jetzt in einer neuen
Software-Version vor!
******************************************************************
the knowledge professionals
time4you GmbH
communication & learning
Maximilianstraße 4
76133 Karlsruhe
Telefon 0721.830.16.0
Telefax 0721.830.16.16
http://www.time4you.de