W3C home > Mailing lists > Public > xmlschema-dev@w3.org > June 2002

RE: Element declararion

From: Mark Feblowitz <mfeblowitz@frictionless.com>
Date: Wed, 5 Jun 2002 13:50:27 -0400
Message-ID: <4DBDB4044ABED31183C000508BA0E97F040ABC18@fcpostal.frictionless.com>
To: "'A. Delrio'" <adelrio@decadesystems.com>, xmlschema-dev@w3.org
Cc: Nell Golding <nell_golding@hotmail.com>

You'll have to give us a little more to go on. Is this a question of the
element being present or of an element having required content?  

If it's the former, then Andy's response is correct. If it's the latter,
then it depends on the type of the element's content. If it has element
content, then Andy's answer applies similarly: specify that the element and
its content are required (minOccurs >= "1"). 

If it is simple content, e.g., containing a string, you can specify in the
minLength facet the minimum number of characters that would be required
(e.g., minLength="1").


Mark Feblowitz                                   	
XML Architect
       [t]   617.715.7231                                     	
       [f]   617.495.0188
Frictionless Commerce Incorporated 	
       [e]  mfeblowitz@frictionless.com
       [w] http://www.frictionless.com
       [m] 400 Technology Square, 9th Floor
             Cambridge, MA 02139 
Open Applications Group Incorporated
       [e]  mfeblowitz@openapplications.org
       [w] http://www.openapplications.org 

 -----Original Message-----
From: 	A. Delrio [mailto:adelrio@decadesystems.com] 
Sent:	Wednesday, June 05, 2002 1:23 PM
To:	xmlschema-dev@w3.org
Cc:	Nell Golding
Subject:	RE: Element declararion

Hi Nell,

If you are refering that there must be content within an element, then I
believe you must give the element a type definition as shown in example 1
below.  If you are referring that an element name must exist within a
document, then by default the element must exist unless you add a
minOccurs="0" attribute to the element declaration. See example 2

1.  <xsd:element name="MANDATORY_ELEMENT" type="xs:date"/>
2.  <xsd:element name="OPTIONAL_ELEMENT" minOccurs="0"/>


-----Original Message-----
From: xmlschema-dev-request@w3.org
[mailto:xmlschema-dev-request@w3.org]On Behalf Of Nell Golding
Sent: Wednesday, June 05, 2002 5:47 AM
To: xmlschema-dev@w3.org
Subject: Element declararion

I am trying to specify some interfaces in Schema and met definite problems.

I'll be very thankfull if anybody could help me.

My question is, is it possible with a help of schema to declare that an
element must NOT be empty?
As I searched through schema specification myself I could not find this

Thank you,
Nell G.

MSN Photos is the easiest way to share and print your photos:
Received on Wednesday, 5 June 2002 13:50:59 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:57 UTC