Hi,
Thanks for your original responses to my query.
I would favour explicit defaults, as Jerome has stated the schema is
then often easier to read as documentation.
Additionally, to speed up development I'm passing the XML schema through
XMLBeans to provide me with generic Java get and set methods. This seems
to require that the data type (xs:string in most cases) is made
explicit, but recognises default min/max values when they are absent. If
possible, I would request that at least the data type remains present
please to facilitate this use.
As an aside, does anyone have any experience with XMLBeans? It seems to
be working fine for me so far; has anyone come across any issues with
it's suitability?
Best regards,
Adam
--
Adam Rusbridge
DCC Development
HATII, University of Glasgow, Scotland
Tel: +44 (0)141 330 8591
Email: [log in to unmask]
Web: www.dcc.ac.uk
On 09/09/05 22:10, Jerome McDonough wrote:
> Obviously, I'm fond of making things explicit. The difference in length
> between a schema explicitly stating its min/max occurs and one that
> doesn't
> is trivial, and frankly, humans don't normally look at a schema *unless*
> they're looking to it as a source of documentation, in which case, why not
> be explicit about what the schema is requiring?
>
> On Sep 9, 2005, at 3:02 PM, Rebecca S. Guenther wrote:
>
>> 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
>>
>
> Jerome McDonough, Asst. Professor
> Graduate School of Library & Information Science
> University of Illinois, Urbana-Champaign
> 501 E. Daniel Street, Room 202
> Champaign, IL 61820
> (217) 244-5916
> [log in to unmask]
>
|