DocBook与HTML - 差异 [英] DocBook vs. HTML - difference

查看:532
本文介绍了DocBook与HTML - 差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



实际一词是指工作流程的差异。



这个问题是关于差异。我不是问什么更好。所以,这个问题是关于的事实,所以我希望它不会因为基于意见的而被关闭。

解决方案

DocBook分离内容及其格式。



来源可以产生:


  1. 各种口味的相同格式


    • 单个HTML页面

    • 设置具有TOC,面包屑,HTML索引的HTML页面


  2. 不同风格的输出(例如与同一公司的分部)


    • 不同的标志,颜色,字体,法定通知,版权


  3. 不同受众群体的输出


    • 如果设置正确,您可以生成公共或内部内容来自相同的来源


所有这一切都可以通过XSLT处理步骤。



脚注。在HTML中,您必须在脚注中添加该数字,并在脚注中添加脚注内容。用户创建两者之间的链接是有帮助的。在DocBook中,将脚注内容包装到专用元素中就足够了。所有相关的东西都是通过XSLT生成的。



如果是HTML,外观调整仅限于CSS。虽然结构也可以通过JavaScript进行更改,但并不实用。



如果仅生成简单文档,针对单页HTML输出,DocBook(生成工作流程)带来了另一个复杂程度。另一方面,使用DocBook,您可以提供任何您喜欢的输出(对于高级用户,您可以雇用XSLT开发人员)。


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.

解决方案

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).

这篇关于DocBook与HTML - 差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆