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 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)
iff(exist businessCentersReference or businessCenters, businessDayConvention != "NONE" or "NotApplicable").
Comment: businessCentersReference or businessCenters must exist if and only if the value of businessDayConvention is not equal to "NONE" or "NotApplicable".
Test cases: [Valid] [Valid] [Invalid] [Invalid] [Invalid] [Invalid] [Invalid] [Invalid] [Invalid] [Invalid]
shared-4 (Mandatory)
Context: RelativeDateOffset (complex type)
[dayType = "Business"]
businessDayConvention = "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)
payerPartyReference/@href != receiverPartyReference/@href.
Test cases: [Valid] [Invalid] [Invalid]
shared-6 (Mandatory)
Context: AmericanExercise (complex type)
[exists(latestExerciseTime)]
earliestExerciseTime/hourMinuteTime < latestExerciseTime/hourMinuteTime.
Test cases: [Valid] [Invalid] [Invalid]
shared-7 (Mandatory)
Context: BermudaExercise (complex type)
[exists(latestExerciseTime)]
earliestExerciseTime/hourMinuteTime < latestExerciseTime/hourMinuteTime.
Test cases: [Valid] [Valid] [Invalid]
shared-8 (Mandatory)
Context: DateRange (complex type)
unadjustedFirstDate < unadjustedLastDate.
Test cases: [Valid] [Valid] [Invalid] [Invalid] [Invalid]
shared-9 (Mandatory)
Context: BusinessDateRange (complex type)
iff(not exist (businessCentersReference or businessCenters), businessDayConvention = ("NONE", "NotApplicable")).
Comment: if and only if neither businessCentersReference nor businessCenters exists, businessDayConvention = ("NONE", "NotApplicable").
Test cases: [Valid] [Valid] [Invalid]
shared-10 (Mandatory)
Context: CalculationAgent
The values of calculationAgentPartyReference/@href attributes shall be unique.
Test cases: [Valid] [Valid] [Invalid]
shared-11 (Mandatory)
Context: Trade (complex type)
[exists(//businessDateRange)]
Every $businessCentersReference in //businessCentersReference satisfies $businessCentersReference/@href = //businessCenters/@id
Test cases: [Valid] [Valid] [Invalid]
shared-12 (Mandatory)
Context: Document (complex type)
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)
Every $sellerPartyReference in //sellerPartyReference satisfies $sellerPartyReference/@href = (trade/tradeSide, party)/@id.
Test cases: [Valid] [Invalid]
shared-14 (Mandatory)
Context: Document (complex type)
Every $calculationAgentPartyReference in //calculationAgentPartyReference satisfies $calculationAgentPartyReference/@href = party/@id.
Test cases: [Valid] [Invalid]
shared-15 (Mandatory)
Context: Offset (complex type)
[exists(dayType)]
iff((period = "D"), (offset/periodMultiplier != 0)).
Test cases: [Valid] [Invalid] [Invalid]
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.
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)
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)
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)
Each unadjustedDate must be distinct.
shared-21 (Mandatory)
Context: BusinessCenters (complex type)
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)
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)
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)
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)
[number of steps >= 2]
step/stepDate must be unique.
Comment: Each step happens on a separate date.

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.