S
Sebastian Stein
Hi,
I have the following XSD file (XML Schema 1.0):
<xs:element maxOccurs="1" minOccurs="1" name="header">
<xs:complexType>
<xs:sequence>
<xs:element name="id" type="xsositiveInteger"/>
<xs:element name="name" type="xs:string"/>
<xs:element name="parentId" type="xsositiveInteger"/>
<xs:element name="parentName" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
As the name says this should be the header for some kind of element. As it is a
header, it should only occur in the XML document ones. Therefore I added the
minOccurs and maxOccurs attributes. However, the xsv online validation check
(http://www.w3.org/2001/03/webdata/xsv) says:
Invalid per cvc-complex-type.1.3: undeclared attribute {None}:maxOccurs
Invalid per cvc-complex-type.1.3: undeclared attribute {None}:minOccurs
So I guess I'm not allowed to use those attributes at this point. How should I
proceed to fix this but also to note that this element is only allowed to occur
exactly one time in the XML document?!
Sebastian
I have the following XSD file (XML Schema 1.0):
<xs:element maxOccurs="1" minOccurs="1" name="header">
<xs:complexType>
<xs:sequence>
<xs:element name="id" type="xsositiveInteger"/>
<xs:element name="name" type="xs:string"/>
<xs:element name="parentId" type="xsositiveInteger"/>
<xs:element name="parentName" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
As the name says this should be the header for some kind of element. As it is a
header, it should only occur in the XML document ones. Therefore I added the
minOccurs and maxOccurs attributes. However, the xsv online validation check
(http://www.w3.org/2001/03/webdata/xsv) says:
Invalid per cvc-complex-type.1.3: undeclared attribute {None}:maxOccurs
Invalid per cvc-complex-type.1.3: undeclared attribute {None}:minOccurs
So I guess I'm not allowed to use those attributes at this point. How should I
proceed to fix this but also to note that this element is only allowed to occur
exactly one time in the XML document?!
Sebastian