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

RE: RE: Using a reference in a sort

Subject: RE: RE: Using a reference in a sort
From: Américo Albuquerque <melinor@xxxxxxx>
Date: Wed, 30 Jul 2003 14:19:23 +0100
albuquerque jesse
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


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.