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

RE: Convert html:br to paragraphs

Subject: RE: Convert html:br to paragraphs
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 2 Jun 2005 04:09:48 +0100
html br
If the br elements are all at the top level you can do

<xsl:for-each-group select="child::node()" group-starting-with="br">
<p><xsl:copy-of select="current-group()[not(self::br)]"/></p>
</xsl:for-each-group>

If not, it's much harder.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: gregor FELLENZ [mailto:gf_public@xxxxxxx] 
> Sent: 01 June 2005 16:55
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Convert html:br to paragraphs
> 
> hello,
> 
> i have to convert <br/> structured html sites into documents with a
> paragraph structure.
> 
> that means:
> 
> <body>1. para is here <br/>
> 2. para is here and <b>bold</b> or another
> inline element </body>
> 
> has to be:
> 
> <p>1. para is here</p>
> <p>2. para is here and <b>bold</b> or another
> inline element</p>
> 
> any ideas? i've tried a little with for-each-group but did not get any
> solution.
> 
> maybe i google the wrong question but at the moment i'm helpless. i'll
> also happy with a link where i can help myself.
> 
> thanks in advance
> 
> gregor
> -- 
> enforce privacy - http://www.pgpi.org
> pgp key id: 0x7DBB8BA1 - http://pgp.mit.edu
> 
> mailto:gf_public@xxxxxxx
> Mittwoch, 1. Juni 2005 16:52

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.