[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Positions

Subject: Positions
From: "Tanzila Mohammad" <tmohammad@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 13 Nov 2001 10:10:25 -0000
output arabic
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.