【发布时间】:2014-05-15 20:27:39
【问题描述】:
我正在创建一个 XSD 来验证 XML,但它给了我以下验证错误:
$ xmllint --noout --schema imoveis.xsd imoveis.xml
imoveis.xml:2: element alugueis: Schemas validity error : Element '{http://www.w3.org/2001/XMLSchema-instance}alugueis': No matching global declaration available for the validation root.
imoveis.xml fails to validate
不知道我忘记了什么。
这是我的 XML:
<alugueis xmlns="http://www.w3.org/2001/XMLSchema-instance"
noNamespaceSchemaLocation="imoveis.xsd"
mes="outubro" ano="2012">
https://gist.github.com/paulodiovani/eb287e24de7be99a2263
这里是我的验证XSD:
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="simulado"
xmlns:doc="simulado"
elementFormDefault="qualified">
【问题讨论】:
标签: xml validation xsd