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

How to transform only unique nodes in XSLT?

  • From: "Anand K" <anandk@c... >
  • To: xml-dev@i...
  • Date: Thu, 23 Sep 1999 12:49:39 -0400

xslt unique nodes
Hello everyone,

I have an XSL Transformation question. I hope I can raise XSLT issues here. I am new to XSL and want to write a template to transform only unique nodes from a well formed XML document to HTML.

Below is a small snippet of this well formed document which I want to transform
<xyz>
    ...
    ...
    <a name="school">
        <a name="grade5">
            <b item="pencil"/>
            <b item="paper"/>
        </a>
        <a name="grade10">
            <b item="pen"/>
            <b item="paper"/>
            <b item="backpack"/>
        </a>
    </a>
    <a name="office">
        <b item="cuibicle"/>
        <b item="paper"/>
        <a name="engg">
            <b item="pc"/>
            <b item="backpack"/>
        </a>
    </a>
    ....
    ...
</xyz>

Now, from this XML document I want to create a HTML document which would be a list of all the 'b' element's attributes (i.e. item). As you see there are a few items which are repeated in the XML document. If I want only the unique elements depending on b's attribute item then how should go about writing the XSLT template. Is this possible? Maybe I have to parse the entire document more than once to see if a particular node is unique, but how to do this? Any help!!!

PS: I am using  XT (Ver 19990822) by James Clark for the transformation.

Thank you,
Anand
  xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1 To (un)subscribe, mailto:majordomo@i... the following message; (un)subscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@i...)


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.