[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Problem in Poem

Subject: Problem in Poem
From: "Byomokesh" <bkesh@xxxxxxxxxxxxxxx>
Date: Wed, 7 Feb 2007 16:00:23 +0530
 Problem in Poem
Hi All,

I have a big problems in poem coding.

My Input
========

  Todo pasa y todo queda,
  pero lo nuestro es pasar,
  pasar haciendo caminos,
  
  Nunca persequ&#237; la gloria,
  ni dejar en la memoria
  de los hombres mi canci&#243;n;
    
  Me gusta verlos pintarse
  de sol y grana, volar
  bajo el cielo azul, temblar
  s&#250;bitamente y quebrarse...

I need Output
=============
<poem>
<stanza>
<line>Todo pasa y todo queda,</line>
<line>pero lo nuestro es pasar,</line> 
<line>pasar haciendo caminos,</line>
</stanza>
<stanza> 
<line>Nunca persequ la gloria,</line>
<line>ni dejar en la memoria</line>
<line>de los hombres mi cancin; </line>
<line>ni dejar en la memoria</line>
 </stanza>
</poem>

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

Thanks and Regards
Byomokesh

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.