我有这些 XML 文件:
master.xml (which uses XInclude to include child1.xml and child2.xml)
child1.xml
child2.xml
两者都child1.xml包含child2.xml一个<section>带有一些文本的元素。
在 XSLT 转换中,我想添加<section>元素来自的文件的名称,所以我得到如下内容:
<section srcFile="child1.xml">Text from child 1.</section>
<section srcFile="child2.xml">Text from child 2.</section>
如何检索值child1.xml和child2.xml?