[xsl] OR in test

Subject: [xsl] OR in test
From: "ashu t" <aashut@xxxxxxxxxxxxxx>
Date: 4 Jul 2002 12:34:27 -0000
in conversion of html to wml i am using this template match for <input>tag.
<xsl:template match="a/input | div/input | center/input | p/input | ul/input | li/input | tr/input | td/input | th/input | table/input | font/input">
<xsl:variable name="type">
<xsl:value-of select="@type"/>
</xsl:variable>
<xsl:if test="$type='text'| $type='password'">
<xsl:choose>
<xsl:when test="$type='text'">
<xsl:element name="input">
<xsl:attribute name="name">
<xsl:value-of select="@name"/>
</xsl:attribute>
<xsl:attribute name="type">
<xsl:value-of select="@type"/>
</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:element name="input">
<xsl:attribute name="name">
<xsl:value-of select="@name"/>
</xsl:attribute>
<xsl:attribute name="type">
<xsl:value-of select="@type"/>
</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:template>


but it is not working .i want to know that is it wrong to use or(|) in test.if yes then what should be the right way. and what if in html text is written as TEXT(in capitals).
as in wml only two (text and password) input types are allowed
ashu


_________________________________________________________
There is always a better job for you at Monsterindia.com.
Go now http://monsterindia.rediff.com/jobs


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread