Subject: [xsl] XSL and Namespaces From: "Borca, Olivier" <Olivier.Borca@xxxxxxxxxxxxxxxx> Date: Thu, 8 Mar 2001 15:44:37 +0100 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Why do some people post via x, Robert Nicholson | Thread | Re: [xsl] XSL and Namespaces, David Carlisle |
Re: [xsl] [Ann] jd.xslt - a XSLT 1., Sebastian Rahtz | Date | Re: [xsl] XSL and Namespaces, David Carlisle |
Month |