xsl-list
[Top] [All Lists]

[xsl] "Line"-Tokenizing at <br/> in xhtml

2006-11-07 06:47:23
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


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