Page 1 of 1

HTML to Docbook

Posted: Sat Nov 04, 2006 5:45 pm
by nraxz
Does anyone have any idea how to transform HTML document to the DocBook DTD using javascript. is there another way to do it pls let me know

pls click on the following links to see an example of HTMl document that is needed to be translate into DocBook DTD.

Html file ... /html.html
DocBooK ... cbook.html

thank you.

Posted: Mon Nov 06, 2006 11:58 am
by george

Converting XHTML to DocBook is not generally possible (in an automatic way).

Best Regards,

is there any possible way to do so?

Posted: Mon Nov 06, 2006 12:59 pm
by nraxz
may be there's not any automatic way but would you tell me any way to do so if you know?

Posted: Mon Nov 06, 2006 1:49 pm
by george
Manually :). Start with the XHTML document, delete and rename tags until you end up with DocBook.
If you have some operations that you know you want to have them performed all the time, on any document that you convert then you can write an XSLT stylesheet to do that processing. In general you can start with a default copy template

Code: Select all

    <xsl:template match="node() | @*">
<xsl:apply-templates select="node() | @*"/>
and add your specific processing rules.

Best Regards,

Re: HTML to Docbook

Posted: Sat Feb 23, 2013 4:48 am
by P4jjb
Hi all,

Is this answer from 2006 still true for 14.2 oXygen?
If I want to convert XHTML to DocBook 5, do I have to manually edit the XHTML tags to DocBook tags?


Re: HTML to Docbook

Posted: Sun Feb 24, 2013 1:18 am
by george
You can copy and paste from a browser to a DocBook 5 file and if that is open in the Author editing mode then oXygen will trigger its smart paste conversion to DocBook5 ... pport.html

Hope this helps!

Re: HTML to Docbook

Posted: Mon Feb 25, 2013 8:57 pm
by P4jjb
Thanks so much, George! :D
I either missed this topic or entered the wrong search parameters when I was looking through the Help.