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

[xmlschema-dev] Re: Setting the minOccurs depending on other val

From: Bob Schloss <rschloss@us.ibm.com>
Date: Mon, 12 May 2003 09:37:12 -0400
To: xmlschema-dev@w3.org
Message-ID: <OFEF31DF81.0DCD0631-ON85256D24.004ABAB9-85256D24.004AA9D6@us.ibm.com>

W3C XML Schema Language 1.0 does not permit this.

Your receiving application could do its own check, through your own code or
by using Schematron or another supplement to the W3C XML Schema language.

Bob Schloss
IBM Thomas J Watson Research Center

                      "Aaron Frenger"                                                                                     
                      <apfrenger@apfcon        To:       <xmlschema-dev@w3.org>                                           
                      sult.com>                cc:                                                                        
                      Sent by:                 Subject:  Setting the minOccurs depending on other val                     
                      05/12/2003 09:05                                                                                    

Hi all,

I am not sure if this is possible, but I am trying to set minOccurs for an
element depending on another elements value.

For example.

   <xsd:element name="myElement">
        <xsd:element name="NumberOfPeople" type="xsd:short"/>
        <xsd:element name="Name" type="xsd:string"

I am somewhat new to XML Schema and I have been trying to do some things
with keys and have been unsuccessful.

Any help would be appreciated.

Received on Monday, 12 May 2003 09:37:22 UTC

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