xsl-list
[Top] [All Lists]

Re: [xsl] Problem in Poem

2007-02-07 05:52:09
Byomokesh,

Did you miss the original answers you received a couple of weeks back, where you asked exactly the same question? http://www.stylusstudio.com/xsllist/200701/post30500.html

Please follow-up with what the problems were with my, Michael's or Alex's solution. Did you try them? Little in your attempt below resembles their posts.

One question: looking at your code, you seem to try to select lines by position (i.e., fixed width matching). Why is that? It is usually better, with regular expressions to say what you do *not* wish to match. I.e., if you want to grab a line, specify all that is not a line: [^\n\r]+ etc.

-- Abel


Byomokesh wrote:
Here is my XSLT
===============

<xsl:template match="P">

   <poem>
      <xsl:for-each select="tokenize(., '&#xA;')">
<xsl:text>&#xa;</xsl:text>
<xsl:analyze-string select="normalize-space(.)" regex=".{{1,80}}(\s|$)">

    <xsl:matching-substring>
      <line><xsl:value-of select="."/></line>
    </xsl:matching-substring>
    <xsl:non-matching-substring>
        <xsl:value-of select="."/>
    </xsl:non-matching-substring>
  </xsl:analyze-string>

  </xsl:for-each>
</poem>
  </xsl:template>


In my XSL files output only line coding. But I m not success to stanza
coding. anyone help


--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>