newbie problem with creating xsd

Discussion in 'XML' started by gg, Mar 23, 2007.

  1. gg

    gg Guest

    <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>
    gg, Mar 23, 2007
    #1
    1. Advertising

  2. gg wrote:
    > <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.


    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
    Martin Honnen, Mar 24, 2007
    #2
    1. Advertising

  3. gg

    gg Guest

    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" <> wrote in message
    news:46051d65$0$23137$-online.net...
    > gg wrote:
    > > <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.
    >
    >
    > --
    >
    > Martin Honnen
    > http://JavaScript.FAQTs.com/
    gg, Mar 24, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Markus
    Replies:
    1
    Views:
    1,069
    Markus
    Nov 22, 2005
  2. Rick Razzano

    XSD document for XSD defintion

    Rick Razzano, Sep 26, 2003, in forum: XML
    Replies:
    1
    Views:
    456
    C. M. Sperberg-McQueen
    Sep 26, 2003
  3. Replies:
    1
    Views:
    837
    Martin Honnen
    Jan 14, 2004
  4. Peter Aberline

    xsd:any as a child of xsd:all

    Peter Aberline, Apr 5, 2004, in forum: XML
    Replies:
    0
    Views:
    763
    Peter Aberline
    Apr 5, 2004
  5. Bernd Oninger
    Replies:
    1
    Views:
    510
    Henry S. Thompson
    Jun 30, 2004
Loading...

Share This Page