鉴于以下文件
a.rnc:
start = a
a = element a { b }
b = element b {
attribute xml:id { xsd:ID }?,
attribute xml:base { xsd:ID }?,
empty
}
一个.xml:
<a xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="b.xml" xpointer="element(bid)"/>
</a>
b.xml:
<a><b xml:id="bid"/></a>
静为什么要报道
a.xml:1:97: warning: Include operation failed, reverting to fallback. Resource error reading file as XML (href='b.xml'). Reason: XPointer resolution unsuccessful.
a.xml:1:97: fatal: An 'include' failed, and no 'fallback' element was found.
当运行时
java -Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XIncludeParserConfiguration -jar jing.jar -c a.rnc a.xml
?
如果我将 xpointer 属性更改为element(/1/1)
它通过。
这是与jing.jar在同一目录下的xercesImpl.jar的20091111。