|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: dinamic sorting question
> ok Michael here are the samples
>
> -----XML
> <sites-list orderedcol="cod" order="descending" type="number">
> <site id="4" cod="100" folder-name="SI01"/>
> <site id="2" cod="0.5" folder-name="SI35"/>
> <site id="5" cod="50" folder-name="SI05"/>
> <site id="1" cod="25" folder-name="SI44"/>
> <site id="3" cod="0.25" folder-name="SI05"/>
> </sites-list>
>
>
> -----XSL
> <xsl:variable name="queelemento" select="sites-list/@orderedcol"/>
> <xsl:variable name="queorden" select="sites-list/@order"/>
> <xsl:variable name="tipoelemento" select="sites-list/@type"/>
>
> <xsl:for-each select="sites-list/site">
> <xsl:sort select="*[name()=$queelemento]" order="{$queorden}"
You are selecting child elements rather than attributes. Despite its
name, $queelemento actually names an attribute. Use select="@*[...] in
place of select="*[...]".
Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx
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
|

Cart








