Subject: [xsl] xsl:sort by attribute From: soriano_s@xxxxxx Date: Mon, 9 Jun 2003 17:36:45 +0200 |
Hi, in the example above, we need to sort by the attribute of the element. I'm usins xls_sort : <xsl:template match="cm_procesos"> <xsl:for-each select="fila"> <xsl:sort select="ide_proceso" date-type="string" order ="ascending" /> <xsl:value-of select="Valor"/> <fila> <xsl:apply-templates/> </fila> </xsl:for-each> </xsl:template> <xsl:template match="ide_proceso"> <ide_proceso Valor="{@Valor}"> <xsl:value-of select="@Valor"/> </ide_proceso> </xsl:template> An example of xml is this: <cm_procesos> <fila> <ide_proceso Valor="VVV"/> </fila> <fila> <ide_proceso Valor="AAA"/> </fila> </cm_procesos> The unique solution is that I write the xml like this, but is not the solution. <ide_proceso >"VVV"</ide_proceso> Thank you. Sergio Soriano Aina. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] ANN: U.S. Gov't Employee prep, G. Ken Holman | Thread | Re: [xsl] xsl:sort by attribute, David Carlisle |
RE: RE: [xsl] Join XMLs with XLST w, Americo Albuquerque | Date | [xsl] anyone using XPathVisualizer , Robert P. J. Day |
Month |