W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2003

[xmlschema-dev] <none>

From: Winston Wongsosemito <w.wongso@logan.nl>
Date: Wed, 7 May 2003 20:08:22 +0200
Message-ID: <000801c314c3$a6ac3df0$6401a8c0@www.Logan.nl>
To: <xmlschema-dev@w3.org>
Could someone plz help me with the following problem, I want  to validate the xml where
the picklist element have  different value elements

That means that the xml below should give an error while validating with the xsd scheme,
but it still gives no error when I'm trying to do so...

the XML document

<validate xmlns="urn:API">
   <picklist name="a1" description="B1" owner="6">


the XSD scheme

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:API" xmlns="urn:API" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="validate" type="validateType"/>

   <xs:complexType name="validateType">
            <xs:element name="xmldata" type="xmldataType" minOccurs="1" maxOccurs="1"/>

<xs:complexType name="xmldataType">
        <xs:element name="picklist" minOccurs="1" maxOccurs="1">
                  <xs:element name="value" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
              <xs:attribute name="name" type="xs:string" use="required"/>
              <xs:attribute name="description" type="xs:string" use="required"/>
              <xs:attribute name="owner" type="xs:integer" use="required"/>
        <xs:unique name="uniqueVALUE">
                <xs:selector xpath=".//value"/>
                <xs:field xpath="."/>

Received on Thursday, 8 May 2003 07:39:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:11 UTC