FpML Issues Tracker
closed
Minor
Always
Validation Rules
Admin
None
Summary
ln-16 and ln-17 refer to "tradeSide element" which is undefined.
The rules today: " Context: TradeSide (complex type) shared-16 (Mandatory) For party/@href anywhere within the tradeSide element, href shall match the @id attribute of an /FpML/party element.
Context: TradeSide (complex type) shared-17 (Mandatory) For account/@href anywhere within the tradeSide element, href shall match the @id attribute of an /FpML/party/account element. "
Problem 1: Rather than "tradeSide element" it should refer to the current context. The context of the rule is a TradeSide complex type which may not be an element named "tradeSide", it may be named something else. The rule should not care what the element is named.
Problem 2: Another issue is that the construct "anywhere within the tradeSide element" is the descendant axis in XPath which is abbreviated to "//". FpML rule specification guidelines require the use of XPath for axis.
Problem 3: The element FpML is outside the context and cannot be found.
Problem 4: We should be consistent about the phrases "=" rather than "should match".
The solution complying with all the FpML guidelines on writing rules is: " shared-16 (Mandatory) Context: $document as Document (complex type) [exists(trade)] every $party in $document/trade/tradeSide/*/party satisfies $party/@href = $document/party/@id
shared-17 (Mandatory) Context: $document as Document (complex type) [exists(trade)] every $account in $document/trade/tradeSide/*/account satisfies $account/@href = $document/party/account/@id "
Notes:
matthewdr
08/26/08 1:39 pm
Agreed at the VWG today to implement as proposed.
matthewdr
08/26/08 1:41 pm
Lyteck pointed out that other “href matches id” type rules should be rewritten as “/href = /id”
matthewdr
08/26/08 1:51 pm
Or without the $document
”
shared-16 (Mandatory)
Context: Document (complex type) [exists(trade)]
every $party in trade/tradeSide/*/party satisfies $party/@href = party/@id
shared-17 (Mandatory)
Context: Document (complex type) [exists(trade)]
every $account in trade/tradeSide/*/account satisfies $account/@href = party/account/@id
”
lyteck
08/26/08 2:53 pm
fixed as agreed.
matthewdr
08/26/08 4:04 pm
Accepting after testing.