Jonathan - some replies below.

Regards

Steve Hanson
Architect, IBM Data Format Description Language (DFDL)
Co-Chair,
OGF DFDL Working Group
IBM SWG, Hursley, UK

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




From:        "Cranford, Jonathan W." <jcranford@mitre.org>
To:        "dfdl-wg@ogf.org" <dfdl-wg@ogf.org>,
Date:        09/07/2013 01:17
Subject:        [DFDL-WG] questions/feedback on dfdl:assert
Sent by:        dfdl-wg-bounces@ogf.org




DFDL WG,
 
Some questions and feedback on Section 7.3.1 Properties for dfdl:assert.  I don’t think any of these are major issues.
 
> "Schema authors can insert xs:sequence constructs to control the timing of evaluation of statements more precisely."
 
An example here would illustrate and clarify the concept.  This same verbiage is used in other sections of the spec, but I would think that only a single example would be sufficient to demonstrate the technique.

SMH: This is the sort of thing that we envisaged being covered by one of our tutorials, but we will certainly consider adding an example.
 
Under the “test” property:
> “The expression must have been evaluated by the time this element and it descendents have been processed.”
 
I’m lost in the grammar here.  Is that equivalent to “The expression must be evaluated before this element and its descendants are fully processed”?  (Changes highlighted).

Also, should the spec define what it means to “process” an element for this statement to have any weight?
 
SMH: The latest spec draft contains a new section 9.5 which prescribes the order in which the different DFDL annotations must be evaluated. I think that removes the need for this sentence in its current form and location.
 
> “It is a schema definition error if dfdl:test is the empty string and the value is
not specified and dfdl:testKind is 'expression' or not specified.”
 
Huh?  If the value of what isn’t specified? The value of the dfdl:assert annotation?  

SMH: Yes, the value of the dfdl:assert annotation. “It is a schema definition error if dfdl:testKind is 'expression' or not specified, and an expression is not supplied by either the value of the dfdl:assert element or the value of the dfdl:test attribute.”
 
Under the “testPattern” property:
> “It is a schema definition error if dfdl:testPattern is the empty string and the
value is not specified and dfdl:testKind is 'pattern'.”
 
Same comment here.  Should this be “… and the value of the dfdl:assert annotation is not specified…”?

SMH: “It is a schema definition error if dfdl:testKind is 'pattern', and a pattern is not supplied by either the value of the dfdl:assert element or the value of the dfdl:testPattern attribute.”
 
> “In order for a testPattern to be used, the data subject to the pattern must be
scannable using a DFDL regular expression otherwise the results are not
predictable.”
 
What does it mean for data to be “scannable”?  Does this mean that the representation has to be text, since it's the physical representation of the data that is compared to the regular expression?  

SMH: Scannable is defined in section 12.3.5.1. It would make better sense for it to be defined in section 3 (Glossary) as it is used for both assert terstKind 'pattern' and lengthKind 'pattern'.
 
Very respectfully,
 
--
Jonathan W. Cranford
Senior Information Systems Engineer
The MITRE Corporation (http://www.mitre.org)
 --
 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