FpML Issues Tracker
closed
Minor
Always
Validation Rules
Admin
None
Summary
The constraint ref-10 needs a guard on the existence of the tested item.
The rule today: " ref-10 (Mandatory) Context: PaymentCalculationPeriod (complex type) The @href attribute = the @id attribute of an element of type PricingStructure. "
The problem is that //element(*, PaymentCalculationPeriod)/@href is optional.
The rule could be rewritten as: " ref-10 (Mandatory) Context: PaymentCalculationPeriod (complex type)/@href id(.) instance of element(*, PricingStructure) "
Or as: " ref-10 (Mandatory) Context: PaymentCalculationPeriod (complex type) [exists(@href)] id(@href) instance of element(*, PricingStructure) "
Notes:
matthewdr
10/21/08 1:42 pm
Agreed at VWG to implement second proposal.
mgratacos
10/21/08 1:43 pm
Second proposal agreed.
h_mcallister
10/28/08 1:40 pm
“The problem is that //element(*, PaymentCalculationPeriod)/@href is optional.”
It’s not the only problem: the rule needs a relevant context. The PricingStructure abstract type is used in the valuation/pricing-and-risk subset of the Standard (fpml-riskdef-4-x.xsd, fpml-mktenv-4-x.xsd).
I note that there appears to be no guidance as to intended use in the samples.
lyteck
12/11/08 5:21 pm
By checking the schema in trunk and it looks like @href is mandatory attribute in PaymentCalculationPeriod. So no guard seems needed?
the rule implemented as a result of implementing issue 826 is:
ref-10 (Mandatory)
Context: PaymentCalculationPeriod (complex type)
English Description:
The @href attribute is equal to the @id attribute of an element of type PricingStructure
Formal Description:
id($context/@href) instance of element(*, PricingStructure)
matthewdr
12/15/08 11:17 am
Lyteck – you say “implemented”; do you mean the issue is resolved?
lyteck
12/15/08 2:12 pm
I am questioning whether the current implementation (re: my note 2212) is correct or if it indeed needs a guard (point of this issue 843)
Also, I am not sure if (and if so, what) further action is needed, based on Harry’s last comment.
matthewdr
12/15/08 3:14 pm
I confirm it does need the guard. Without the guard the rule fires when it shouldn’t. Adding the guard is what the VWG agreed.
”
Precise Description:
ref-10 (Mandatory)
Context: //element(*, PaymentCalculationPeriod)[exists(@href)]
Rule: id(@href) instance of element(*, PricingStructure)
”
lyteck
12/15/08 4:30 pm
added guard.