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

xsl:element and namespace output

Subject: xsl:element and namespace output
From: "ETarlton" <etnet01@xxxxxxxxxxxxx>
Date: Wed, 26 Feb 2003 09:10:38 -0500
xsl element name namespace
I am relatively new at this but I have been reading the list and I've 
tried to do my own leg work.  But I need some help now.  I want to 
transform xml to another xml moving data to diff. tag names and 
adding a namespace declaration to the root.  I've read, searched and 
done a lot of trial and error and here's where I am:

<xsl:element name="RRRRR" namespace="http://www.aaa.com/bbb/ccc">
  <xsl:element name="TTT111">
    <xsl:value-of select="concat(some source xml tags)"/>
  </xsl:element>

  <xsl:element name="TTT222">
    <xsl:value-of select="concat(some source xml tags)"/>
  </xsl:element>

  <xsl:element name="TTT333">
    <xsl:attribute name="AAA333">12345678</xsl:attribute>

    <xsl:element name="TTT444">
      <xsl:element name="TTT555">somedata</xsl:element>
      <xsl:element name="TTT666">
        <xsl:value-of select="a source xml tag"/>
      </xsl:element>

I want a simple default namespace declaration on the root in the 
output xml.  The xsl:element for RRRR does that.  But on all children 
at the first level below RRRR it's generating xmlns="".  So TTT222, 
TTT333 get this xmlns="" in the output.  I don't understand why 
except it's clearing the namespace so they don't belong to the RRRR 
namesspace.  But the entire output xml should belong to the same 
namespace.  Seems like it's doing the opposite of what I intended and 
thought it would do.

Could someone explain and enlighten me?

Thanks,
Ed


 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.