|
Subject: RE: local-name() namespace xslt 2.0 question was Re: [xsl] Identity transformation (without using xsl:copy) From: "Bryan Rasmussen" <bry@xxxxxxxxxx> Date: Tue, 19 Mar 2002 13:13:11 +0100 |
>> <xsl:param name="name"
>> select="concat(substring-before(name(),':'),local-name())"/>
>> <xsl:element name="{$name}">
>concat(substring-before(name(),':'),local-name())
>will return the same value as
>name()
actually that one won't, it was my booboo, <xsl:param name="name"
select="concat(substring-before(name(),':'),':',local-name())"/> will
produce the same as name()
this is because the original thread Re: [xsl] Identity transformation
(without using xsl:copy) wanted to copy nodes(including namespace nodes)
without using xsl:copy.
>There isn't a function to extract the prefix, because it's not usually
>significant, but there is a function namespace-uri() to get the
>corresponding namespace URI.
yeah I forgot namespace-uri(), and I agree it's not generally significant,
but for some reason they wanted to copy a namespace node without xsl:copy,
which this did, in msxml 4 at least, then when I did it I thought: "there
must be a simpler way to do this, without using xsl:copy of course"
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: local-name() namespace xslt 2.0, Michael Kay | Thread | RE: local-name() namespace xslt 2.0, Bryan Rasmussen |
| [xsl] Re: RE: Re: Selecting Maximum, Dimitre Novatchev | Date | Re: [xsl] XML apparently cannot be , Paul Terray |
| Month |