Joga,
you already got comments from Michael and me about CDATA.
What is interesting is that the correct statement appears in your code
snippet as comment (xsl:element).
Since I do not know what "......" is this is the solution not needing to
know that:
<xsl:variable name="temp">
......
</xsl:variable>
<xsl:choose>
<xsl:when test="self::p[matches(@class,'^Head[0-9]+$')]">
<xsl:element name="sc{$level}">
<xsl:copy-of select="$temp"/>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="$temp"/>
</xsl:otherwise>
</xsl:choose>
This will return
<sc1>
......
</sc1>
or just
......
depending on your if/above when outcome.
Mit besten Gruessen / Best wishes,
Hermann Stamm-Wilbrandt
Developer, XML Compiler
WebSphere DataPower SOA Appliances
----------------------------------------------------------------------
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschaeftsfuehrung: Dirk Wittkopp
Sitz der Gesellschaft: Boeblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
"Joga Singh
Rawat"
<jrawat(_at_)aptaracor To
p.com>
<xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
cc
12/04/2009 10:31
AM Subject
RE: [xsl] Group Techniques by xslt
Please respond to
xsl-list(_at_)lists(_dot_)mu
lberrytech.com
<xsl:element name="sc"><xsl:value-of select="$level"/></xsl:element>
==>I will return different result (<sc>1</sc>) but we need <sc1>...</sc1>.
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--