XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Alicia AliciaSubject: is this type of sorting possible in a table
Author: Alicia Alicia
Date: 27 Mar 2007 07:57 AM
Hi guys,

I am drawing a table with a row for each NODE and a column for each ID attribute of the REF children.

However, if there is an attribute which contains the words "INTRO" or "UNO" I must display those attributes in the first column.
For example if I have these tags

<Node>
<REF ID=0221>some text</REF>
<REF ID=01212INTRO>some other text</REF>
<REF ID=0001>some text</REF>
</Node>
<Node>
<REF ID=3>some text</REF>
<REF ID=32>some other text</REF>
<REF ID=51UNO>some text</REF>
</Node>
<Node>
<REF ID=3566>some text</REF>
<REF ID=32>some other text</REF>
<REF ID=51>some text</REF>
</Node>


Here is the output I require

01212INTRO 0221 0001
51UNO 3 32
3566 32 51

My question is, is there some way to integrate this sorting possibility through xsl?
Right now, this snippet simply writes the IDs as it sees them.

<xsl:for-each select="REF">
<TD width="96">
<xsl:value-of select="@ID"/>
</TD>
</xsl:for-each>

Many thanks

Alicia

Postnext
Tony LavinioSubject: is this type of sorting possible in a table
Author: Tony Lavinio
Date: 27 Mar 2007 12:12 PM
Next time, please post well-formed XML; if you're asking for free
advice, it would be nice if you could make it as easy as possible
for us to give it.

That being said, see the attached.

I hope you purchase/have purchased Stylus Studio, since you posted
on our support forum. But in any case, we're happy to help.


Unknownalicia.xsl

Posttop
Alicia AliciaSubject: is this type of sorting possible in a table
Author: Alicia Alicia
Date: 28 Mar 2007 03:57 AM
Thanks Tony.
It has pointed me the way.
Am so sorry that I didnt post the whole xml it's just that is a complex project and the prob i was facing was just with that part of it. Thought I'll simplify it and save u the hassle of deciphering a whole lot of xml
Thanks again
Alicia

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.