newbie problem with creating xsd

G

gg

<xsd:complexType name="RegexTypes">
<xsd:sequence>
<xsd:element name="RegexType" minOccurs="0"
maxOccurs="unbounded"/>
<xsd:complexType> <!--
got complain here from Netbean 5.5 IDE XML xsd validator
s4s-elt-must-match.1: The content of 'sequence' must match
(annotation?, (element | group | choice | sequence | any)*). A problem was
found starting at: complexType. [63]
what should I do???
-->
<xsd:element ref="comment" minOccurs="0"/>
<xsd:element name="RegexName" type="xsd:string"/>
<xsd:element name="extractType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="link"/>
<xsd:enumeration value="table"/>
<!-- may need more values for extractType -->
</xsd:restriction>
</xsd:element>
<xsd:element name="Regex" type="xsd:string"/>
<xsd:element name="groupCount" type="xsd:positiveInteger"/>
<xsd:element name="matchGroupNameList" type="xsd:string">
<xsd:documentation annotation="list of match group names
separated by comma"/>
</xsd:element>
<xsd:element name="extractValueType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="bankTx"/>
<xsd:enumeration value="pmt"/>
<xsd:enumeration value="txfr"/>
<xsd:enumeration value="summary"/>
<xsd:enumeration value="stock"/>
<xsd:enumeration value="card">
<xsd:documentation annotation="can be credit
card, line of credit, loan"/>
</xsd:enumeration>
</xsd:restriction>
</xsd:element>
</xsd:complexType>
</xsd:sequence>
</xsd:complexType>
 
M

Martin Honnen

gg said:
<xsd:complexType name="RegexTypes">
<xsd:sequence>
<xsd:element name="RegexType" minOccurs="0"
maxOccurs="unbounded"/>
<xsd:complexType> <!--
got complain here from Netbean 5.5 IDE XML xsd validator
s4s-elt-must-match.1: The content of 'sequence' must match
(annotation?, (element | group | choice | sequence | any)*). A problem was
found starting at: complexType. [63]
what should I do???

You need to put an
<xsd:element ...>
here that then can have an xsd:complexType as its child.
Currently you have an xsd:sequence with an xsd:element child (which is
allowed) followed by an xsd:complexType (which is not allowed in the
sequence).

It might however be that you want

<xsd:complexType name="RegexTypes">
<xsd:sequence>
<xsd:element name="RegexType" minOccurs="0"
maxOccurs="unbounded">
<xsd:complexType>

that is you want to define the contents of the RegexType element as a
complexType.
 
G

gg

thank you very much! you are right on what I wanted.


I got around it by creating the element RegexType of complex RegexTypes and
then specify the complex type RegextTypes

Martin Honnen said:
gg said:
<xsd:complexType name="RegexTypes">
<xsd:sequence>
<xsd:element name="RegexType" minOccurs="0"
maxOccurs="unbounded"/>
<xsd:complexType> <!--
got complain here from Netbean 5.5 IDE XML xsd validator
s4s-elt-must-match.1: The content of 'sequence' must match
(annotation?, (element | group | choice | sequence | any)*). A problem was
found starting at: complexType. [63]
what should I do???

You need to put an
<xsd:element ...>
here that then can have an xsd:complexType as its child.
Currently you have an xsd:sequence with an xsd:element child (which is
allowed) followed by an xsd:complexType (which is not allowed in the
sequence).

It might however be that you want

<xsd:complexType name="RegexTypes">
<xsd:sequence>
<xsd:element name="RegexType" minOccurs="0"
maxOccurs="unbounded">
<xsd:complexType>

that is you want to define the contents of the RegexType element as a
complexType.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top