|
Subject: Re: [xsl] odf2xhtml: Processing nested element content seperatly ? From: Abel Braaksma <abel.online@xxxxxxxxx> Date: Sat, 28 Oct 2006 02:12:04 +0200 |
ODF has a different approach to lining out text than HTML. HTML is sensible: Within html:p there may be no other block-elements. Only inline-elements are allowed. The same is valid for inline elements (ie: html:span, html:img, html:a). They may contain no block-elements (html:div, html:h*, etc.)
I also have no clue as to what technique to use in order to get the <text:p> and the <draw:frame> correct. In HTML the only element, that would match a draw-frame would be a <div>, but a <div> is not allowed within <p>. So, for the ODF this is perfectly fitting, also it is perfectly legal to have an <img> within a <p> in HTML, but as soon we get the frame, there seems to be a problem.
I would be very glad if someone would know of a solution, since right now, I make all a <div> and this is surley not, how HTML should be marked up.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Webitor Compatibility Tests Home</title>
<style type="text/css">
p {margin-left: 2em;}
div p {margin-left: 4em;}
span {display: block; margin: 120px;}
</style>
</head>
<body class="compat">
<p>
Opening P with some text to make it a P....
</p>
<div>
<p>
This paragraph is inside the parent P,
even though the DOM tree shows differently, and it retains
its semantics of being a paragraph.
</p>
</div>
<p>
... and here continues the text of the
original P again. Looks a bit like a
blockquote, this way, doesn't it?
</p>
</body>
</html>Cheers, -- Abel Braaksma http://www.nuntia.com
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] odf2xhtml: Processing nes, Andreas M. | Thread | Re: [xsl] odf2xhtml: Processing nes, Andreas M. |
| Re: [xsl] odf2xhtml: Processing nes, David Carlisle | Date | Re: [xsl] filtering data, Abel Braaksma |
| Month |