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

XSL and Namespaces

Subject: XSL and Namespaces
From: "Borca, Olivier" <Olivier.Borca@xxxxxxxxxxxxxxxx>
Date: Thu, 8 Mar 2001 15:44:37 +0100
remove xmlns sql
Hi,
I have the following problem using XSLT to transform and xdr file to
another via xsl (xdr is an xml file).

 - This is the source file :
<?xml version="1.0" ?>
<Schema xmlns="urn:schemas-microsoft-com:xml-data"
               xmlns:dt="urn:schemas-microsoft-com:datatypes"
               xmlns:sql="urn:schemas-microsoft-com:xml-sql">        	
</Schema>


 - This is the XSL file:
<xsl:stylesheet version='1.0'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
	<xsl:template match="/Schema">
		<xsl:copy>
			<xsl:attribute name="xmlns">
				<xsl:value-of select="@xmlns" />
			</xsl:attribute>
			<xsl:attribute name="xmlns:dt">
				<xsl:value-of select="@xmlns:dt" />
			</xsl:attribute>
			<xsl:attribute name="xmlns:sql">
				<xsl:value-of select="@xmlns:sql" />
			</xsl:attribute>
			<xsl:apply-templates />
		</xsl:copy>
	</xsl:template>
</xsl:stylesheet>


 - Applying the XSL to the xdr file, i have the following result (select
the text after this line to see that space characters are created):
<?xml version="1.0" encoding="UTF-8"?>
        	


 - If I remove the namespaces from the source file:
<?xml version="1.0" ?>
<Schema>        	
</Schema>


- I have the following result:
<?xml version="1.0" encoding="UTF-8"?>
<Schema xmlns:dt="" xmlns:sql="">        	
</Schema>


So, as you can see, when I remove the namespaces, the XSL works.
Does anyone see where the problem comes from ?

Thx a lot,
Olivier


--------------------------------------------------
Olivier Borca
SoftPlumbers Engineer (Geneva)
Tel: (+4122) 8491003
E-Mail: olivier.borca@xxxxxxxxxxxxxxxx
--------------------------------------------------



 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.