FpML Issues Tracker
closed
Minor
Always
Validation Rules
Admin
None
Summary
The rule fx-46 has an XPath statement that should be a value.
In the HTML file some parts of the rule are given in bold and this appears to be a way to indicate that this is a value and not an XPath. If the rule is interpreted strictly as per FpML rule specification guidelines the value appears to be an XPath path to a node.
The rule today is: " fx-46 (Mandatory) Context: SideRates (complex type) currency1SideRate/sideRateBasis = either BaseCurrencyPerCurrency1 or Currency1PerBaseCurrency. "
The solution is to follow the FpML Rule Specification Guidelines and write these out as typed values, as per similar rules.
Proposed solution: " fx-46 (Mandatory) Context: SideRates (complex type) currency1SideRate/sideRateBasis = (fpml:SideRateBasisEnum("BaseCurrencyPerCurrency1"), fpml:SideRateBasisEnum("Currency1PerBaseCurrency")) "
The same problem also applies to fx-47, where the same solution should be applied.
Notes:
lyteck
09/16/08 4:29 pm
ValWG (2008-09-16): values and xpath/elements are differenciated by formatting in the HTML:
– values are courier, 12pt, bold, black font
– xpath / elements are courier, smaller 9pt, blue font
Adding quotes around values could make the distinction even more visible.
That said, The WG agreed to document the formatting convention in the specs (as opposed to making any changes yet to the syntax)
e.g., valueBaseCurrencyPerCurrency1 is Courier, 12pt, bold
in rules.css:
span.value {
font-family: Courier New, Courier, monospace;
font-weight: bold;
}
e.g., Xpath/elementsideRates/currency2SideRate/currency is formatted in Courier, small 9pt, blue
in rules.css:
span.element {
font-family: Courier New, Courier, monospace;
color: #0000d0;
font-size: 9pt;
}
action: Lyteck to document the formatting convention for values and xpath in the rule specifications.
matthew
09/16/08 8:49 pm
Documenting the convention on the HTML is good. However given a literal value of say “2” I have no idea whether it is text, decimal, duration in days, or an IDREF. The way we solved this in other parts of the validation rules is by being explicit, such as xs:string(“2”) for a string value. We still need to know what type it is.
lyteck
09/30/08 5:49 pm
added wording around formatting convention in a new section “4.6.5 Formatting” (as agreed at 2008-09-16 meeting) (see in branches/validation-rules)
please reopen and push forward at the valwg to include typing information.
matthew
09/30/08 8:07 pm
Lyteck wrote: “please reopen and push forward at the valwg to include typing information.”
lyteck
10/07/08 1:31 pm
ValWG 2008-10-07: Agreed to add quotes around strings. Not around numbers.
Note: a new @type attribute (of value “string”) is introduced in which triggers the addition of quotes automatically when converted to HTML.
e.g.,BreakageFee
lyteck
10/07/08 9:09 pm
fx-46, fx-47: quotes added around strings.
(this issue left open until agreed changes implemented throughout)
lyteck
10/08/08 2:11 pm
implemented quotes around string values throughout all rules.
matthewdr
10/08/08 2:38 pm
Closed after testing.