This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
namespace declaration missing in output
- To: xsl-list <xsl-list at lists dot mulberrytech dot com>
- Subject: [xsl] namespace declaration missing in output
- From: Philip dot Strube at ofd dot mf dot lsa-net dot de (Philip Strube)
- Date: Wed, 31 Jan 2001 18:19:00 +0100
- Organization: OFD Magdeburg
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi all,
my problem is: if I add an attribute with a namespace, no
namespace-declaration
is generated. (If I add an element, everything is ok.)
xslt:
<?xml version='1.0' encoding="ISO-8859-1"?>
<xsl:stylesheet version='1.0'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
xmlns:fiscus="http://www.fiscus.de">
<xsl:output method="xml" version="1.0" encoding="ISO-8859-1"
indent="yes" />
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="*">
<xsl:copy>
<xsl:attribute name="fiscus:objectID"">
<xsl:number level="any" count="*"/>
</xsl:attribute>
<xsl:apply-templates
select="@*|node()|comment()|processing-instruction()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
input:
<?xml version='1.0' encoding="ISO-8859-1"?>
<one>
<two>
<three>drei</three>
</two>
</one>
output:
<?xml version="1.0" encoding="ISO-8859-1"?>
<one fiscus:objectID="1">
<two fiscus:objectID="2">
<three fiscus:objectID="3">drei</three>
</two>
</one>
desired output:
<?xml version="1.0" encoding="ISO-8859-1"?>
<one fiscus:objectID="1" xmlns:fiscus="http://www.fiscus.de">
<two fiscus:objectID="2">
<three fiscus:objectID="3">drei</three>
</two>
</one>
What can I do?
(using xalan_1_1_D01 or xalan-j_2_0_D07 on NT4SP6 german version)
Thanks, Philip
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list