我对 Xinclude 或作为实体包含文件有疑问。我需要知道,解析器包含了哪些文件。例子:
<?xml 版本="1.0" ?>
<!DOCTYPE docBookChapter [
<!ENTITY externalFile SYSTEM "entityIncluded.xml">
]>
<章节 xmlns="http://www.w3.org/1999/xhtml"
xmlns:xi="http://www.w3.org/2001/XInclude">
<title>第三章</title>
<xi:include href="xIncluded.xml"/>
<章节>
&externalFile;</chapter>
</章节>解析器成功创建 DOM,但如何获取包含的文件名?该元素xi:include已替换为文件的内容。