Newbie in XSLT need help
Posted: Fri Mar 03, 2006 11:18 am
Hey
I'm new in xslt and I'm blocked on the following problem hope somebody can help.
I'm checking my xml file in my xsl sheet to have two variables (oldgroup and isactive) in my aspx page but I'm not getting the result I'm waiting. Here is my xml file:
In my isactive variable I always get "notActive","notActive","active" but I should get "active","notActive","notActive" so what's wrong?
I'm new in xslt and I'm blocked on the following problem hope somebody can help.
I'm checking my xml file in my xsl sheet to have two variables (oldgroup and isactive) in my aspx page but I'm not getting the result I'm waiting. Here is my xml file:
Code: Select all
- <user cn="KRATEL Carsten" guid="5ff813dbe909d31183c900903306039e" e164="410" h323="Chambre 141" pwd="********" hw-id="IP202-0a-01-97" busy-out="1" loc="EMS_EP" filter="un" cd-filter="unknown" type="ep">
<grp name="Central" mode="active" />
<grp name="Chambres" />
<grp name="all" />
<gw name="GW-DECT" dsp="Carsten Kratel" ipei="00077 0777777" />
Code: Select all
<xsl:if test="@name=//show/user[@cn=$user]/grp/@name">
<input type="hidden" name="oldgroup">
<xsl:attribute name="value">
<xsl:value-of select="@name"/>
</xsl:attribute>
</input>
<xsl:choose>
<xsl:when test="@mode='active'">
<input type="hidden" name="isactive">
<xsl:attribute name="value">
<xsl:value-of select="//show/user[@cn=$user]/grp/@mode"/>
</xsl:attribute>
</input>
</xsl:when>
<xsl:otherwise>
<input type="hidden" name="isactive">
<xsl:attribute name="value">
<xsl:value-of select="'notActive'"/>
</xsl:attribute>
</input>
</xsl:otherwise>
</xsl:choose>
</xsl:if>