|
Subject: [xsl] namespace declaration missing in output From: Philip.Strube@xxxxxxxxxxxxxxxxx (Philip Strube) Date: Wed, 31 Jan 2001 18:19:00 +0100 |
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
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Removing Nulls, David Carlisle | Thread | Re: [xsl] namespace declaration mis, cutlass |
| RE: [xsl] How can I use XML to conv, Michael Fitzgerald | Date | Re: [xsl] Quasi-Literals and XML, Uche Ogbuji |
| Month |