Bookmark Topic Watch Topic
  • New Topic

how to use string function in xsl while converting to jsp  RSS feed

Kumar Anupam
Posts: 19
  • Mark post as helpful
  • send pies
  • Report post to moderator

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.

//css is string value
css = css.substring(css.indexOf('|')+1);

I am defining my xsl as

<xsl:when test="@type='button'">
<!-- concat all command with "cmd_" e.g.command=next-> command=cmd_next-->
<xsl:text disable-output-escaping="yes">

<xsl:for-each select="@*">
<xsl:if test="name(.)='command'"> <xsl:text> </xsl:text>
<xsl:value-of select="concat('cmd_',.)"/>
<xsl:call-template name="checkAttribute">
<xsl:with-param name="attributeList"
<xsl:with-param name="input" select="name(.)"/>
<xsl:with-param name="value" select="."/>
<xsl:text disable-output-escaping="yes">/></xsl:text>

Please guide me. and respond me soon.

Thanks in advance
Bear Bibeault
Author and ninkuma
Posts: 66152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!