Print

Print


Back to this question again ..... try a little experiment, if you have
xmlSpy.
In the object schema, we have:
<xs:element name="objectIdentifier" maxOccurs="unbounded">

Insert minOccurs="1" so it's:
<xs:element name="objectIdentifier" minOccurs="1" maxOccurs="unbounded">

Save the file and reopen it.   xmlSpy  has removed the minOccur="1". Same
thing happens if you have maxOccurs="1".    Perhaps it's my version of
xmlSpy, and your's doesn't do it.(And I'm sending a question to them for
clarification.)  But the point is, xmlSpy, at least, thinks these two
defaults should be removed.

- Ray



----- Original Message ----- 
From: "Rebecca S. Guenther" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Friday, September 09, 2005 4:02 PM
Subject: [PIG] opinions on schema style


> We recently had some messages about the use of minOccurs=1 and
> maxOccurs=1, which was changed in version 1.1 from what was in 1.0. It was
> pointed out that semantically including minOccurs=1 and maxOccurs=1 was
> the same as leaving them out since they are the defaults in XML
> schema. (The same goes for the data type "string"; right now xs:string is
> used in most cases and is explicitly in the PREMIS schemas, but since it's
> a default in XML schema, it could also be deleted. We just discovered one
> place where it was left out that it should have been there for
> consistency's sake.)
>
> This really goes to the question of style and there are various opinions
> about this. Is it better to have a compact schema that only includes what
> is needed and eliminates redundancies or to have a more verbose schema
> that spells out the defaults explicitly? Either way is correct.
>
> As we go to version 1.1, before we finalize the drafts that are out there,
> it would be good if we came to consensus on this. Any opinions?
>
> Rebecca