xsl-list
[Top] [All Lists]

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

2016-06-21 09:42:16
I dont want any magic in the form of heuristics.


Adam


On 06/21/2016 01:59 AM, Flynn, Peter pflynn(_at_)ucc(_dot_)ie wrote:
On 21/06/16 04:42, adam adam@coko.foundation wrote:
thanks, I know the PKP project and mentioned it in an earlier post. I'm
not looking to adapt that approach.

Rather I am looking to convert docx to HTML with xsl. 
I am assuming that you mean "docx with no named styles" here. That is,
the Word document is a sequence of undistinguished paragraphs, and the
only clue to their function (headings, etc) is in the fonts and spacing
that they use (with minimal help wrt list items).

No magic involved.
If the above is true, then you *will* need some magic, in the form of
heuristics expressed in XSLT, to guess the function from the OOXML.

Iff, on the other hand, there are some named styles involved (even just
the Word built-in set), then a reasonable "good-enough" conversion can
be obtained with minimal effort: install a new copy of Word, note down
the names of the default styles available, and write a template for each.

Good enough HTML is good enough. 
<xsl:template match="w:p">
  <p>
    <xsl:apply-templates/>
  </p>
</xsl:template>

I was looking for someone to help me
build this as well structured stylesheets that can be extended later.
There is an extensive set of XSLT2 stylesheets which my university uses
in their on-site hosted journals. They are migrating the journals to
OJS, so this code will become redundant, and I am sure they would be
amenable to share it if requested. It is, however, highly specific to
the set of named styles used by the journals, so it would need extensive
paring-back if you wanted it to function as a generic transformation.

<plug>
It may be useful to know that many of the techniques involved are
covered in various sessions at the XML Summerschool in Oxford in Sept.
</plug>

///Peter


-- 

---
Adam Hyde
http://www.adamhyde.net/projects
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>