|
Subject: RE: Displaying every 2 element values in 1 rowy From: "Selva, Francis" <Francis.Selva@xxxxxxxxxxxxxxx> Date: Wed, 26 Apr 2000 11:05:23 -0700 |
Mike,Sorry for prolonging this question.But what am I doing wrong here?.
This is my xml
<empdb>
<emp>
<eno>A21</eno>
</emp>
<emp>
<eno>A22</eno>
</emp>
<emp>
<eno>A23</eno>
</emp>
<emp>
<eno>A24</eno>
</emp>
<emp>
<eno>A25</eno>
</emp>
<emp>
<eno>A26</eno>
</emp>
</empdb>
And I used ur xsl as follows:
<xsl:template match="empdb//emp">
<!-- look at every 1st, 3rd, 5th, etc 'eno' element child of current node
-->
<xsl:for-each select="eno[position() mod 2 = 1]">
<!-- start a new table row -->
<tr>
<!-- cell 1: value of current 'eno' -->
<td>
<xsl:value-of select="."/>
</td>
<!-- cell 2: value of next 'eno' or a non-breaking space if none -->
<td>
<xsl:choose>
<xsl:when test="following-sibling::eno">
<xsl:value-of select="following-sibling::eno[1]"/>
</xsl:when>
<xsl:otherwise> </xsl:otherwise>
</xsl:choose>
</td>
</tr>
</xsl:for-each>
</xsl:template>
What is it that Im not doing right?.I changed the template match in all
possible ways but still Im getting all the values in one row.
Francis
>
> > Mike,Im getting all the values in one row like A21 A22 A23
> > A24 A25 A26.I
> > need something like
> > A21 A22
> > A23 A24
> > A25 A26
> >
> > Can u pl tell me how can I do this format?
> > > <xsl:value-of select="following-sibling::eno"/>
>
> Should be
> <xsl:value-of select="following-sibling::eno[1]"/>
>
> Mike Kay
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: Displaying every 2 element valu, Kay Michael | Thread | Re: Displaying every 2 element valu, Mike Brown |
| Re: find the following sibling of m, Wendell Piez | Date | RE: xsl-list question, Jonathan Marsh |
| Month |