Hi Byomokesh
The using regex here is too heavy here. You need something like
tokenize().
Wednesday, January 24, 2007, 1:57:20 PM, you wrote:
B> Hi All,
B> I am facing Regex problem. Here is my input, output and Stylesheet.
B> My Input
B> =======
B> <P>Todo pasa y todo queda,
B> pero lo nuestro es pasar,
B> pasar haciendo caminos,
B> caminos sobre el mar.
B>
B> Nunca persequ la gloria,
B> ni dejar en la memoria
B> de los hombres mi canción;
B> yo amo los mundos sutiles,
B> ingrvidos y gentiles,
B> como pompas de jabn.
B> </P>
B> I Need Output
B> =============
B> <poem>
B> <stanza>
B> <line>Todo pasa y todo queda,</line>
B> <line>pero lo nuestro es pasar,</line>
B> <line>pasar haciendo caminos,</line>
B> <line>caminos sobre el mar.</line>
B> </stanza>
B> <stanza>
B> <line>Nunca persequ la gloria,</line>
B> <line>ni dejar en la memoria</line>
B> <line>de los hombres mi cancin;</line>
B> <line> yo amo los mundos sutiles, </line>
B> <line> ingrvidos y gentiles, </line>
B> <line> como pompas de jabn. </line>
B> </stanza>
B> </poem>
B> My XSL
B> ======
B> <xsl:template match="P">
B> <xsl:analyze-string select="." regex="[^-a-z]+.[a-z] ">
B> <xsl:matching-substring>
B> <line>
B> <xsl:value-of select="."/>
B> </line>
B> </xsl:matching-substring>
B> <xsl:non-matching-substring>
B> <xsl:value-of select="."/>
B> </xsl:non-matching-substring>
B> </xsl:analyze-string>
B> </xsl:template>
B> My output is not properly. I am missing in regex expression. Please any
B> advice how catch every line and enter space.
B> Thanks and Regards
B> Byomokesh
B> --~------------------------------------------------------------------
B> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
B> To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
B> or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
B> --~--
--
Alexey mailto:nikolaenkov(_at_)actimind(_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>
--~--