0

Consider the following XSD code...

<xs:group name="foo.cnt">
        <xs:choice>
            <xs:group ref="blah"/>          
        </xs:choice>
    </xs:group>
    <xs:element name="foo">

        <xs:complexType mixed="true">
            <xs:complexContent mixed="true">
                <xs:extension base="foo.class">
                    <xs:attribute ref="bar" default="sample"/>
                </xs:extension>
            </xs:complexContent>
        </xs:complexType>
    </xs:element>
    <xs:complexType name="foo.class" mixed="true">
        <xs:sequence>
            <xs:group ref="foo.content"/>
        </xs:sequence>
        <xs:attributeGroup ref="foo.attributes"/>
    </xs:complexType>
    <xs:group name="foo.content">
        <xs:sequence>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:group ref="foo.cnt" minOccurs="0"/>
            </xs:choice>
        </xs:sequence>
    </xs:group>

I'm trying to create a redefine (in a separate XSD) to add a string length restriction...

 <xs:restriction base="xs:string">
      <xs:length value="8"/>
    </xs:restriction>

I keep getting parsing errors every way that I've tried. Where/how can I add the restriction?

Thanks!

Jeff
  • 877
  • 2
  • 11
  • 17
  • Please show a [minimal, complete](http://stackoverflow.com/help/mcve) XML Schema sample, and an XML document you'd like to validate. Or, even better, both a valid and an invalid document, with respect to your schema. – Mathias Müller May 01 '15 at 09:02
  • I'd like to determine if what I'm trying to attempt is even possible. If so, do i redefine the group? The complextype? Everything gives parser errors. – Jeff May 03 '15 at 11:39

0 Answers0