OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Restrictions - can anyone help



Title: Restrictions - can anyone help

Hi,

I've been testing out the IBM schema validator against some of the examples in the Schema Part 0 Primer, and get error below.

The asterisks are mine for highlighting. That line defines the restriction (from minOccurs="0" to minOccurs="1") which as far as I can tell should be a valid restriction.

My question:
Is this an error in the Primer or in the validator? Or am I missing some arcane point about restrictions?

Any suggestions appreciated.

John


-----------------------------------------------------------------------

In the definition of complexType ConfirmedItems, elementOnly content model (

<xsd:sequence maxOccurs="1" minOccurs="1">
 
  **** <xsd:element maxOccurs="unbounded" minOccurs="1" name="item">
    <xsd:complexType mixed="false">
            <xsd:sequence maxOccurs="1" minOccurs="1">
                <xsd:element maxOccurs="1" minOccurs="1"
                    name="productName" type="string"/>
                <xsd:element maxOccurs="1" minOccurs="1" name="quantity">
                    <xsd:simpleType>
                        <xsd:restriction base="positiveInteger">
                            <xsd:maxExclusive value="100"/>
                        </xsd:restriction>
                    </xsd:simpleType>
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="1" name="USPrice" type="decimal"/>
                <xsd:element block="" maxOccurs="1" minOccurs="0" ref="comment"/>
                <xsd:element maxOccurs="1" minOccurs="0" name="shipDate" type="date"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
</xsd:sequence>

 is not a restriction of elementOnly content model

<xsd:sequence maxOccurs="1" minOccurs="1">
   
  ****<xsd:element maxOccurs="unbounded" minOccurs="0" name="item">
        <xsd:complexType mixed="false">
            <xsd:sequence maxOccurs="1" minOccurs="1">
                <xsd:element maxOccurs="1" minOccurs="1"
                    name="productName" type="string"/>
                <xsd:element maxOccurs="1" minOccurs="1" name="quantity">
                    <xsd:simpleType>
                        <xsd:restriction base="positiveInteger">
                            <xsd:maxExclusive value="100"/>
                        </xsd:restriction>
                    </xsd:simpleType>
                </xsd:element>
                <xsd:element maxOccurs="1" minOccurs="1" name="USPrice" type="decimal"/>
                <xsd:element block="" maxOccurs="1" minOccurs="0" ref="comment"/>
                <xsd:element maxOccurs="1" minOccurs="0" name="shipDate" type="date"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
</xsd:sequence>

 the content type defined by the basetype.





_______________________________________________________
John Anderson

CTO BarbadosoftTM  Pure intelligent XML
+31 (0)20 750 7582 / +31 (0)6 65 347 448 / www.barbadosoft.com

- putting the "X" in "XML" -