|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] namespace declaration missing in output
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








