Subject: RE: Listing single occurrences of namespace labels From: Kay Michael <Michael.Kay@xxxxxxx> Date: Wed, 29 Nov 2000 11:28:22 -0000 |
> I've been through the XSL-list and know that it is possible to list > unique values using preceding-sibling, > but couldn't get it to work when trying to use the local-name() as the > checking value. This technique only works for eliminating duplicate string-values of nodes, not for eliminating duplicates in the results of any other function. That's because it relies on the semantics of $ns1 = $ns2 to mean "true if there is a pair of nodes from ns1 and ns2 that have the same string value". > > It may have been the incorrect syntax: > > <xsl:apply-templates select="book[not(local-name(*//.) = > preceding-sibling::*//local-name(.))]"/> It is incorrect. You can't use a function call as a step within a location path. And *//. is syntactically correct but fairly meaningless, I don't really know what you're trying to get at. I'd suggest using Muenchian grouping for this one: see www.jenitennison.com. Define a key such as <xsl:key name="k" match="*" use="local-name(*)"/> Alternatively in Saxon there's: saxon:distinct(*, saxon:expression('local-name()')) Mike Kay XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Listing single occurrences of n, Michael Hoffmann | Thread | DTD or XML Schema editor recommenda, MarkH |
RE: One XML styled with several XSL, Kay Michael | Date | Re: Stylesheet lists values [Was Re, Miloslav Nic |
Month |