我正在为XML创建一个XSD用于验证,但它给我返回以下验证错误:
$ 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">
在这里是我的验证XSD:
https://gist.github.com/paulodiovani/eb287e24de7be99a2263
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="simulado"
xmlns:doc="simulado"
elementFormDefault="qualified">