Re: [xsl] where to look for xsl folk..

Subject: Re: [xsl] where to look for xsl folk..
From: "Graydon graydon@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 3 Jul 2016 15:14:01 -0000
On Tue, Jun 21, 2016 at 03:42:05AM -0000, adam adam@xxxxxxxxxxxxxxx scripsit:
> Rather I am looking to convert docx to HTML with xsl. No magic involved.
> Good enough HTML is good enough. I was looking for someone to help me
> build this as well structured stylesheets that can be extended later.

The really tough problem here is not "did I get good enough HTML?"; it's
"did any important bits of the text get lost during conversion?"  That
one's brutal.

The sanity-preserving way to do this is to use Libre Office to convert
the docx to Open Document and to go from Open Document XML. The Libre
Office "Save as HTML" facility is likely better than anything you can
write in reasonable time; I'd be looking to take that HTML and tidy it
to meet specific project requirements with XSLT.  (There are API hooks
for doing this in both OpenOffice and LibreOffice.  There are hooks for
applying XSLT as part of that process, too.)

I can't tell you what you want to do, but I desperately do not want to
address docx with XSLT directly, because then I, and not someone else,
will be trying to handle the encoding issues (since XML
I-think-version-five, the awkward cp1252 characters like 97 (em-dash) or
the smart quotes are legal XML characters, but they're not Unicode
anything; parsing won't find them for you anymore), the specific
peculiarities of an undocumented format intended (for sound commercial
reasons) to be nigh-impossible to convert to other formats, or the
various "it did what with the end notes? It displays end notes, where
are they in the file?" problems you can hit with academic writing.

-- Graydon

Current Thread