[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Distinct values with XPath query in stylesheet
Thanks for the tidbit. I will definitely remember that little handy function. :) After creating my test.xml and looking at the XPath query with different node names, I did some more testing and found a solution for XPath 1.0. The XPath in the fee-type-defs template is: //RECORDABLE_DOCUMENT/FEES/FEE[@Description=$feeName and not(@*[name()=$feeValueAttr]=parent::node()/parent::node()/preceding-sibling::node()/FEES/FEE[@Description=$feeName]/@*[name()=$feeValueAttr])] I also modified the XPath query in the sort-Fees template: FEES/FEE[not(@Description=parent::node()/parent::node()/preceding-sibling::node()/FEES/FEE/@Description)] I wasn't taking into consideration the parent structure being so far back. :) Thanks again! Matthew On Tue, Sep 16, 2008 at 11:58 AM, Ryan Graham <Ryan.Graham@xxxxxxxxxxx> wrote: > > > Are you locked into using 1.0? In 2.0, you could use: > > distinct-values(//FEE[@Description = 'Fee Two']/@Amount) > > HTH, > Ryan > > This message is private and confidential. If you have received it in error, please notify the sender and remove it from your system.
|
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
|