Open safris opened 11 months ago
In the following example, each of the 4 paths bind to field "a". Since the context of each binding is object "o", the fields collide.
<binding> <xi:include href="schema.jsdx"/> <any path="o[0]"><bind lang="java" field="a"/></any> <reference path="o.r"><bind lang="java" field="a"/></reference> <boolean path="o.b"><bind lang="java" field="a"/></boolean> <number path="o.n"><bind lang="java" field="a"/></number> <string path="o.s"><bind lang="java" field="a"/></string> </binding>
This can be detected by something akin <xs:assert test="count(replace($path, '([^\\]|\\\\)[\.\[].*', concat('$1.', $field)) = count(distinct-values(replace($path, '([^\\]|\\\\)[\.\[].*', concat('$1.', $field)))"/>.
<xs:assert test="count(replace($path, '([^\\]|\\\\)[\.\[].*', concat('$1.', $field)) = count(distinct-values(replace($path, '([^\\]|\\\\)[\.\[].*', concat('$1.', $field)))"/>
In the following example, each of the 4 paths bind to field "a". Since the context of each binding is object "o", the fields collide.
This can be detected by something akin
<xs:assert test="count(replace($path, '([^\\]|\\\\)[\.\[].*', concat('$1.', $field)) = count(distinct-values(replace($path, '([^\\]|\\\\)[\.\[].*', concat('$1.', $field)))"/>
.