[DFDL-WG] Action 271: semantic of maxoccurs '0'

Steve Hanson smh at uk.ibm.com
Mon Oct 13 10:39:07 EDT 2014


271
Use of maxOccurs '0' (All)
2/9: Legal in XSDL and DFDL. One use case in XSDL is when deriving a 
complex type by restriction, where it is used to indicate that an element 
in the base type must not appear. Another use case could be if a schema 
undergoes a version revision that removes elements; perhaps clearer if the 
removed element gets maxOccurs '0' rather than omitting it. Steve has seen 
an instance of its use in a DFDL schema.
So if DFDL continues to support it, need to document the behaviour for the 
various occursCountKinds and what happens to separator. Also behaviour of 
occursCount expression that returns 0. Proposal needed. 
...
23/9: No progress

IBM has discussed this internally and has the following proposal. Infoset 
refers to the augmented infoset.

OCK
maxOccurs '0'
Parsing
Unparsing
fixed 
No occurrences looked for in the data (1)
No occurrences looked for in the infoset or written (2)
implicit
No occurrences looked for in the data (1)
No occurrences looked for in the infoset or written (2)
expression
occursCount occurrences expected. If any are found it is a validation 
error. 
Any number of occurrences expected in the infoset and written. If any are 
found it is a validation error.
parsed
Any number of occurrences expected in the data. If any are found it is a 
validation error. 
Any number of occurrences expected in the infoset and written. If any are 
found it is a validation error.
stopValue
Any number of occurrences expected in the data. If any are found it is a 
validation error. 
Any number of occurrences expected in the infoset and written. If any are 
found it is a validation error.

OCK
Parsing and occursCount '0'
Unparsing and no occurrences in infoset
expression
No occurrences looked for in the data. (1)
No occurrences written. (2)

Notes
(1) If sequence has a separator, no separator is looked for in the data 
when parsing.
(2) If sequence has a separator, no separator is output when unparsing.

Regards
 
Steve Hanson
Architect, IBM DFDL
Co-Chair, OGF DFDL Working Group
IBM SWG, Hursley, UK
smh at uk.ibm.com
tel:+44-1962-815848
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ogf.org/pipermail/dfdl-wg/attachments/20141013/0da2e791/attachment.html>


More information about the dfdl-wg mailing list