HTML to Docbook

This should cover W3C XML Schema, Relax NG and DTD related problems.
nraxz
Posts: 2

HTML to Docbook

Sat Nov 04, 2006 5:45 pm

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/~46103027-2/docbook/html.html
DocBooK http://webmail.padawan.shinawatra.ac.th/~46103027-2/docbook/docbook.html

thank you.
george
Site Admin
Posts: 2100

Mon Nov 06, 2006 11:58 am

Hi,

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

Best Regards,
George
George Cristian Bina
nraxz
Posts: 2

is there any possible way to do so?

Mon Nov 06, 2006 12:59 pm

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: 2100

Mon Nov 06, 2006 1:49 pm

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

Re: HTML to Docbook

Sat Feb 23, 2013 4:48 am

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: 2100

Re: HTML to Docbook

Sun Feb 24, 2013 1:18 am

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

Re: HTML to Docbook

Mon Feb 25, 2013 8:57 pm

Thanks so much, George! :D
I either missed this topic or entered the wrong search parameters when I was looking through the Help.

Return to “XML Schemas”

Who is online

Users browsing this forum: No registered users and 0 guests