[DFDL-WG] V3 of length/occurs simplification proposal

Steve Hanson smh at uk.ibm.com
Thu Aug 30 07:28:56 CDT 2007


Property 'occursStopValueKind' has its origins in the analogous property 
'nullValueKind'.  They are both trying to solve the same kind of 
out-of-band problem. 

I would suspect that many users would be happier considering their array 
as being terminated by an out-of-band stop value rather than by some odd 
looking markup which combines a separator with a text value. You will 
notice in your example that you have had to duplicate the occurs separator 
in two properties, which immediately says to me that it's the wrong 
approach.

Also, having literal and logical stop values gives us a bit more 
flexibility. We may decide that stop values are considered data and give 
rise to an API event. I think this needs more discussion, we need to take 
into account the unparser side. 

Regards, Steve

Steve Hanson
WebSphere Message Brokers
Hursley, UK
Internet: smh at uk.ibm.com
Phone (+44)/(0) 1962-815848



"Simon Parker" <simon.parker at polarlake.com> 
Sent by: dfdl-wg-bounces at ogf.org
30/08/2007 12:16

To
<dfdl-wg at ogf.org>
cc

Subject
Re: [DFDL-WG] V3 of length/occurs simplification proposal






Hmmm...
 
I wasn't around for 'occursStopValueKind', so excuse me if I miss the 
point.
 
Here's a question and a tentative answer I was playing with recently:
 
What's the difference between stopValue and terminator?
'terminator' can be used to scan a stream of characters or bits without 
parsing elements
'stopValue' can be used to scan a sequence of parsed elements. Its 
datatype must be the same as the array element.
If I'm right, then Steve's example is invalid because "done" is not an 
integer. To make it valid, either:
    - the stopValue must be an 'int' such as -1, or
    - the out-of-band value "done" or "|done" must be a terminator for an 
enclosing construct as follows.
 
Change this:
<element name="x" type="int" maxOccurs="unbounded" 
dfdl:occursSeparator="|" dfdl:occursKind="stopValue" dfdl:stopValue="done" 
dfdl:occursStopValueKind="literal" dfdl:representation="text"/> 
to this:
<sequence dfdl:lengthKind="delimited" dfdl:terminator="|done" 
dfdl:applies="hereonly">
    <element name="x" type="int" maxOccurs="unbounded" 
dfdl:occursSeparator="|" dfdl:occursKind="endOfData" 
dfdl:representation="text"/> 
</sequence>
 
If I'm wrong, then what is the correct answer to the question?
 
---
 
If we change the name of the property 'stopValue', then I would find these 
candidates consistent with similar concepts elsewhere:
    occursTerminator
    occursTerminatorValue
    terminatorValue
 
 Simon
 

From: dfdl-wg-bounces at ogf.org [mailto:dfdl-wg-bounces at ogf.org] On Behalf 
Of Mike Beckerle
Sent: 29 August 2007 19:52
To: Steve Hanson
Cc: dfdl-wg at ogf.org; dfdl-wg-bounces at ogf.org
Subject: Re: [DFDL-WG] V3 of length/occurs simplification proposal


Seems like occursStopValueKind="literal" only applies to 
representation="text". 

With that caveat, I think I agree we need to be able to say 

<element name="x" type="int" maxOccurs="unbounded" 
dfdl:occursSeparator="|" dfdl:occursKind="stopValue" dfdl:stopValue="done" 
dfdl:occursStopValueKind="literal" dfdl:representation="text"/> 

Then this would be valid 3 occurences for element x. 

2|3|4|done 

I think we shoudl rename dfdl:stopValue to dfdl:occursStopValue for 
consistency. 


Mike Beckerle
STSM, Architect, Scalable Computing
IBM Software Group
Information Platform and Solutions
Westborough, MA 01581
direct: voice and FAX 508-599-7148
assistant: Pam Riordan 
                 priordan at us.ibm.com 
                 508-599-7046




Steve Hanson <smh at uk.ibm.com> 
08/29/2007 01:32 PM 


To
Mike Beckerle/Worcester/IBM at IBMUS 
cc
dfdl-wg at ogf.org, dfdl-wg-bounces at ogf.org 
Subject
Re: [DFDL-WG] V3 of length/occurs simplification proposal









Mike - looking at an old level of the spec, we had a occursStopValueKind 
property, with enums 'logical', 'literal' and 'missing'.  Analogous to 
nullvalueKInd property.  I'm sure we want to handle 'missing' differently 
but the literal v logical distinction is required. How are we proposing to 
cover this? 

Regards, Steve

Steve Hanson
WebSphere Message Brokers
Hursley, UK
Internet: smh at uk.ibm.com
Phone (+44)/(0) 1962-815848 

Mike Beckerle <beckerle at us.ibm.com> 
Sent by: dfdl-wg-bounces at ogf.org 
29/08/2007 16:29 


To
dfdl-wg at ogf.org 
cc

Subject
[DFDL-WG] V3 of length/occurs simplification proposal










Based on minutes from last week's meeting I've updated to v3 the proposal 
for simplifying length/occurs properties. 
Changes are marked with comments. --
dfdl-wg mailing list
dfdl-wg at 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 




--
  dfdl-wg mailing list
  dfdl-wg at 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





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.ogf.org/pipermail/dfdl-wg/attachments/20070830/89c1cd8a/attachment.htm 


More information about the dfdl-wg mailing list