• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

how to use String Function in XSL

Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • 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
    Bookmark Topic Watch Topic
  • New Topic