xsltproc开关没有遍历到xi:included文件

时间:2017-04-09 06:03:27

标签: xml xslt systemd man

我一直在尝试在基于LFS的系统上编译systemd,并且在创建手册页时遇到了问题。 有多个文件存在问题,但我将特别关注一个,因为应该是一个解决方案 很容易推断。

测试所需的文件(我知道):

busctl.xml
user-system-options.xml
custom-man.xsl
standard-options.xml

注意:我无法找到如何附加文件,但可以从中检索它们        https://github.com/systemd/systemd所有文件都在man目录中

正在执行的代码如下:

xsltproc --nonet --xinclude --stringparam systemd.version 233 \
custom-man.xsl busctl.xml

执行上述操作后,我收到:

I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd
busctl.xml:3: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
                                                         ^
I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
user-system-options.xml:3: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
          "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
                                                                   ^
busctl.xml:241: element include: XInclude error : could not load user-system-options.xml, and no fallback was found
busctl.xml:242: element include: XInclude error : could not load user-system-options.xml, and no fallback was found
busctl.xml:243: element include: XInclude error : could not load user-system-options.xml, and no fallback was found
busctl.xml:244: element include: XInclude error : could not load user-system-options.xml, and no fallback was found
I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
standard-options.xml:3: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
          "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
                                                                   ^
busctl.xml:246: element include: XInclude error : could not load standard-options.xml, and no fallback was found
busctl.xml:247: element include: XInclude error : could not load standard-options.xml, and no fallback was found
busctl.xml:248: element include: XInclude error : could not load standard-options.xml, and no fallback was found
busctl.xml:249: element include: XInclude error : could not load standard-options.xml, and no fallback was found

因此收到的第一个错误/警告是与busctl.xml文件本身有关 以及我们使用--nonet开关的事实。这很容易 通过添加--novalid开关删除。如上所述,如果出现以下错误 如果不存在,则此错误/警告不会妨碍手册页的构建。 我已经通过对文件中没有ix:include stanzas的文件执行相同的命令来测试它。

以下是busctl.xml文件中的违规行:

  <xi:include href="user-system-options.xml" xpointer="user" />
  <xi:include href="user-system-options.xml" xpointer="system" />
  <xi:include href="user-system-options.xml" xpointer="host" />
  <xi:include href="user-system-options.xml" xpointer="machine" />
  <xi:include href="standard-options.xml" xpointer="no-pager" />
  <xi:include href="standard-options.xml" xpointer="no-legend" />
  <xi:include href="standard-options.xml" xpointer="help" />
  <xi:include href="standard-options.xml" xpointer="version" />

所以我的问题是这个,我怎样才能获得上面包含的文件 也使用--nonet(和可能的--novalid)开关 停止错误并允许创建手册页?

如果有任何进一步的细节可能有助于回答,请告诉我?

0 个答案:

没有答案