Cyriaque Dupoirieux wrote:
Don't know if you still need it...

   http://html2xhtml.richarea.com/demo/

I do still need it, but it is html to XHTML2 that I need. The hard part is sorting out the document hierarchy:

<h1>Heading 1</h1>

<p>blah</p>

<h2>Heading 1</h2>

<p>blah</p>

<h3>Heading 1</h3>

<p>blah</p>

Should become:

<section>
  <h>Heading 1</h>

  <p>blah</p>

  <section>
    <h>Heading 2</h>

    <p>blah</p>
  </section>
</section>

<section>
  <h>Heading 1</h>

  <p>blah</p>
</section>

Our html2document.xsl does a reasonable job of the above, but it breaks when the heading elements in HTML are not correctly ordered. For example:

<h1>
<h3>

Thanks for the Heads Up

Ross

Reply via email to