[xsl] XSL and Namespaces

Subject: [xsl] XSL and Namespaces
From: "Borca, Olivier" <Olivier.Borca@xxxxxxxxxxxxxxxx>
Date: Thu, 8 Mar 2001 15:44:37 +0100
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"

 - This is the XSL file:
<xsl:stylesheet version='1.0'
	<xsl:template match="/Schema">
			<xsl:attribute name="xmlns">
				<xsl:value-of select="@xmlns" />
			<xsl:attribute name="xmlns:dt">
				<xsl:value-of select="@xmlns:dt" />
			<xsl:attribute name="xmlns:sql">
				<xsl:value-of select="@xmlns:sql" />
			<xsl:apply-templates />

 - 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" ?>

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

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 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