cancel
Showing results for 
Search instead for 
Did you mean: 

XSL Help

Former Member
0 Kudos

Hi,

Can anyone explain me line by line what does the following code do or mean.

<xsl:variable name="followingSibling">

<xsl:value-of select="E1MARMM[$itemIndex2 + 1]"/>

</xsl:variable>

<xsl:variable name="precedingSibling">

<xsl:value-of select="E1MARMM[$itemIndex2 - 1]"/>

</xsl:variable>

<!-- detemine whether this element has any siblings -->

<xsl:variable name="onlyChild">

<xsl:choose>

<xsl:when test="string-length($followingSibling)=0 and string-length($precedingSibling)=0">

<xsl:value-of select="true()"/>

</xsl:when>

<xsl:otherwise>

<xsl:value-of select="should-return-empty-string"/>

</xsl:otherwise>

</xsl:choose>

</xsl:variable>

Thanks and Regards,

Hemal

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Hemal,

Please refer the link http://www.w3.org/TR/xslt for complete documentation of XSLT.

Hope this helps.

Regards

Amit