Re: HTML heading hierarchy for XHTML

My goal is -automated- conversion of many existing HTML documents to XHTML,
while taking advantage of XML to structure the relationship among headings.
Nested headings are valid XML, but not XHTML: sorry, I should have caught
that... but Tidy appears to be the right tool for the job.

Both of the nested "div" suggestions work acceptably in w3c's Amaya browser
-- thanks for the feedback. Conversion to "name"ed divs seems more direct
than "class"ified paragraphs, but I may be missing some other advantage. 

The question now is whether either of these solutions could be incorporated
into Tidy as an option?:


<!-- Courtesy of P. T. Rourke -->
<div name="sec1"><h1>First Order Heading</h1>
<p></p>
<div name="sec1.1"><h2>Second Order Heading</h2>
<p></p>
</div>
</div>

or

<!-- Courtesy of Jany Quintard (modified) -->
<div>
  <p class="heading">First Order Heading</p>
  <div>
    <p class="heading">Second Order Heading</p>
    ........
  </div>
</div>

I'd appreciate feedback on feasibility from anyone familiar with Tidy's
source code?

Thanks,
Marc

Received on Tuesday, 1 February 2000 11:22:59 UTC