|
Subject: [xsl] Positions From: "Tanzila Mohammad" <tmohammad@xxxxxxxxxxxxxxxxxxxx> Date: Tue, 13 Nov 2001 10:10:25 -0000 |
I have the following xsl:
<xsl:for-each select="[full path]/literal">
<xsl:sort select="./@lang" data-type="text" order="ascending"/>
----------------------------------------------------------------------
which results in the following sorted XML:
....
<literal name="number">15</literal>
<literal name="table" lang="AR">ARABIC </literal>
<literal name="table" lang="CH">CHINESE</literal>
<literal name="table" lang="EN">TABLE</literal>
<literal name="table" lang="ES"> CUADRO</literal>
<literal name="table" lang="FR">TABLEAU</literal>
......
------------------------------------------------------------------------
xsl cont...:
<fo:block text-align="start">
<xsl:if test="./@name='table'">
<xsl:value-of select="."/>
</xsl:if>
-----------------------------------------------------------------------
Output:
ARABIC
CHINESE
TABLE
CUADRO
TABLEAU
-----------------------------------------------------------------------
Problem 1: I need the positions of "CUADRO" and "TABLEAU" to be reversed
(see output below)
I have played with position() but with no success - any suggestions??
-------------------------------------------------------------------------
Problem 2:
I need the following output:
ARABIC
CHINESE
TABLE 15 <!-- Display the 15 alongside TABLE-->
CUADRO
TABLEAU
-------------------------------------------------------------------------
xsl cont...
<xsl:if test="./@lang='EN'">
<xsl:value-of
select="preceding-sibling::.[@name='number']"/>
</xsl:if>
</fo:block>
</xsl:for-each>
I am trying to get the value of the preceding sibling, where name=number,
again with no success - any suggestions?
Thanks
Tanz
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] namespace-uri() method re, Jörg Heinicke | Thread | Re: [xsl] Positions, Trevor Nash |
| Re: [xsl] namespace-uri() method re, Jörg Heinicke | Date | [xsl] Globalization with XSL-XML, Annalisa Ricci |
| Month |