FpML Issues Tracker
closed
Minor
Always
Validation Rules
Admin
sheinrich
Summary
Rules shared-11 states:
"Context: Trade (complex type) shared-11 (Mandatory) If businessDateRange exists within any descendant element of the trade, then businessCentersReference/@href, if present, must match some businessCenters/@id within the same trade."
The problem with this is that "businessCentersReference/@href" and "businessCenters/@id" are not in the context of "//element(*, Trade)", they are deeper descendants.
I rewrote the rule as the below to get the correct answer.
(for $trade as element(*, Trade) in //element(*, Trade)[//businessDateRange]
return
Both paths are descendants rather than children of the context. Clarifying these are descendants rather than children would fix this rule.
Notes:
mgratacos
09/25/07 1:53 pm
Validation WG agreed to make this change:
If businessDateRange exists within any descendant element of the trade, then businessCentersReference/@href, if present in any descendant element of the trade, must match some businessCenters/@id within any descendant of the same trade.
mgratacos
09/25/07 2:53 pm
This has been committed to the trunk (4.4) and 4.3 branch.