|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Positions
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
|
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








