P
Petterson Mikael
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>
<xsltherwise>
<xsl:text>"</xsl:text><xsl:value-of select="@name"/>"
</xsltherwise>
</xsl:choose>
<xsl:if test="not(position()=last())">,</xsl:if>
</xsl:for-each>
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>
<xsltherwise>
<xsl:text>"</xsl:text><xsl:value-of select="@name"/>"
</xsltherwise>
</xsl:choose>
<xsl:if test="not(position()=last())">,</xsl:if>
</xsl:for-each>