Hello,
I am using a xsl and jTidy to convert HTML into
JSP. also puting my required tag & custom tags into it.
Now i need the value of a CLASS(css) attribute in any of the element in html will with replaced with the xml equalent xml statement.
where
<code>
//css is
string value
css = css.substring(css.indexOf('|')+1);
</code>
I am defining my xsl as
<code>
<xsl:when test="@type='button'">
<!-- concat all command with "cmd_" e.g.command=next-> command=cmd_next-->
<xsl:text disable-output-escaping="yes">
<webform:commandButton
</xsl:text>
<xsl:for-each select="@*">
<xsl:if test="name(.)='command'"> <xsl:text> </xsl:text>
<xsl:text>command="</xsl:text>
<xsl:value-of select="concat('cmd_',.)"/>
<xsl:text>"</xsl:text>
</xsl:if>
<xsl:call-template name="checkAttribute">
<xsl:with-param name="attributeList"
select="'|id|css|value|onclick|title|value'"/>
<xsl:with-param name="input" select="name(.)"/>
<xsl:with-param name="value" select="."/>
</xsl:call-template>
</xsl:for-each>
<xsl:text disable-output-escaping="yes">/></xsl:text>
</xsl:when>
</code>
Please guide me. and respond me soon.
Thanks in advance