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@ca.ibm.com
For info on Message broker
http://www.ibm.com/developerworks/websphere/zones/businessintegration/wmb.html
From:
Mike Beckerle <mbeckerle.dfdl@gmail.com>
To:
dfdl-wg@ogf.org,
Date:
02/28/2013 07:44 PM
Subject:
[DFDL-WG] is
this legal
Sent by:
dfdl-wg-bounces@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@ogf.org
https://www.ogf.org/mailman/listinfo/dfdl-wg