[DFDL-WG] is this legal
Suman Kalia
kalia at ca.ibm.com
Thu Feb 28 20:03:20 EST 2013
This is certainly allowed in XML schema.. In the sequence you can have
multiple elements with same name as long as their type is identical which
is the case in your example. I think from XPath perspective, it would be
treated like array and if true dldl:occursCount should return 2. .
Suman Kalia
IBM Canada Lab
WMB Toolkit Architect and Development Lead
Tel: 905-413-3923 T/L 313-3923
Email: kalia at ca.ibm.com
For info on Message broker
http://www.ibm.com/developerworks/websphere/zones/businessintegration/wmb.html
From: Mike Beckerle <mbeckerle.dfdl at gmail.com>
To: dfdl-wg at ogf.org,
Date: 02/28/2013 07:44 PM
Subject: [DFDL-WG] is this legal
Sent by: dfdl-wg-bounces at ogf.org
I can't find clarity on this:
<sequence>
<element name="foo" type="int" dfdl:lengthKind="explicit"
dfdl:length="1"/>
<element name="bar" type="int" dfdl:lengthKind="explicit"
dfdl:length="1"/>
<element name="foo" type="int" dfdl:lengthKind="explicit"
dfdl:length="1"/>
<element name="bar" type="int" dfdl:lengthKind="explicit"
dfdl:length="1"/>
</sequence>
Is this allowed?
If so, then the XPaths for accessing the 2nd foo would be foo[2], and the
path "foo" would be ambiguous or
could be treated as identifying an array. In which case one could do an
expression dfdl:occursCount("foo") and get back 2 ??
Or am I completely missing the boat here?
--
Mike Beckerle | OGF DFDL Workgroup Co-Chair | Tresys Technology |
www.tresys.com
--
dfdl-wg mailing list
dfdl-wg at ogf.org
https://www.ogf.org/mailman/listinfo/dfdl-wg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ogf.org/pipermail/dfdl-wg/attachments/20130228/cf66bc24/attachment.html>
More information about the dfdl-wg
mailing list