Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: test of following-sibling[2] does not work test of following-sibling[2] does not workTo: NULL Date: 2/6/2006 7:25:00 AM Hi,
If sibling # 2 is enumRef, in xsl, I will call enumNameString template.
In my example, xml, it is an enumRef but still the call to enumNameString
is not performed. The otherwise is performed :-)
Any ideas why?
cheers,
//mikael
xml
===
<structMember name="aichTiming">
<description>Timing sensor
</description>
<enumRef name="Aich_Timing">
</enumRef>
</structMember>
xsl
===
<xsl:for-each select="structMember">
<xsl:choose>
<xsl:when test="following-sibling[2][name(.) = 'enumRef']">
<xsl:call-template name="enumNameString">
<xsl:with-param name="enumRefName" select="@name"/>
</xsl:call-template>"</xsl:when>
<xsl:otherwise>
<xsl:text>"</xsl:text><xsl:value-of select="@name"/>"
</xsl:otherwise>
</xsl:choose>
<xsl:if test="not(position()=last())">,</xsl:if>
</xsl:for-each>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
