Mike

I think that we can add clauses to sections 16.1.1 through 16.1.5 (where needed). We don't need a new section.  And we don't need any additions to section 14.2.2 or 14.2.3 - the wording implies that separators only appear when an occurrence is output. http://redmine.ogf.org/issues/244

Regards
 
Steve Hanson
Architect,
IBM DFDL
Co-Chair,
OGF DFDL Working Group
IBM SWG, Hursley, UK

smh@uk.ibm.com
tel:+44-1962-815848




From:        Mike Beckerle <mbeckerle.dfdl@gmail.com>
To:        Steve Hanson/UK/IBM@IBMGB
Cc:        DFDL-WG <dfdl-wg@ogf.org>
Date:        25/11/2014 15:53
Subject:        Re: [DFDL-WG] Action 271: semantic of maxoccurs '0'





I think we need to add Section 16.1.6, which is titled "When maxOccurs is Zero". (The other possible place is 16.9, but I think that is very far from where the information is needed.) This is where the table goes specifying the maxOccurs 0 behavior.

A forward reference to this section should be added in section 14.2.2 in the paragraphs about 'fixed', 'implicit', and 'expression'.

A forward reference to this section should also be added in section 16.1.1, 16.1.2, and 16.1.4, which are the sections about fixed, implicit, and expression.

Mike Beckerle | OGF DFDL Workgroup Co-Chair | Tresys Technology | www.tresys.com
Please note: Contributions to the DFDL Workgroup's email discussions are subject to the OGF Intellectual Property Policy


On Tue, Nov 18, 2014 at 6:39 AM, Steve Hanson <smh@uk.ibm.com> wrote:
We still need words to capture what is in the two tables though.  The spec today does not say what the parser or unparser does when asked to process zero occurrences of an element (whether stipulated by maxOccurs or dfdl:occursCount), and that's the behaviour given in the tables and accompanying notes.

Regards
 
Steve Hanson
Architect,
IBM DFDL
Co-Chair,
OGF DFDL Working Group
IBM SWG, Hursley, UK

smh@uk.ibm.com
tel:
+44-1962-815848



From:        
Mike Beckerle <mbeckerle.dfdl@gmail.com>
To:        
Steve Hanson/UK/IBM@IBMGB
Cc:        
DFDL-WG <dfdl-wg@ogf.org>
Date:        
17/11/2014 20:02
Subject:        
Re: [DFDL-WG] Action 271: semantic of maxoccurs '0'




I looked through the Spec at each use of the word maxOccurs.

I saw nowhere that had to be modified if we stipulate that maxOccurs can be zero.

Hence, I think the only thing we need to do is (1) explicitly state maxOccurs can be zero, and I suggest we also provide a suggested use case. I think the use case would be to accept a prior version of a DFDL-described data format, but have validation fail for elements that are not supposed to be present anymore in a revised version of that schema.

I believe section 5.2.1 is the right place for this stipulation. The use case can go in a footnote perhaps.


Mike Beckerle | OGF DFDL Workgroup Co-Chair | Tresys Technology |
www.tresys.com
Please note: Contributions to the DFDL Workgroup's email discussions are subject to the
OGF Intellectual Property Policy


On Mon, Oct 13, 2014 at 10:39 AM, Steve Hanson <
smh@uk.ibm.com> wrote:
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@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


--
  dfdl-wg mailing list
 
dfdl-wg@ogf.org
 
https://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



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