Subject: [xsl] replace a word From: T Uma Shankari <umashankari@xxxxxxxxxxxxxxxxxxxx> Date: Tue, 6 Dec 2005 14:18:46 +0530 (IST) |
{sub}2{/sub}Option1{sub}5{/sub}</opt>
<opt ptno="1" mgif1="" mgif="" " misc="" >Option2</opt> <opt ptno="1" mgif1="" mgif="" " misc="" >Option3</opt> <opt ptno="1" mgif1="" mgif="" " misc="" >Option4</opt> </question>
xsl:template match="question" name="main"> <xsl:for-each select="self::question"> <xsl:variable name="stringques1"> <h1><b><xsl:value-of select="opt" /></b></h1> </xsl:variable>
<xsl:variable name="stringques2"> <xsl:choose> <xsl:when test="(contains($stringques1,'{sub}'))"> <xsl:value-of select="substring-before($stringques1,'{sub}')"/> <sub> <xsl:value-of select="substring-before(substring-after($stringques1,'{sub}'),'{/sub}')"/> </sub> <xsl:value-of select="substring-after($stringques1,'{/sup}')" /> </xsl:when> <xsl:otherwise> <xsl:value-of select="$stringques1"/> </xsl:otherwise> </xsl:choose> </xsl:variable> </xsl:for-each> </xsl:template> </xsl:stylesheet>
regards uma
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] wordml to docbook (sect1-, Silvia Liberto | Thread | Re: [xsl] replace a word, Kamal Bhatt |
RE: [xsl] Generating Unique ID, Ragulf Pickaxe | Date | RE: [xsl] Generating Unique ID, Arun Sinha |
Month |