Subject: RE: [xsl] dinamic sorting question From: "Aniceto Lopez" <aniceto@xxxxxxxxxxxxx> Date: Mon, 16 Dec 2002 17:11:31 +0100 |
Thanks Michael, this @*[...] is working good Ani -----Mensaje original----- De: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]En nombre de Michael Kay Enviado el: lunes, 16 de diciembre de 2002 11:04 Para: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Asunto: RE: [xsl] 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 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] dinamic sorting question, Michael Kay | Thread | [xsl] multiple attributes, DPawson |
[xsl] XML to SVG, Kevin . Gutch | Date | Re: [xsl] XML to SVG, KUMAR NINGASHETTY |
Month |