This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: self axis and attributes
- To: "Kevin Jones" <kjouk at yahoo dot co dot uk>
- Subject: Re: self axis and attributes
- From: Jeni Tennison <mail at jenitennison dot com>
- Date: Wed, 22 Nov 2000 11:22:15 +0000
- CC: xsl-list at mulberrytech dot com
- Organization: Jeni Tennison Consulting Ltd
- References: <ELELJKIDBHJGKEMFLAFKEEEOCEAA.kjouk@yahoo.co.uk>
- Reply-To: xsl-list at mulberrytech dot com
Kevin,
>> Am I missing something? Is there any way of testing the identity of
>> namespaced attributes while retaining independence between the source
>> and stylesheet and without testing the namespace-uri()?
>
> It's a bit ugly but I think this works,
[snip]
> <xsl:variable name="dem" select="generate-id(@dem:count)"/>
> <xsl:copy-of select="@*[generate-id()!=$dem]" />
Or squash it all into one line like:
<xsl:copy-of
select="@*[generate-id() != generate-id(current()/@dem:count)]" />
It is unwieldy, but not as unwieldy as testing namespace-uris! Good
thinking.
> Of course its not so easy if you are dealing with more than one attribute...
Nor is the other solution, though. This is a better workaround.
Thanks very much,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list