HTML to Docbook

This should cover W3C XML Schema, Relax NG and DTD related problems.
nraxz
Posts: 2
Joined: Sat Nov 04, 2006 5:25 pm
Contact:

HTML to Docbook

Post 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 http://webmail.padawan.shinawatra.ac.th ... /html.html
DocBooK http://webmail.padawan.shinawatra.ac.th ... cbook.html

thank you.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

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

Best Regards,
George
George Cristian Bina
nraxz
Posts: 2
Joined: Sat Nov 04, 2006 5:25 pm
Contact:

is there any possible way to do so?

Post by nraxz »

may be there's not any automatic way but would you tell me any way to do so if you know?
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post 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:copy>
<xsl:apply-templates select="node() | @*"/>
</xsl:copy>
</xsl:template>
and add your specific processing rules.

Best Regards,
George
George Cristian Bina
P4jjb
Posts: 32
Joined: Tue Dec 18, 2012 3:22 am

Re: HTML to Docbook

Post 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?

Thanks
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Re: HTML to Docbook

Post 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
http://www.oxygenxml.com/doc/ug-editor/ ... pport.html

Hope this helps!
George
George Cristian Bina
P4jjb
Posts: 32
Joined: Tue Dec 18, 2012 3:22 am

Re: HTML to Docbook

Post 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.
Post Reply