[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

namespace declaration missing in output

Subject: namespace declaration missing in output
From: Philip.Strube@xxxxxxxxxxxxxxxxx (Philip Strube)
Date: Wed, 31 Jan 2001 18:19:00 +0100
declaration missing
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.