Ask Your Question
1

How do I export completely clean HTML5? [closed]

asked 2014-08-04 12:52:43 +0200

dcforeman gravatar image

updated 2014-08-04 12:53:49 +0200

Hi,

How do we go about removing any unnecessary styles from LibreOffice and export a pure HTML5 document? I have no interest in meta tags, additional styles, font tags for anything like that. I require a completely clean HTML5 export.

We need to do this because we're working with Moodle to bring an online course to the internet. We have a standard template for all course pages that work on an inheritance basis. When manually producing clean HTML5 ourselves we just drop it in, link the extra external CSS and it all works.

Being able to customise the way in which LibreOffice 4 exports HTML5 would save us lots of work. More importantly it's something microsoft word completely fails at.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2016-03-01 21:11:36.704102

1 Answer

Sort by » oldest newest most voted
1

answered 2014-08-04 14:09:45 +0200

Regina gravatar image

There exists no filter for export in non-styled HTML5, there is no filter for HTML5 at all. Currently all HTML export is to "HTML 4.0 Transitional". But have a look at the XHTML export filter. You find it in share/xslt/export/xhtml. If you really only want the document structure, you can make your own filter and add it in Tools > XML filter settings. I have not tested it, but it should be possible to create a HTML5 filter starting with the existing XHTML filter and remove all styling rules.

Or you use the XHTML filter directly and afterwards apply a script to adapt the result to HTML5: exchange the prolog, delete meta-Element, delete style-Element content and add css-import, remove class-attributes.

There might exist an extension or an online service for your task. Have you already look for such?

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-08-04 12:52:43 +0200

Seen: 2,546 times

Last updated: Aug 04 '14