FpML Issues Tracker

830: ref-18 requires optional element to be present

September 17, 2008

closed

Minor

Always

Validation Rules

Admin

None

Summary

The rule ref-18 requires an optional element to be present. If the element is not present the rule will fail.

The rule today is: " ref-18 (Mandatory) Context: PricingStructurePoint (complex type) The coordinate/generic/@href attribute = the underlyingAsset/@id attribute "

The element "coordinate" is optional within PricingStructurePoint.

One potential solution is to add a guard on the existence of the element: " ref-18 (Mandatory) Context: PricingStructurePoint (complex type) [exists(coordinate)] The coordinate/generic/@href attribute = the underlyingAsset/@id attribute "

The second problem is that coordinate is a repeating element, and so is generic underneath it. This requires the form of the rule to change: " ref-18 (Mandatory) Context: PricingStructurePoint (complex type) every $generic in coordinate/generic satisfies id($generic/@href) is underlyingAsset "

NB I use "is" instead of "=" because I am testing for identity equivalence, not value equivalence. In other words - it needs to be the exact same element, not just contain the same value.

A further complication is that underlyingAsset is optional. This requires a guard on the underlying asset.

" ref-18 (Mandatory) Context: PricingStructurePoint (complex type) [exists(underlyingAsset)] every $generic in coordinate/generic satisfies id($generic/@href) is underlyingAsset "

It is completely unclear how to interpret coordinate/generic/href if underlyingAssetReference is present.

Notes:

  • matthewdr

    12/09/08 2:25 pm

    Agreed to implement the proposal.

  • matthewdr

    12/09/08 2:25 pm

    (agreed at the VWG)

  • lyteck

    12/09/08 8:58 pm

    implemented as agreed. kept the English Description as is:

    ref-18 (Mandatory)
    Context: PricingStructurePoint (complex type)

    English Description:
    The coordinate/generic/@href attribute is equal to the underlyingAsset/@id attribute

    Formal Description:
    [exists(underlyingAsset)]
    every $generic in coordinate/generic satisfies id($generic/@href) is underlyingAsset

  • matthewdr

    12/10/08 9:56 am

    Tested, results successful, now closing.

  • Leave an update

    You must be logged in to post an update.