[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: RE: Using a reference in a sort
Hi > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of > Jesse M. Heines > Sent: Wednesday, July 30, 2003 12:38 AM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: RE: Using a reference in a sort > > > > Try <xsl:sort > > > select="document($filePeople)/people/person[@id=current()/pers > on/@id]/@l > ast" > > order="descending"/> instead > > Thanks for your reply, but I'm sorry to report that that > doesn't work either. The context of current() is still the It should. I've tried on this input: <tasks> <task> <person id="p001">1 ... </person> </task> <task> <person id="p002">2 ... </person> </task> <task> <person id="p003">3 ... </person> </task> </tasks> With this 'people.xml': <people> <person first="Jesse" id="p001" last="Heines"> ... </person> <person first="Americo" id="p002" last="Albuquerque"> ... </person> <person first="Me" id="p003" last="Myself"> ... </person> </people> And got this result: Myself, Me: 3 ... Heines, Jesse: 1 ... Albuquerque, Americo: 2 ... > node in the other XML file. The documentation I have says > that current() is the same as ".", which I tried and does not > help, either. No, the current() is the same as "." outside of the select, in this case will be the same used in the <xsl:apply-templates> So current() will be the "task" node Show us the template where you call this Regards, Américo Albuquerque XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|