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

Re: Pairing elements according to attributes with XSLT

Subject: Re: Pairing elements according to attributes with XSLT 1
From: Andy Kohn <andydev@xxxxxxxxx>
Date: Tue, 28 Jul 2009 16:36:58 +1000
Re:  Pairing elements according to attributes with XSLT
I'm still stuck with this sorting...

Can anyone help me out?

Thanks,

Andy

On Fri, Jul 24, 2009 at 12:29 PM, Andy Kohn<andydev@xxxxxxxxx> wrote:
> That works great! thanks a lot for the help.
>
> Now I'm trying to sort it using the data of the node that has attribute
'from'
>
> For example, with this input, the first one would be AAAA then CCC then
ZZZZ
>
> I tried using <xsl:sort select="keyword[@size=$from]"> but it doesn't
> seem to order it.
>
> <KeywordsInfo>
>   <KeywordsEntry>
>       <keyword size="big">AAAA</keyword>
>       <keyword size="small">table tennis ball</keyword>
>   </KeywordsEntry>
>   <KeywordsEntry>
>       <keyword size="big">ZZZZ</keyword>
>       <keyword size="small">chair 1</keyword>
>   </KeywordsEntry>
>   <KeywordsEntry>
>       <keyword size="big">CCC</keyword>
>       <keyword size="small">chair 2</keyword>
>   </KeywordsEntry>
> </KeywordsInfo>
>
>
> The result I need:
>
> <MainWordInput xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>           xsi:noNamespaceSchemaLocation="entriesResult.xsd"
>           fromSize ="big"
>           toSize="small">
>  <Entries>
>     <first>AAAA</first>
>     <second>table tennis ball</second>
>  </Entries>
>  <Entries>
>     <first>CCC</first>
>     <second>chair 2</second>
>  </Entries>
>  <Entries>
>     <first>ZZZZ</first>
>     <second>chair 1</second>
>  </Entries>
> </MainWordInput>
>
>
> Thanks all!

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-2007 All Rights Reserved.