This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Try to pattern match a field


I want to do the following in JScript:

var node = xmlData.selectNodes("//Row[@fld1(0)");

Where the XML is listed as the following:

<root>
   <Row fld1="1" fld2="Description1" fld3="5" />
   <Row fld1="1" fld2="Description1" fld3="10" />
   <Row fld1="2" fld2="Description2" fld3="5" />
   <Row fld1="2" fld2="Description2" fld3="11" />
   <Row fld1="3" fld2="Description3" fld3="15" />
   <Row fld1="3" fld2="Description3" fld3="13" />
</root>

I want it to return only the first occurance of every unique fld1 value.

AKA this:
<root>
   <Row fld1="1" fld2="Description1" fld3="5" />
   <Row fld1="2" fld2="Description2" fld3="5" />
   <Row fld1="3" fld2="Description3" fld3="15" />
</root>

I don't care about fld3 under a certain condition, but in other conditions I do.

Thanks..

Peter
++++++++++++++++++++++++++++++++++++++++++++++
Peter DeSimone

Email Address: desimonp@iname.com
New Email Address:  peter@desimone.com
Web Address: Http://www.bigfoot.com/~desimonp
New Web Address:  http://www.peter.desimone.com


ICQ:  	20177836
AOL Instant Messenger:  	Peterdesi1

++++++++++++++++++++++++++++++++++++++++++++++




---------------------------------------------------
Get free personalized email at http://www.iname.com




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]