RE: [xsl] XSL and Namespaces

Subject: RE: [xsl] XSL and Namespaces
From: "Borca, Olivier" <Olivier.Borca@xxxxxxxxxxxxxxxx>
Date: Thu, 8 Mar 2001 17:28:46 +0100
Thx a lot to all of you that answered, it now works perfectly.
But now I have another question ;)

I want to do this:
			<xsl:attribute name="sql:field">
				<xsl:value-of select="@type" />
			</xsl:attribute>

But, I cannot create such an attribute name. So, how can I create an
attribute on a given namespace ?

Thx,
Olivier

-----Original Message-----
From: Michael Kay [mailto:mhkay@xxxxxxxxxxxx]
Sent: Thursday, March 08, 2001 5:03 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] XSL and Namespaces


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

It is an error to use <xsl:attribute> to create an attribute whose name
begins with "xmlns".

It looks as if you are trying to copy namespace nodes; but you don't
need to
do this, because <xsl:copy> on the element does it automatically.

Mike Kay
Software AG


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread