[DFDL-WG] V3 of length/occurs simplification proposal
Simon Parker
simon.parker at polarlake.com
Thu Aug 30 06:16:55 CDT 2007
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.ogf.org/pipermail/dfdl-wg/attachments/20070830/3ecf5c6c/attachment.htm
More information about the dfdl-wg
mailing list