This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: local-name() namespace xslt 2.0 question was Re: Identity transformation (without using xsl:copy)
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Tue, 19 Mar 2002 11:39:53 -0000
- Subject: RE: local-name() namespace xslt 2.0 question was Re: [xsl] Identity transformation (without using xsl:copy)
- Keywords: xsltDEV
- Reply-to: xsl-list at lists dot mulberrytech dot com
> here's a thing I was just wondered about, prompted by the RE:
> [xsl] Identity
> transformation (without using xsl:copy) thread, I know one
> could do this
> with substring-before, substring-after but is there another way?:
> <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()
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.
Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list