FpML 4.5 Validation Rules - Rules for Shared Elements

This is the shared element part of the validation rule set accompanying the FpML 4.5 Last Call Working Draft. The introductory section in the draft contains background information and documentation for this page.

The rules contained on this page contain links to cut down versions of valid and invalid test cases. These test cases have been analysed using Systemwire's xlinkit rules to highlight relevant document portions accessed by a rule. These cut down test cases are non-normative and are provided for the purpose of documentation only.

Content

Namespace

default element namespace = http://www.fpml.org/2008/FpML-4-5

namespace xs = http://www.w3.org/2001/XMLSchema

Functions

The following shared functions are used in the rules.

Rules

Unique contexts:

shared-1 (Mandatory)
Context: BusinessDayAdjustments (complex type)
English Description:
businessCentersReference or businessCenters must exist if and only if the value of businessDayConvention is not equal to "NONE" or "NotApplicable".
Formal Description:
iff(exist businessCentersReference or businessCenters, businessDayConvention neq "NONE" or "NotApplicable")
Test cases: [Valid] [Valid] [Invalid] [Invalid] [Invalid] [Invalid] [Invalid] [Invalid] [Invalid] [Invalid]
shared-4 (Mandatory)
Context: RelativeDateOffset (complex type)
Formal Description:
[dayType eq "Business"]
businessDayConvention eq "NONE"
Test cases: [Valid] [Invalid]
shared-5 (Mandatory)
Context: payerPartyReference (complex type)
DirectionalLeg (complex type)
EquityPremium (complex type)
ExerciseFee (complex type)
ExerciseFeeSchedule (complex type)
FeaturePayment (complex type)
FxOptionPremium (complex type)
GrossCashflow (complex type)
IndependentAmount (complex type)
InitialPayment (complex type)
InterestRateStream (complex type)
PassThroughItem (complex type)
Payment (complex type)
PaymentBase (complex type)
PaymentMatching (complex type)
PrePayment (complex type)
PrincipalExchangeDescriptions (complex type)
QuotablePayment (complex type)
ReturnSwapAdditionalPayment (complex type)
ReturnSwapLeg (complex type)
SimplePayment (complex type)
Formal Description:
payerPartyReference/@href neq receiverPartyReference/@href
Test cases: [Valid] [Invalid] [Invalid]
shared-6 (Mandatory)
Context: AmericanExercise (complex type)
Formal Description:
[exists(latestExerciseTime)]
earliestExerciseTime/hourMinuteTime lt latestExerciseTime/hourMinuteTime
Test cases: [Valid] [Invalid] [Invalid]
shared-7 (Mandatory)
Context: BermudaExercise (complex type)
Formal Description:
[exists(latestExerciseTime)]
earliestExerciseTime/hourMinuteTime lt latestExerciseTime/hourMinuteTime
Test cases: [Valid] [Valid] [Invalid]
shared-8 (Mandatory)
Context: DateRange (complex type)
Formal Description:
unadjustedFirstDate lt unadjustedLastDate
Test cases: [Valid] [Valid] [Invalid] [Invalid] [Invalid]
shared-9 (Mandatory)
Context: BusinessDateRange (complex type)
English Description:
if and only if neither businessCentersReference nor businessCenters exists, businessDayConvention is equal to ("NONE", "NotApplicable").
Formal Description:
iff(not exist (businessCentersReference or businessCenters), businessDayConvention eq ("NONE", "NotApplicable"))
Test cases: [Valid] [Valid] [Invalid]
shared-10 (Mandatory)
Context: CalculationAgent
Formal Description:
The values of calculationAgentPartyReference/@href attributes shall be unique
Test cases: [Valid] [Valid] [Invalid]
shared-11 (Mandatory)
Context: Trade (complex type)
Formal Description:
[exists(//businessDateRange)]
Every $businessCentersReference in //businessCentersReference satisfies $businessCentersReference/@href eq //businessCenters/@id
Test cases: [Valid] [Valid] [Invalid]
shared-12 (Mandatory)
Context: Document (complex type)
Formal Description:
For buyerPartyReference anywhere in the document, @href shall match the @id attribute of a party element or the @id attribute of a tradeSide element
Test cases: [Valid] [Invalid]
shared-13 (Mandatory)
Context: Document (complex type)
English Description:
For sellerPartyReference anywhere in the document, @href shall match the @id attribute of a party element or the @id attribute of a tradeSide element.
Formal Description:
Every $sellerPartyReference in //sellerPartyReference satisfies $sellerPartyReference/@href eq (trade/tradeSide, party)/@id
Test cases: [Valid] [Invalid]
shared-14 (Mandatory)
Context: Document (complex type)
Formal Description:
Every $calculationAgentPartyReference in //calculationAgentPartyReference satisfies $calculationAgentPartyReference/@href eq party/@id
Test cases: [Valid] [Invalid]
shared-15 (Mandatory)
Context: Offset (complex type)
English Description:
dayType must only exist if and only if period is D and periodMultiplier is non-zero.
Formal Description:
[exists(dayType)]
iff((period eq "D"), (offset/periodMultiplier neq 0))
Test cases: [Valid] [Invalid] [Invalid]
shared-16 (Mandatory)
Context: Document (complex type)
Formal Description:
[exists(trade)]
every $party in trade/tradeSide/*/party satisfies $party/@href eq party/@id
shared-17 (Mandatory)
Context: Document (complex type)
Formal Description:
[exists(trade)]
Every $account in trade/tradeSide/*/account satisfies $account/@href eq party/account/@id
shared-18 (Mandatory)
Context: AcceptQuote (complex type)
AllocationAmended (complex type)
AllocationCancelled (complex type)
AllocationCreated (complex type)
AmendmentConfirmed (complex type)
CancelTradeCashflows (complex type)
CancelTradeConfirmation (complex type)
CancelTradeMatch (complex type)
ConfirmationCancelled (complex type)
ConfirmTrade (complex type)
ContractCreated (complex type)
ContractFullTermination (complex type)
ContractFullTerminationCancelled (complex type)
ContractIncreased (complex type)
ContractIncreasedCancelled (complex type)
ContractNovated (complex type)
ContractNovatedCancelled (complex type)
ContractPartialTermination (complex type)
ContractPartialTerminationCancelled (complex type)
ContractReferenceMessage (complex type)
CreditEventNotification (complex type)
DataDocument (complex type)
DrawdownNotice (complex type)
IncreaseConfirmed (complex type)
InterestPaymentNotice (complex type)
ModifyTradeConfirmation (complex type)
ModifyTradeMatch (complex type)
NovationMessage.model
OneOffFeeNotice (complex type)
OnGoingFeeNotice (complex type)
PositionReport (complex type)
PositionsAcknowledged (complex type)
PositionsAsserted (complex type)
PositionsMatchResults (complex type)
Quote (complex type)
QuoteAcceptanceConfirmed (complex type)
QuoteUpdated (complex type)
RepaymentConfirmationNotice (complex type)
RepaymentNotice (complex type)
RequestAllocation (complex type)
RequestAmendmentConfirmation (complex type)
RequestIncreaseConfirmation (complex type)
RequestPortfolio (complex type)
RequestPositionReport (complex type)
RequestQuote (complex type)
RequestQuoteResponse (complex type)
RequestTerminationConfirmation (complex type)
RequestTradeConfirmation (complex type)
RequestTradeMatch (complex type)
RequestTradeStatus (complex type)
RequestValuationReport (complex type)
TerminationConfirmed (complex type)
TradeAffirmation (complex type)
TradeAffirmed (complex type)
TradeAlleged (complex type)
TradeAlreadyMatched (complex type)
TradeAlreadySubmitted (complex type)
TradeAmended (complex type)
TradeAmendmentRequest (complex type)
TradeAmendmentResponse (complex type)
TradeCancelled (complex type)
TradeCashflowsAsserted (complex type)
TradeCashflowsMatchResult (complex type)
TradeConfirmed (complex type)
TradeCreated (complex type)
TradeErrorResponse (complex type)
TradeExecution (complex type)
TradeExecutionCancelled (complex type)
TradeExecutionModified (complex type)
TradeIncreaseRequest (complex type)
TradeIncreaseResponse (complex type)
TradeMatched (complex type)
TradeMismatched (complex type)
TradeNotFound (complex type)
TradeStatus (complex type)
TradeTerminationRequest (complex type)
TradeTerminationResponse (complex type)
TradeUnmatched (complex type)
ValuationReport (complex type)
Formal Description:
Each party/partyId must be unique. Each party/partyName must be unique
Comment: Both a party's name and party Id must be unique. The partyIdScheme is part of the partyId uniqueness check.
shared-19 (Mandatory)
Context: AcceptQuote (complex type)
AllocationAmended (complex type)
AllocationCancelled (complex type)
AllocationCreated (complex type)
AmendmentConfirmed (complex type)
CancelTradeCashflows (complex type)
CancelTradeConfirmation (complex type)
CancelTradeMatch (complex type)
ConfirmationCancelled (complex type)
ConfirmTrade (complex type)
ContractCreated (complex type)
ContractFullTermination (complex type)
ContractFullTerminationCancelled (complex type)
ContractIncreased (complex type)
ContractIncreasedCancelled (complex type)
ContractNovated (complex type)
ContractNovatedCancelled (complex type)
ContractPartialTermination (complex type)
ContractPartialTerminationCancelled (complex type)
ContractReferenceMessage (complex type)
CreditEventNotification (complex type)
DataDocument (complex type)
DrawdownNotice (complex type)
IncreaseConfirmed (complex type)
InterestPaymentNotice (complex type)
ModifyTradeConfirmation (complex type)
ModifyTradeMatch (complex type)
NovationMessage.model
OneOffFeeNotice (complex type)
OnGoingFeeNotice (complex type)
PositionReport (complex type)
PositionsAcknowledged (complex type)
PositionsAsserted (complex type)
PositionsMatchResults (complex type)
Quote (complex type)
QuoteAcceptanceConfirmed (complex type)
QuoteUpdated (complex type)
RepaymentConfirmationNotice (complex type)
RepaymentNotice (complex type)
RequestAllocation (complex type)
RequestAmendmentConfirmation (complex type)
RequestIncreaseConfirmation (complex type)
RequestPortfolio (complex type)
RequestPositionReport (complex type)
RequestQuote (complex type)
RequestQuoteResponse (complex type)
RequestTerminationConfirmation (complex type)
RequestTradeConfirmation (complex type)
RequestTradeMatch (complex type)
RequestTradeStatus (complex type)
RequestValuationReport (complex type)
TerminationConfirmed (complex type)
TradeAffirmation (complex type)
TradeAffirmed (complex type)
TradeAlleged (complex type)
TradeAlreadyMatched (complex type)
TradeAlreadySubmitted (complex type)
TradeAmended (complex type)
TradeAmendmentRequest (complex type)
TradeAmendmentResponse (complex type)
TradeCancelled (complex type)
TradeCashflowsAsserted (complex type)
TradeCashflowsMatchResult (complex type)
TradeConfirmed (complex type)
TradeCreated (complex type)
TradeErrorResponse (complex type)
TradeExecution (complex type)
TradeExecutionCancelled (complex type)
TradeExecutionModified (complex type)
TradeIncreaseRequest (complex type)
TradeIncreaseResponse (complex type)
TradeMatched (complex type)
TradeMismatched (complex type)
TradeNotFound (complex type)
TradeStatus (complex type)
TradeTerminationRequest (complex type)
TradeTerminationResponse (complex type)
TradeUnmatched (complex type)
ValuationReport (complex type)
Formal Description:
Each party/account/accountId must be unique. An account is identified by party/account/accountId or by party/account/accountName
Comment: Both an account's name and account Id must be unique. The accountIdScheme is part of the accountId uniqueness check.
shared-20 (Mandatory)
Context: AdjustableDates (complex type)
Formal Description:
Each unadjustedDate must be distinct
shared-21 (Mandatory)
Context: BusinessCenters (complex type)
Formal Description:
Each businessCenter must be unique. A business center is identified by businessCenter
Comment: Each business centre must be uniquely identified. The businessCenterScheme is part of the businessCenter uniqueness check.
shared-22 (Mandatory)
Context: CalculationAgent (complex type)
Formal Description:
Each calculationAgentPartyReference/@href must be unique
Comment: Each party needs only be referenced once as a calculation agent.
shared-23 (Mandatory)
Context: CashSettlementReferenceBanks (complex type)
Formal Description:
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.
shared-24 (Mandatory)
Context: RoutingIds (complex type)
Formal Description:
Each routingId must be unique
Comment: Each routing Id must be unique. The routingIdCodeScheme is part of the RoutingId uniqueness check.
shared-25 (Mandatory)
Context: Schedule (complex type)
English Description:
Each step happens on a separate date.
Formal Description:
[number of steps ge 2]
step/stepDate must be unique

Deprecated rules

Removed rules

shared-2 (Mandatory)
REMOVED: Context: Offset; Description: If the dayType element exists then the period must be "D".
shared-3 (Mandatory)
REMOVED: Context: Offset; Description: If the dayType is "Business" then the periodMultiplier must be non-zero.