我有静态 XSD 架构,我想用它来验证来自 OAI-PMH 端点的 XML 响应。
据说那里的模式已经过验证。
然而,当我尝试验证来自随机 OAI-PMH 端点的 XML 响应时,例如这个:
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="static/style.xsl"?>
<OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
<responseDate>2019-07-29T13:29:04Z</responseDate>
<request verb="Identify">https://repository.lib.ncsu.edu/oai/driver</request>
<Identify>
<repositoryName>NCSU Repository</repositoryName>
<baseURL>https://repository.lib.ncsu.edu/oai/driver</baseURL>
<protocolVersion>2.0</protocolVersion>
<adminEmail>kdbeswic@ncsu.edu</adminEmail>
<earliestDatestamp>2006-11-10T15:53:37Z</earliestDatestamp>
<deletedRecord>transient</deletedRecord>
<granularity>YYYY-MM-DDThh:mm:ssZ</granularity>
<description>
<oai-identifier xmlns="http://www.openarchives.org/OAI/2.0/oai-identifier"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai-identifier http://www.openarchives.org/OAI/2.0/oai-identifier.xsd">
<scheme>oai</scheme>
<repositoryIdentifier>repository.lib.ncsu.edu</repositoryIdentifier>
<delimiter>:</delimiter>
<sampleIdentifier>oai:repository.lib.ncsu.edu:1840.20/1234</sampleIdentifier>
</oai-identifier>
</description>
</Identify>
</OAI-PMH>
我得到这个例外:
org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1055; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'oai-identifier'.
....
我不知道为什么会发生这种情况,并且相关线程对我没有帮助。请帮我。