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

Try to pattern match a field

Subject: Try to pattern match a field
From: desimonp@xxxxxxxxx
Date: Wed, 1 Nov 2000 18:22:36 -0400 (EST)
pattern match email address
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@xxxxxxxxx
New Email Address:  peter@xxxxxxxxxxxx
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


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.