xsl-list
[Top] [All Lists]

Re: [xsl] transform html h1 with a div

2012-10-26 03:21:31
thanks for your answers Martin!

I will test the link that you suggest.

I've also found this one that works

http://www.xmlplease.com/xhtml/xhtml-hierarchy

but this xslt required some prerequisites:

* There can only be one h1, and it must be the first heading.
* The first heading after h1 must be h2.
* The first heading after h2 must be h2-h3.
* The first heading after h3 must be h2-h4.
* The first heading after h4 must be h2-h5.
* The first heading after h5 and h6 must be h2-h6.

Unfortunately I must work on fragment too, and I don't have control on
XML source so:

* The higher h* level can be any of h1, h2, ... h6 (but this is not a
great problem)
* Not all the intermediate levels are present  (i.e. I can have a h1
followed by a h3)

Thus, basically, a conservative approach is to consider a section
starting from a given Hx and
ending to the next Hy, where y>=x. And all the intermediate Hz (with
z<x) must be processed in same way...


-- 

Giuseppe Briotti
g(_dot_)briotti(_at_)gmail(_dot_)com

"Alme Sol, curru nitido diem qui
promis et celas aliusque et idem
nasceris, possis nihil urbe Roma
visere maius."
(Orazio)

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