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

Re: xml scheme

From: <noah_mendelsohn@us.ibm.com>
Date: Mon, 28 Apr 2003 14:06:03 -0400
To: "badr alboaijan" <badrboijan@hotmail.com>
Cc: xmlschema-dev@w3.org
Message-ID: <OF7A350355.D5EF4371-ON85256D16.0063F27F@lotus.com>

I am sorry, but your question is a little difficult to understand.  If 
you're asking:  "how can I make an element optional or required?", the 
answer is:

  <xsd:element name="x" type="t"/>                <==required
  <xsd:element name="x" type="t" minOccurs="0"/>  <==optional

minOccurs stands for "minimum number of occurrences".  See the XML Schema 
Primer for more information: http://www.w3.org/TR/xmlschema-0/ .  I hope I 
have understood your question, and that this answer is helpful.

Noah Mendelsohn                              Voice: 1-617-693-4036
IBM Corporation                                Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142

"badr alboaijan" <badrboijan@hotmail.com>
Sent by: xmlschema-dev-request@w3.org
04/28/2003 12:42 AM

        To:     xmlschema-dev@w3.org
        cc:     (bcc: Noah Mendelsohn/Cambridge/IBM)
        Subject:        xml scheme

Dear Sir/Madame 
I have question for you
I'm trying to parse a XML scheme (eg. po.xsd) and I would like to 
determine each element and wether it is optional or required.
Could you please tell me how I can do it?
Thanx alot
badr h.

Add photos to your messages with MSN 8. Get 2 months FREE*.
Received on Monday, 28 April 2003 14:14:37 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:01 UTC