This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]