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

Getting a distinct list of node names

Subject: Getting a distinct list of node names
From: Manuel Holtgrewe <purestorm@xxxxxxxxxxx>
Date: Mon, 15 Dec 2003 20:22:05 +0100
distinct list
Hi

Maybe this cannot be accomplished with plain Xslt and my mail is OT, but
I do not know a better place to start asking.

I need to get a distinct list of the node names from all children of one
node. For example, if I have:

    <node:definition>
        <form:validator />
        <form:validator />
        <form:filter />
    </node:definition>

I want to be able to retrieve a list of the names of all tags used
within node:definition. However, it should contain each tag name only
once:

    ('form:validator', 'form:filter')

I tried to accomplish this trying to build a string containing all tag
names but this failed because of the nature of xsl:variables, recursion
did not work, too (I found no way :/).

I also tried the set:distinct method from exslt but it did not work,
too, because you cannot specify a path like "*/name()" and so you cannot
select all the names (I guess it is because paths always only specify
nodes and a node name is a plain string?).

Bests,

Manuel Holgrewe

-- 
Unix definitely is a user friendly operating system.
- It is only picky with its friends.

 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.