[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: HTML section headings to XML document sections

Subject: RE: HTML section headings to XML document sections
From: "Beckers, Marc" <Marc.Beckers@xxxxxxxxxxxxxx>
Date: Thu, 9 Aug 2001 10:14:02 +0200
RE:  HTML section headings to XML document sections
Hi Michael,

....
> So the question is how to know each time a <hx> (h1, h2, h3, ...) element
> is encountered what are the "open h" levels less than or equal to that
> of the current element, so that we can "close" them. In particular, before
> exiting the document we should also close the complete hierarchy
correctly.

I recently faced the same problem as you, 
but expedience being the better of elegance, 
I choose a quick and dirty route (since it was
a one-off under pressure of time):
I ran an XSLT stylesheet for each H* level,
meaning 4 or 5 conversions, each conversion run
using the output of the previous run,
thus adding one level in each run.
A hierarchy level is added simply by adding
tags as text in the right places.....
Then, it's easy. As I say, not very elegant,
but it worked.
The HTML must be consistent within itself, of course,
but that would also apply to an elegant solution
with some super-duper top-notch recursive XSLT:
if someone used an H4 because he wanted bold text,
you'll probably get an invalid result.

If you're interested, contact me off-line.

Cheers -- Marc
Dr. Marc Beckers
Documentation Consultant
Software AG
Uhlandstraße 12
D-64297 Darmstadt
Phone +49-6151-92-1322
Fax              -1612
mailto:Marc.Beckers@xxxxxxxxxxxxxx
http://www.softwareag.com


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.