Page 1 of 1

Transformation to html ul/li

PostPosted: Tue Jul 12, 2011 9:32 am
by billbruyn
Had a look at the docx4j stylesheet at http://dev.plutext.org/svn/docx4j/trunk/docx4j/src/main/java/org/docx4j/convert/out/html/docx2xhtmlNG2.xslt where I find the following comment :

At present, this doesn't use HTML OL|UL and LI; we'll do that when we have a document model to work from


I kind of have to have this, and while I feel reasonably comfortable with writing my own xsl I am wondering if there's more to this than it seems there should be? Anything I should be watching out for?

Re: Transformation to html ul/li

PostPosted: Wed Jul 13, 2011 2:22 am
by jason
You'll need to distinguish between lists/list levels, which means looking at the numbering properties.

It may be convenient to have the lists represented by appropriate nested XML containers by the time you get to XSL processing (cf the flat paragraphs). Well, this is the nub of the problem .. do you want to do it in Java code, or in XSLT?

We do something similar to create section containers prior to invoking XSLT for PDF output. See createSectionContainers in org.docx4j.convert.out.pdf.viaXSLFO.Conversion