我正在使用这个[1] XML Schema 来验证带有 xmllint 的 XML 文档:
xmllint --noout --schema mets.xsd metadata.xml
验证失败
metadata.xml:55: element object: Schemas validity error : Element '{info:lc/xmlns/premis-v2}object', attribute '{http://www.w3.org/2001/XMLSchema-instance}type': The QName value '{info:lc/xmlns/premis-v2}file' of the xsi:type attribute does not resolve to a type definition.
metadata.xml:55: element object: Schemas validity error : Element '{info:lc/xmlns/premis-v2}object': The type definition is absent.
metadata.xml 中的第 55 行:
<premis:object xsi:type="premis:file" xsi:schemaLocation="info:lc/xmlns/premis-v2 http://www.loc.gov/standards/premis/v2/premis-v2-0.xsd">
但是,有一个我想要的示例文档。它位于此处[2]。
当我根据架构验证此示例时,会发生相同的验证错误。
louis-2-0.xml:80: element object: Schemas validity error : Element '{info:lc/xmlns/premis-v2}object', attribute '{http://www.w3.org/2001/XMLSchema-instance}type': The QName value '{info:lc/xmlns/premis-v2}file' of the xsi:type attribute does not resolve to a type definition.
louis-2-0.xml:80: element object: Schemas validity error : Element '{info:lc/xmlns/premis-v2}object': The type definition is absent.
我错过了什么?