Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] Convert html:br to paragraphs

From: "Michael Kay" <mike@------------>
To:
Date: 6/2/2005 3:10:00 AM
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: [xsl] 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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent