xsl-list
[Top] [All Lists]

RE: Convert html:br to paragraphs

2005-06-01 20:09:48
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(_at_)gmx(_dot_)net] 
Sent: 01 June 2005 16:55
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
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(_at_)gmx(_dot_)net
Mittwoch, 1. Juni 2005 16:52


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





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