将 phpdoc 与现有 docbook 相结合

发布于 2024-09-05 07:05:37 字数 562 浏览 4 评论 0 原文

我想将一些 phpdoc 生成的文档包含到我已有的 docbook 文档中。

我的想法是让 phpdoc 生成 docbook 格式的文档,然后使用 XInclude 导入其中的部分内容(基于包和子包)。我使用 Docbook 5 作为我的文档。有什么办法可以实现这一点吗?


到目前为止我尝试的是使用 XML:DocBook/peardoc2:default 作为 phpdoc 参数生成文档。

PHPDocumentor 的 docbook 分为几个文件 - 这很好,但这些文件看起来像这样

<chapter id="package.default">
<title>default</title>
&package.default.default;
&package.default.foobar;
</chapter>

据我了解,这些是外部实体,但需要在 DTD 中引用它们 - 这使得它们对我的工作毫无用处,因为没有 DTD由 phpdoc 生成,我不想手动包含每个类和方法的文件。

I'd like to include some phpdoc-generated documentation into my already existing docbook documentation.

My idea was to let phpdoc generate the documentation in the docbook-format and then import parts (based on packages and subpackages) of it using XInclude. I'm using Docbook 5 for my documentation. Is there any way to achieve this?


What I tried this far is generating a docbook using XML:DocBook/peardoc2:default as phpdoc parameter.

PHPDocumentor's docbook is divided into several files - thats great, but the files look something like this

<chapter id="package.default">
<title>default</title>
&package.default.default;
&package.default.foobar;
</chapter>

As far as I understand those are external entities, but they need to be referenced in a DTD - making them useless for my effort, as there is no DTD generated by phpdoc and I don't want to include a file for every class and method by hand.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一袭白衣梦中忆 2024-09-12 07:05:37

首先,如果这确实应该是 docbook 5,那么您需要在“id”之前添加“xml”,如下所示:

<chapter xml:id="package.default">

其次,您可以使用 XML 目录来保存所有实体引用: http://www.sagehill.net/docbookxsl/Catalogs.html

First, if this is really supposed to be docbook 5, you need "xml" before "id" like this:

<chapter xml:id="package.default">

Second, you could use an XML Catalog to hold all your entity references: http://www.sagehill.net/docbookxsl/Catalogs.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文