W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2001

Re: Can a Global Element have a minOccurs and maxOccurs?

From: Eddie Robertsson <eddie@allette.com.au>
Date: Mon, 29 Oct 2001 13:45:16 +1100
Message-ID: <3BDCC2BC.9978FA0F@allette.com.au>
To: David Spriet <infostring@yahoo.com>
CC: xmlschema-dev@w3.org
> <?xml version="1.0" encoding="UTF-8"?>
> <schema xmlns="http://www.w3.org/2001/XMLSchema"
> xmlns:test="http://test.com/test"
> targetNamespace="http://test.com/test" >
>
>   <element name="test" type="string" minOccurs="2"
> maxOccurs="4"/>
>
> </schema
>
> Some people tell me yes and others say no.  I tested
> it against IBM's XML Schema validator and it says yes.

The people saying no would be correct.
The Primer says (at the end of the table) [1]:

"Note that neither minOccurs, maxOccurs, nor use may appear in the declarations
of global elements and attributes."

I'm not sure where this is stated in [2]

Cheers,
/Eddie

[1] http://www.w3.org/TR/xmlschema-0/#OccurrenceConstraints
[2] http://www.w3.org/TR/xmlschema-1
Received on Sunday, 28 October 2001 21:38:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:24 GMT