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

"Line"-Tokenizing at <br/> in xhtml

Subject: "Line"-Tokenizing at <br/> in xhtml
From: Georges Schmitz <georges.schmitz@xxxxxxxxx>
Date: Tue, 07 Nov 2006 14:47:07 +0100
 "Line"-Tokenizing at <br/> in xhtml
Tokenizing a string at LFs and putting <br/> in  place of them is well
known to me (in XSLT2.0), but for the moment I'm stuck with the other
way round.

I have something like this (xhtml):

    <p>blabla blabla <br/>
    blabla blabla blabla <br/>
    blabla <b>blabla</b> blabla <br/>
    blabla blabla blabla</p>

I need to have access to every single "line" (terminated by <br/>),
preserving the mixed content of the lines.

   1. The tokenize() function as well as the analyze-string method only
      operate on strings, not on mixed content.
   2. <for-each select=".//text()"> (just posted some days ago) doesn't
      work because of line 3, and
   3. <xsl:for-each select="br">
        <xsl:value-of select="preceding-sibling::text()[1]"/>
      </xsl:for-each>
      a) doesn't work because of line 3
      b) I would have to fetch the last line separately

Thanks for any advise,
Georges Schmitz

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.