'If an element is required, but parsing does not find it, then if the element has a default value specified it is used as the logical value. If there is no default value then it is a processing error.'
'On unparsing, if an element is required,
and is not part of the infoset and the element has a default value specified
then it is used, otherwise it is a processing error.'
The last sentence should include
arrays with not enough occurrences.
So if an array has too few occurrences
(and no default) it is a processing error, if it has too many it is a validation
error
Your questions
- When unparsing, the infoset might omit an element which has minOccurs
> 0. Should that be reported as a validation error, or a processing
error?
>> if no default a processing
error
- When unparsing, the infoset might omit an entire group. If all of the
elements in the omitted group were optional, should this be considered
an error ( because groups are implicitly required ) or not?
>> The infoset doesn't really
have groups only elements. So if you had an anonymous sequence in which
all the elements were optional and they were missing it would not be an
error. However if you have a complex element that contained an anonymous
sequence in which all the elements were optional and they were missing
would it be valid for the element to be missing? Don't know, discuss.
- When parsing an unordered group, if the input document contains more
than maxOccurs occurrences of one of the members, is that a processing
error or a validation error? The specification seems to imply that it is
a validation error, but that seems inconsistent with section 5.2.1
>> Validation error (5.2.1
needs updating)
Alan Powell
MP 211, IBM UK Labs, Hursley, Winchester, SO21 2JN, England
Notes Id: Alan Powell/UK/IBM email: alan_powell@uk.ibm.com
Tel: +44 (0)1962 815073
Fax: +44 (0)1962 816898
From: | Tim Kimber/UK/IBM@IBMGB |
To: | dfdl-wg@ogf.org |
Date: | 08/10/2009 10:20 |
Subject: | [DFDL-WG] Validation of min/mxOccurs |
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU
--
dfdl-wg mailing list
dfdl-wg@ogf.org
http://www.ogf.org/mailman/listinfo/dfdl-wg
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU