[xsl] Search text and write the code

Subject: [xsl] Search text and write the code
From: "Byomokesh Sahoo" <sahoo.byomokesh@xxxxxxxxx>
Date: Wed, 5 Sep 2007 14:46:17 +0530
Hi All,

I have some problem in my project. I need text or number search in
text and write the code. Is it possible through XSLT?


<o1item><emphasis style="b">1.1 Grundbegriffe</emphasis> <hotlink
xref="p0002" xidtype="page">2</hotlink></o1item>

XSL File

<xsl:template match="o1item">
<xsl:call-template name="labelstring">
                   <xsl:with-param name="Text" select="."/>

			<para><xsl:apply-templates /></para>

<xsl:template name="labelstring">
             <xsl:param name="Text"/>
                    <xsl:when test="contains($Text, ' ')">
                          <xsl:value-of select="substring-before($Text, ' ')" />



On the base my style sheet output is

<item><label>1.1</label><para><b>1.1 Grundbegriffe</b><xref

But I need output is..........

<item><b><label>1.1</label> <para>Grundbegriffe</b><xref

Please anyone suggest me what can i do.

Byomokesh Sahoo

Om Trayambakam Yajaamahe Sugandhim Pushtivardhanam
Urvaarukamiva Bandhanan Mrytor Muksheeya Mamritaat

Current Thread