|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Complex XPath Expression
The comparison between two nodesets is a little bit different than the comparison between a nodeset and a number, so i suggest to try like: recordset[@rsName='Codes']/record[field[@fieldname='Section']='2'][field[@fieldname='ID'] = number(recordset[@rsName='Memberships']/record[1]/field[@fieldname='RefEntryActivityID'])] --- Karl Stubsjoen <kstubs@xxxxxxxxx> wrote: > Hello, > > I have an xpath query that works in each of it's respective pieces but > does not return a desired result when combined. > > Here is the complete expressions, followed by an explanation of it's parts: > > COMPLETE: > recordset[@rsName='Codes']/record[field[@fieldname='Section']='2'][field[@fieldname='ID'] > = recordset[@rsName='Memberships']/record[1]/field[@fieldname='RefEntryActivityID']] > > > 1ST PART: > recordset[@rsName='Codes']/record[field[@fieldname='Section']='2'][field[@fieldname='ID'] > > >> Alone, this correctly produces a result set of 15 matching nodes. > > 2ND PART: > recordset[@rsName='Memberships']/record[1]/field[@fieldname='RefEntryActivityID'] > > >> Alone, this retrieves the node who's value is 2913. > > If I rewrite the complete expression like this: > recordset[@rsName='Codes']/record[field[@fieldname='Section']='2'][field[@fieldname='ID'] > = 2913] > > >> I do match one node which is the desired result. > > What is wrong with the complete expression? Both the 1st part and 2nd > part behave accordingly, but combined not. > > Thanks for the help! > > Karl > > ===== Marian http://www.utdallas.edu/~mgo031000/ __________________________________ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail
|
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
|

Cart








