docbook

XSLT apply-templates in for-each

拥有回忆 提交于 2021-01-29 19:01:26
问题 I'm trying to write a simple XHTML to Simple Docbook translator (the input XHTML is a limited subset so it should be doable). I have this: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" encoding="UTF-8" indent="yes" omit-xml-declaration="yes" standalone="no"/> <!-- <xsl:strip-space elements="*"/> --> <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()" /> </xsl:copy>

DITA 已死

末鹿安然 提交于 2021-01-18 22:53:01
最近在整理历史的研究文档的时候发现了还保有了一些有关 DITA 的文档。 随着技术的发展,DITA 显得非常臃肿了,并且编译处理并不是非常友好。 查询了下官方的版本历史: 已经有差不多 2 年没有更新了,由此看来 DITA 作为文档交付应该已经是日薄西山了。应该没有什么人通过写 XML 的方式来写文档了。 相反,MD 和 AsciiDoc 格式的文档却大行其道。 其主要原因是能够随意部署,并且文档结构少,约束少,更加容易写作和阅读。 作为文档来说,内容是最主要的,格式相对来说没有那么重要,如果有漂亮的格式,但是内容一团糟,又怎么会有人去看和使用呢。 回想一下曾经用过的 DITA,编译太复杂,PDF 生成问题太多,CHM 格式的文档很多时候大家都不愿意用,更多的都在使用 Github 上来写 MD 格式。 DITA 已死,就此留念。 超级复杂的文档格式。 因为是基于 XML 的,每一个段落的创作都非常复杂,你还需要考虑复杂的 XML 标签。让写作不是一种享受,简直是一种折磨。 相对 MD 格式就让人舒服多了,你只需要关注一些常用的标记,其他的都是以内容为主。 比如说 Discourse 这个社区使用的 MD 格式就非常简单,能够让所有人更多的关注内容而不是标记。 不管怎么样, DITA 也代表了人类文明出版中的小缩影。 https://www.ossez.com/t/dita

Convert Ant build file to Makefile

馋奶兔 提交于 2020-01-14 04:07:33
问题 I have Ant build file which is used in Docbook. Now I am going to convert that Ant build file to a Makefile which uses Xsltproc processor. I am not particularly familiar with either Makefile or Ant. So please help me to convert it. Are there any resources which I should follow? Here I want to, 1. copy folder structure and its content into another folder 2. configure java system properties 3. configure classpath In ant script, it has code like this, <copy todir="${output-dir}"> <fileset dir="$

Is there a better method than <!ENTITY> to reuse a complicated table in DocBook?

两盒软妹~` 提交于 2020-01-04 15:14:13
问题 Consider the DocBook article in test.xml which contains an <informaltable> that is repeated at the beginning of each section. Consider also that the <informaltable> is actually much more complicated than this example shows. This example accomplishes reuse of the complicated <informaltable> using an external <!ENTITY ... SYSTEM ...> declaration. The complicated <informaltable> is in another file called reusedtable.xml. test.xml <!DOCTYPE article [<!ENTITY ReusedTable SYSTEM "reusedtable.xml">]

Creating documentation with maven

纵饮孤独 提交于 2020-01-01 09:32:31
问题 I'm just in the middle of revisiting maven. Our team had a bad experience when we last looked at this, as it was during the period when maven was rearchitecting from 1.x to 2.x, so a lot of the dependencies we needed hadn't been moved across to the new repositories. However, I have the time to reconsider now. I am interested in using maven and either LaTeX or DocBook for creating documentation, and I was wondering if anyone had any experiences to share, project/module structure, good plugins

best way to implement custom pretty-printers

坚强是说给别人听的谎言 提交于 2019-12-31 18:42:50
问题 Customizing pprint.PrettyPrinter The documentation for the pprint module mentions that the method PrettyPrinter.format is intended to make it possible to customize formatting. I gather that it's possible to override this method in a subclass, but this doesn't seem to provide a way to have the base class methods apply line wrapping and indentation. Am I missing something here? Is there a better way to do this (e.g. another module)? Alternatives? I've checked out the pretty module, which looks

best way to implement custom pretty-printers

本秂侑毒 提交于 2019-12-31 18:41:53
问题 Customizing pprint.PrettyPrinter The documentation for the pprint module mentions that the method PrettyPrinter.format is intended to make it possible to customize formatting. I gather that it's possible to override this method in a subclass, but this doesn't seem to provide a way to have the base class methods apply line wrapping and indentation. Am I missing something here? Is there a better way to do this (e.g. another module)? Alternatives? I've checked out the pretty module, which looks

Block Image Right and Flow Text Around It?

会有一股神秘感。 提交于 2019-12-29 08:08:28
问题 I'm working with DockBook 4.5 and Apache FOP 1.1 on Ubuntu 13.04. The Docbook translation are provided by Ubuntu and FOP was downloaded directly from Apache. Would someone please tell me how to insert an image on the right of a paragraph, where the paragraph has text, too? Bonus points if scaling works (think: thumbnail). For example: xxx xxx xxx xxx +---------------+ xxxxxx xx xxx | | xxxx xxxxx xxxxx | Image | xxx xxxx xxx | | xxx xxx xxxx xxx +---------------+ xxxxx xx xxx xxxx xxxxxx xx

Detecting table element error in docbook 5.0 document

断了今生、忘了曾经 提交于 2019-12-25 08:29:37
问题 I did not have much luck to have a complete answer in my previous post. So I am trying yet again with a different approach. How would one detect the error in the following docbook article with table: $ cat article.xml <?xml version="1.0" encoding="utf-8" standalone="no"?> <article xmlns="http://docbook.org/ns/docbook" version="5.0"> <title>Title</title> <table> <caption>caption</caption> <tbody> <tr> <td rowspan="2"> <para>my para</para> </td> </tr> </tbody> </table> </article> Obviously

Failed to external entity “…/htmlhelp.xsl”

天涯浪子 提交于 2019-12-25 08:27:46
问题 I'm building a development version of Wireshark to create dissectors, following the tutorial found in their official documentation I receive two warnings and four errors. The four errors seems to come from the fact this link cannot be loaded. The errors are: Build FAILED. "C:\Development\wsbuild64\Wireshark.sln" (default target) (1) -> "C:\Development\wsbuild64\docbook\developer_guide_chm.vcxproj.metaproj" (default target) (15) -> "C:\Development\wsbuild64\docbook\developer_guide_chm.vcxproj"