[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
David Carlisle wrote:
In fact, that was what I was doing before, however I was missing the namespace="..." attribute and the result was the stylesheet only worked when I had all the input document namespaces declared in the stylesheet, which was not possible since the input document namespaces are not known in advance.
Thanks for your help. Works a charm.
Ian
Re: [xsl] Unwanted default namespace copied to output in XSLT v1.0
Subject: Re: [xsl] Unwanted default namespace copied to output in XSLT v1.0 From: Ian STOKES-REES <ijstokes@xxxxxxxxxxxx> Date: Fri, 30 Nov 2007 08:55:43 -0500 |
David Carlisle wrote:
Any suggestions how to avoid this problem?
in xslt 1 xsl:copy always copie in scope namespaces so if you don't want that, don't use xsl:copy, instead use
<xsl:element name="{name()}" namespace="{namespace-uri()}">
which generates a new element with same name as the old one, but without copying namespace nodes.
In fact, that was what I was doing before, however I was missing the namespace="..." attribute and the result was the stylesheet only worked when I had all the input document namespaces declared in the stylesheet, which was not possible since the input document namespaces are not known in advance.
Thanks for your help. Works a charm.
Ian
-- Ian Stokes-Rees, Consultant SP Metric Technology Consulting ijstokes@xxxxxxxxxxxx http://www.spmetric.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Unwanted default namespac, Michael Kay | Thread | [xsl] Problem accessing nodes from , Aitor San Juan |
Re: [xsl] Problem while displaying , G. Ken Holman | Date | [xsl] Getting and using an xml attr, Aaron Johnson |
Month |
Keywords