DocBook vs. HTML - difference

倾然丶 夕夏残阳落幕 提交于 2019-12-12 04:36:26

问题


What is practical difference between HTML5 and DocBook?

By the word "practical" I mean differences in workflow.

This question is about difference. I'm not asking what is better. So, this question is about the facts, and so, I hope it would not be closed as opinion-based.


回答1:


DocBook separates the content and its formatting.

With single XML source you can produce:

  1. Various flavors of the same format
    • Single HTML page
    • Set of HTML pages with TOC, breadcrumbs, back of the book index
  2. Output in different style (for e.g. divisions withing same company)
    • different logo, colors, font, legal notice, copyright
  3. Output for different audience
    • if properly set, you can produce either public or internal content from the same source

All this is possible thanks to XSLT processing step.

Imagine e.g. footnotes. In HTML you have to add the number, in the footer the rule and the footnote content. It is helpful to the user to create links between the two. In DocBook it is sufficient to wrap the footnote content into a dedicated element. All the related stuff is generated via XSLT.

In case of HTML the appearance tweaks are limited to CSS only. While the structure can be changed as well, via JavaScript, it is not very practical.

If only simple documents are produced, targeted for single page HTML output, DocBook (generating workflow) brings another level of complexity. On the other hand, with DocBook you can deliver any output you like (for advanced ones you can hire an XSLT developer).



来源:https://stackoverflow.com/questions/42639079/docbook-vs-html-difference

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!