Subject: RE: [xsl] Complex XPath Expression From: "Karl Stubsjoen" <karl@xxxxxxxxxxxxxxxxxxxx> Date: Fri, 14 Jan 2005 11:44:26 -0700 |
Here is what I came up with but it is not working: /root/recordset[@rsName='Codes']/record[field[@fieldName='Section']=2][field [@fieldName='ID'] = number(recordset[@rsName='Memberships']/record[1]/field[@fieldName='RefEntry ActivityID'])] If I replace the number(...) portion on the right of the ='s, with 2913, I get what I am looking for. Any more ideas? Karl.. -----Original Message----- From: Marian Olteanu [mailto:mou_softwin@xxxxxxxxx] Sent: Friday, January 14, 2005 10:42 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [xsl] 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[@fi eldname='ID'] = number(recordset[@rsName='Memberships']/record[1]/field[@fieldname='RefEntry ActivityID'])] --- 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[@fi eldname='ID'] > = recordset[@rsName='Memberships']/record[1]/field[@fieldname='RefEntryActivit yID']] > > > 1ST PART: > recordset[@rsName='Codes']/record[field[@fieldname='Section']='2'][field[@fi eldname='ID'] > > >> Alone, this correctly produces a result set of 15 matching nodes. > > 2ND PART: > recordset[@rsName='Memberships']/record[1]/field[@fieldname='RefEntryActivit yID'] > > >> 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[@fi eldname='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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Complex XPath Expression, Marian Olteanu | Thread | RE: [xsl] Complex XPath Expression, Michael Kay |
Re: [xsl] binary XML, António Mota | Date | Re: [xsl] Comparing node for identi, António Mota |
Month |