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

Re: XSL Problem

Subject: Re: XSL Problem
From: "James Tauber" <jtauber@xxxxxxxxxxx>
Date: Mon, 8 Mar 1999 16:21:57 +0800
Re: XSL Problem
>Ok I have
>
><nodeType1 att1='thing1'>
><nodeType2 att1='thing2'>
><nodeType3 att1='thing3'>
>
>I am trying to select all 3 nodes and orger by att1 but display different
>information depending on what type of node it is?
>
>Does anyone have any idea how i would do this


Assuming you have a container element X, ie

<X>
    <nodeType1 att='thing1'>
    <nodeType2 att='thing2'>
    <nodeType3 att='thing3'>
</X>

Then you could have

<xsl:template match="X">
    <xsl:apply-templates select="nodeType1|nodeType2|nodeType3">
        <xsl:sort select="@att1"/>
    </xsl:apply-templates>
</xsl:template>

<xsl:template match="nodeType1">...</xsl:template>
<xsl:template match="nodeType2">...</xsl:template>
<xsl:template match="nodeType3">...</xsl:template>

I haven't tested it, but I think it should work.

James
--
James Tauber / jtauber@xxxxxxxxxxx / www.jtauber.com
Associate Researcher, Electronic Commerce Network
Curtin University of Technology, Perth, Western Australia

Full-day XML Tutorial @ WWW8 : http://www8.org/

Maintainer of : www.xmlinfo.com,  www.xmlsoftware.com and www.schema.net



 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.