[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

local-name() namespace xslt 2.0 question was Re: Ident

Subject: local-name() namespace xslt 2.0 question was Re: Identity transformation (without using xsl:copy)
From: "Bryan Rasmussen" <bry@xxxxxxxxxx>
Date: Tue, 19 Mar 2002 10:56:30 +0100
xsl local name
here's a thing I was just wondered about, prompted by the RE:  Identity
transformation (without using xsl:copy) thread, I know one could do this
with substring-before, substring-after but is there another way?:
 I have an xml fragment,
<per:people>
 <per:person>
  <per:name>..</per:name>
....</per:person>
</per:people>

now the local-name of per:people is people, what if I want to seperate out
the local-name from the namespace but still have the namespace to play
with(for some stupid reason, this is me being stupid again, I know I Know).
right because it seems that this is what the post in RE:  Identity
transformation (without using xsl:copy) was all about,
you could have something like-
<xsl:template match="*">
<xsl:param name="name"
select="concat(substring-before(name(),':'),local-name())"/>
<xsl:element name="{$name}"><xsl:apply-templates select="@*"/></xsl:element>
</xsl:template>
 <xsl:template match="@*">
<xsl:attribute name="{name()}"><xsl:value-of select="."/></xsl:attribute>
</xsl:template>

but I don't want that, is there any idea of an xpath 2.0 function
local-namespace()?


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.