本文介绍了架构验证问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是XML和模式的新手,我正在努力弄清楚为什么给出了一个

模式,我不断在XMLSpy中抛出验证错误。

带问题的代码部分是:


<! - =============元素===== ======== - >

< element name =" conResults" type =" agsml:CongArrayType"

substitutionGroup =" agsml:_congProperty" />

<! - ========== === ComplexType ============= - >

< complexType name =" CongArrayType">

< complexContent>

< restriction base =" gml:FeatureArrayPropertyType">

< sequence>

< element ref =" agsml:_CongFeature" maxOccurs =" unbounded" />

< / sequence>

< / restriction>

< / complexContent>

< / complexType>

每当我尝试验证它时,XMLSpy会突出显示< complexType

name =" CongArrayType">标记并说:

" complexType的内容模型" agsml:CongArrayType"复杂类型的内容模型不是有效的

限制

" gml:FeatureArrayPropertyType"

大概这意味着那里

模式中的其他部分定义了gml:FeatureArrayPropertyType?这是正确的还是

上面的代码中有一个明显的错误我错过了吗?

我不能真正发布整个架构,因为它是一个集合这是几百行的7个/ b $ b架构!


谢谢

Stephen

I''m fairly new to XML and schemas and I''m trying to work out why a
schema I''ve been given keeps throwing up validation errors in XMLSpy.
The section of code with the problem is:

<!--============= Element =============-->
<element name="conResults" type="agsml:CongArrayType"
substitutionGroup="agsml:_congProperty"/>
<!--============= ComplexType =============-->
<complexType name="CongArrayType">
<complexContent>
<restriction base="gml:FeatureArrayPropertyType">
<sequence>
<element ref="agsml:_CongFeature" maxOccurs="unbounded"/>
</sequence>
</restriction>
</complexContent>
</complexType>
Whenever I try to validate it, XMLSpy highlights the <complexType
name="CongArrayType"> tag and says:
"The content model of complexType "agsml:CongArrayType" is not a valid
restriction of the content model of complexType
"gml:FeatureArrayPropertyType"

Presumably this means that there is an error elsewhere in the schema in
the part which defines gml:FeatureArrayPropertyType? Is this correct or
is there an obvious error in the above code which I have missed?
I can''t really post the whole schema because it''s a collection of 7
schemas which are hundreds of lines long!

Thanks
Stephen

推荐答案




这篇关于架构验证问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-22 17:58