[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|