[DFDL-WG] Rules for resolving ambiguity in the in-scope terminating markup

Alan Powell alan_powell at uk.ibm.com
Thu Feb 4 11:09:34 CST 2010


Aren't there two different cases

1. When looking for a 'new' element look for its initiator first
2. when looking for the end of a delimited element look for a terminator 
or separator.

These may occur at the same place in the data.

You cannot have the initiator of the next element terminating the current 
element.
 
Regards

 
Alan Powell
 
Development - MQSeries, Message Broker, ESB
IBM Software Group, Application and Integration Middleware Software
-------------------------------------------------------------------------------------------------------------------------------------------
IBM
MP211, Hursley Park
Hursley, SO21 2JN
United Kingdom
Phone: +44-1962-815073
e-mail: alan_powell at uk.ibm.com




From:
Tim Kimber/UK/IBM at IBMGB
To:
dfdl-wg at ogf.org
Date:
04/02/2010 16:38
Subject:
Re: [DFDL-WG] Rules for resolving ambiguity in the in-scope terminating 
markup




Good question - I must admit that I put that in as an afterthought. 
There's an attempted explanation below, which might be off target. 

Consider this sequence: 
<xs:sequence 
  dfdl:sequenceKind="ordered" 
  dfdl:initiatedContent="true" 
  dfdl:separator=":" 
  dfdl:separatorPosition="infix" 
  dfdl:separatorPolicy="require" 
> 
    <xs:element dfdl:initiator=":a:" lengthKind="delimited" 
minOccurs="0"/> 
    <xs:element dfdl:initiator=":b:" lengthKind="delimited" 
minOccurs="0"/> 
</xs:sequence> 

It could have the following representations: 

{:a:valueOfA::b:valueOfB} 
{::b:valueOfB} 
{,} 

After parsing the { the next item could be either a's initiator, or the 
group's separator. I'm saying that a's intiator takes precedence here. 
( in other words, when parsing a group's content we look for the initiator 
of the first element before scanning for terminating markup ) 

Alternatively, we could specify the opposite behaviour and insist that 
in-scope terminating markup is always checked before any other group 
content. 
That would make the above difficult or impossible to parse using DFDL, I 
think. 

regards,

Tim Kimber, Common Transformation Team,
Hursley, UK
Internet:  kimbert at uk.ibm.com
Tel. 01962-816742 
Internal tel. 246742



From: 
Steve Hanson/UK/IBM 
To: 
Tim Kimber/UK/IBM at IBMGB 
Cc: 
dfdl-wg at ogf.org 
Date: 
04/02/2010 15:53 
Subject: 
Re: [DFDL-WG] Rules for resolving ambiguity in the in-scope terminating 
markup



Tim - can you clarify the last sentence please - is the terminating markup 
that of the preceding peer element, or the enclosing parent? 

Regards

Steve Hanson
Programming Model Architect, WebSphere Message Broker,
OGF DFDL WG Co-Chair,
Hursley, UK,
Internet: smh at uk.ibm.com,
Phone (+44)/(0) 1962-815848 



From: 
Tim Kimber/UK/IBM at IBMGB 
To: 
dfdl-wg at ogf.org 
Date: 
03/02/2010 17:47 
Subject: 
Re: [DFDL-WG] Rules for resolving ambiguity in the in-scope terminating 
markup 
Sent by: 
dfdl-wg-bounces at ogf.org





These rules seem to work: 
a) separators and terminators are collectively called 'terminating 
markup'. 
b) initiators are not 'terminating markup' 
c) when two items of in-scope terminating markup have a common prefix, the 
parser must give precedence to the longest item. 
d) when two items of in-scope terminating markup have exactly the same 
value, the parser must give precedence to the innermost ( most deeply 
nested ) item. 
e) when the separator and terminator on a group have exactly the same 
value, the parser must give precedence to the separator. 

If an initiated component can occur at the same point as an item of 
terminating markup, the initiator takes precedence. 

regards,

Tim Kimber, Common Transformation Team,
Hursley, UK
Internet:  kimbert at uk.ibm.com
Tel. 01962-816742 
Internal tel. 246742




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 





--
  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/20100204/419f437f/attachment.html 


More information about the dfdl-wg mailing list