HTML to XHTML (ant or command line)

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Nicolas
Posts: 12
Joined: Mon Jul 14, 2008 6:42 am

HTML to XHTML (ant or command line)

Post by Nicolas »

Hi,

I need to convert automatically a group of HTML files into XHTML 1.0 transitionnal. Using, the "Import HTML" as described here (http://www.oxygenxml.com/doc/ug-oxygen/import-html.html) gives me an output I can easily use.

However, I need to make this task automatic. Is there a way for me to transform my files using ant or the command line or do I need to use an external tool?

Thanks.

Nicolas
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: HTML to XHTML (ant or command line)

Post by sorin_ristache »

Hello,

You cannot transform a HTML document with an Oxygen action like Import HTML File from command line. You can use NekoHTML for transforming a HTML file to XHTML Transitional but if you want to use it from command line or from Ant you have to write a simple Java program that uses the API of NekoHTML.


Regards,
Sorin
Nicolas
Posts: 12
Joined: Mon Jul 14, 2008 6:42 am

Re: HTML to XHTML (ant or command line)

Post by Nicolas »

Thanks for the answer. I think we will use HTML Tidy as it does everything we want out of the box.

Cheers,
Hathi
Posts: 2
Joined: Mon Dec 12, 2011 8:43 pm

Re: HTML to XHTML (ant or command line)

Post by Hathi »

Hi Sorin,
What's the current status of HTML Import with Author 13.1? I can't see an File > Import HTML command, and this is exactly what I want: import an old personal site written in unclean HTML and have Oxygen clean it to neat XHTML (to create an ePub doc) in one go.
Your answers to the similar, previous posts date back to 2008, so I imagine they may have change now :D
Thanks,
- Hathi
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: HTML to XHTML (ant or command line)

Post by sorin_ristache »

Hi Hathi,

The Import HTML feature is available in version 13.1 from menu File -> Import -> HTML File, but it is a developer feature not an authoring (visual editing) one. Please install the Oxygen XML Developer product or the Oxygen XML Editor one for this feature. If you have the Oxygen XML Editor product please start the Editor application, not the Author one.


Regards,
Sorin
Post Reply