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

Re: XML Schema Question

From: Helena Cavanagh <helena.cavanagh@usa.net>
Date: Fri Sep 29 14:16:59 2000
Message-ID: <20000929155009.22318.qmail@nwcst285.netaddress.usa.net>
To: www-xml-schema-comments@w3.org
Hello, I have a question regarding the elements that may appear in the
instances of an XML Schema:

It seems like there's a price to be paid for using the 'ref' attribute and
global elements: that all global elements may appear in an instance document.
Is there a way to restrict this? I would like to say "These are the global
elements I use in references, and this is the root element I want in the XML
instances".

I find it confusing that the default number of occurrences of an element is 1
(minOccurs=maxOccurs=1), while this does not apply to global elements (default
is "0 or 1", right?):
"The consequence of this (global) declaration is that an element called
comment MAY appear in an instance document" (Primer, Section 2.2)


Does this mean that the following XML document is valid under po.xsd?

<?xml version="1.0"?>
<comment>Is this possible?</comment>



Thank you,

Helena Cavanagh


PS. an extremely minor error in the Primer: the title of section 4.8 is
"Controlling the Creation...", while in the Table of Contents it appears as
"Preventing the Creation..."

____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1
Received on Friday, 29 September 2000 14:16:59 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:49:53 UTC