FpML Issues Tracker

722: disjoint referenceBank

May 28, 2008

closed

Minor

Always

Validation Rules

Admin

None

Summary

A new validation rule is needed to enforce referenceBanks are disjoint.

The new rule is: " shared-23 (Mandatory) Context: CashSettlementReferenceBanks (complex type) Rule: Each referenceBank/referenceBankId must be unique. The equivalence test is to compare the value of referenceBank/referenceBankId and (if it exists) referenceBank/referenceBankId/@referenceBankIdScheme. Also referenceBank/referenceBankName must be unique if it exists. Comment: Each referenceBankId and referenceBankName must be unique to a referenceBank. "

Notes:

  • matthewdr

    06/03/08 1:32 pm

    Agreed at VWG. Marc Gratacos to implement. The equivalence test will be represented as a function at Marc Gratacos’s request.

  • lyteck

    07/07/08 2:29 pm

    fixed as proposed (using new specs format)

  • matthewdr

    08/12/08 5:01 pm

    The rule was implemented as:

    shared-23 (Mandatory)
    Context: CashSettlementReferenceBanks (complex type)
    Each referenceBank/referenceBankId must be unique, referenceBanks should have the same-referenceBankIds, and, if it exists, referenceBank/referenceBankName must be unique.

    The problem at the moment is the function as written as a constraint.

    Proposal 1:

    shared-23 (Mandatory)
    Context: CashSettlementReferenceBanks (complex type)
    Each referenceBank/referenceBankId must be unique. The equivalence test is to compare the value of referenceBank/referenceBankId and (if it exists) referenceBank/referenceBankId/@referenceBankIdScheme. Also referenceBank/referenceBankName must be unique if it exists.

    Proposal 2:

    shared-23 (Mandatory)
    Context: CashSettlementReferenceBanks (complex type)
    Every unique-referenceBank(referenceBank) = true

    Function: unique-referenceBank
    Tests if referenceBanks are unique.
    * parameter: $referenceBank (fpml:ReferenceBank) (cardinality = 1)
    * test: (count(referenceBank[referenceBankId=$referenceBank/referenceBankdId][referenceBankId/@referenceBankIdScheme=$referenceBank/referenceBankdId/@referenceBankIdScheme]) < 2) and (count(referenceBank[referenceBankId=$referenceBank/referenceBankdId]) < 2) and (count(referenceBank[referenceBankName=$referenceBank/referenceBankName]) < 2) * result: xs:boolean

  • matthewdr

    08/13/08 2:30 pm

    This issue was discussed at the teleconference today between Lyteck, Mark, Marc, and myself.

    The decision was to move to a variation on Proposal 1 proposed by Marc. In essence we decided against providing unqiueness functions and instead just define the fields to be checked for uniqueness. We also agreed to make the rule two “and’ed” clauses.

    The agreed form is:

    shared-23 (Mandatory)
    Context: CashSettlementReferenceBanks (complex type)
    Each referenceBank must be unique. A referenceBank is identified by referenceBank/referenceBankId or by referenceBank/referenceBankName.
    Comment: Both a reference bank’s name and reference bank Id must be unique. The referenceBankIdScheme is part of the referenceBankId uniqueness check.

    It was agreed all the disjoint/unique constraints in shared should follow this form. This removes the need for functions for uniqueness.

  • lyteck

    08/13/08 7:32 pm

    Fixed shared-23 as agreed.

    Will follow same format to all other disjoint/unique constraints.

  • matthewdr

    08/19/08 5:17 pm

    CLosed following testing of resolution.

  • Leave an update

    You must be logged in to post an update.