[DFDL-WG] clarify array expressions
Mike Beckerle
mbeckerle.dfdl at gmail.com
Thu Feb 14 16:30:55 EST 2013
Some folks are trying to create a DFDL model for IMF (internet message
format ... basically email)
There is this header structure which really wants unordered sequences.
Since we don't have those yet
I told them to use an array of choice like this:
<xs:element name="hdrArray" minOccurs="1" maxOccurs="25">
<xs:complexType>
<xs:choice>
<xs:element ref="TO_HDR"/>
<xs:element ref="FROM_HDR" />
</xs:choice>
...
But then there are these contraints, like there should be only one FROM
address, but there can be several TO addresses.
So, one might want to write a DFDL expression using an XPath-like query
path in it. E.g.,
<xs:assert>{ dfdl:occursCount( hdrArray/FROM_HDR ) eq 1 }</xs:assert>
Here's the question: Is the DFDL expression in this assert legal?
I advised them that no, it is not, because hdrArray is an array and isn't
being indexed, while FROM_HDR is not an array, but is being used as the
argument to dfdl:occursCount.
I think DFDL's expression language is simply not powerful enough to express
these constraints.
I'm just looking for affirmation or discussion if there is more to say
here.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ogf.org/pipermail/dfdl-wg/attachments/20130214/60b53e7e/attachment.html>
More information about the dfdl-wg
mailing list