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

Namespace missing after transform

Subject: Namespace missing after transform
From: "Hofman, Peter" <peter.hofman@xxxxxxxxxxxxx>
Date: Fri, 8 Sep 2006 13:52:46 +0200
peter hofman
Hi,

I have difficulties getting all necessary namespaces in the output while
performing XML to XML transformation.

The source document contains typed elements like this:

<elem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:xs="http://www.w3.org/2001/XMLSchema"
          xsi:type="xs:short">30</elem>

When I copy it using the following xsl template the xmlns:xs reference
is missing.

Template:

<xsl:template match="elem">
	<xsl:element name="elem">
		<xsl:attribute name="xsi:type"
			xmlns:xs="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
			<xsl:value-of select="@xsi:type"/>
		</xsl:attribute>
		<xsl:value-of select="."/>
	</xsl:element>
</xsl:template>

Result:

<elem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:type="xs:short">30</elem>

Any ideas how to fix this?

Additional information:
XSL version: 1.0
XSLT processor: not sure, I think it is SAX based. Anyway, problem also
occurs with msxsl.exe (version 4.0).

Kind regards,

Peter Hofman


This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be copied,
disclosed to, retained or used by, any other party. If you are not an intended
recipient then please promptly delete this e-mail and any attachment and all
copies and inform the sender. Thank you.

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.