W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > April to June 2000

Root element/ association of a schema targetNamespaceof to an instance/ maxOccurs.

From: S_PERROTT <Simon.Perrott@reuters.com>
Date: Thu, 01 Jun 2000 13:07:45 +0000 (GMT)
Message-Id: <B0004212960@euvig1.dtc.lon.ime.reuters.com>
To: www-xml-schema-comments@w3.org
	I've been looking at the Structures spec and I am unclear about the
following points. I'm not sure whether I might have missed something or whether
these are details that you'll be interested in during your meeting.
Simon Perrott

1) Root elements.
	I understand that a schema can have several global elements of
complexType. Is there any way for a schema to indicate which of its elements
will be the root element in instance documents? (The way that the DTD !DOCTYPE
declaration does). If not how can you tell what starts off an instance?

2) Association of a schema to an instance.
	I am confused about the relationship between schemas and namespaces. An
instance document may declare several namespaces in its root element. I
understand this to mean that the instance uses components in several schemas
whose target namespaces are referenced in the instance. 
But is there a notion that the instance is based on one schema that itself uses
parts of other schemas? If so, how can you tell which of the namespaces in an
instance contains this schema upon which the instance is mostly based?

3) maxOccurs
	Quoting from the definition of maxOccurs:
"{max occurs} unbounded, if the maxOccurs [attribute] equals unbounded,
otherwise the numeric lexical [value] of the maxOccurs [attribute], if present,
otherwise the lexical [value] of the minOccurs [attribute], if present,
otherwise 1. "
	Section 2.2 of the primer states this as "there is no default value for
maxOccurs per se: When an element is declared without a maxOccurs attribute,
the maximum number of the element's occurrences is equal to the value of the
minOccurs attribute."
	I interpret this to mean that
<xsd:element ref="comment" minOccurs="0" /> would not appear at all as its
maxOccurs = minOccurs = 0? On the other hand I currently understand this
actually means that the element "comment" can appear either 0 or 1 times in an

        Visit our Internet site at http://www.reuters.com

Any views expressed in this message are those of  the  individual
sender,  except  where  the sender specifically states them to be
the views of Reuters Ltd.
Received on Thursday, 1 June 2000 08:07:37 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:08:47 UTC