2011-02-26 44 views
1

鑑於以下文件爲什麼Jing沒有爲XInclude提取xml:id?

a.rnc:

start = a 
a = element a { b } 
b = element b { 
    attribute xml:id { xsd:ID }?, 
    attribute xml:base { xsd:ID }?, 
    empty 
} 

A.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與Jing的20091111。

回答