CLiX Validation Rules

Exported from "rule.clix" using the xlinkit Rule Workbench on Tue, 7 Dec 2004 at 10:23:19.

Rules

fixed-float, tradedate

fixed-float
This rule checks that a swap has a fixed and a floating leg. It detects the existence of the fixed leg by looking for a fixedRateSchedule element, and the floating leg by looking for a resetDates element.
Go to xlinkit -> Execute Rule and click on fpml-trade.xml to test the rule.
forall swap in //fpml:swap
(exists stream in $swap/fpml:swapStream
exists resets in $stream/fpml:resetDates
and
exists stream in $swap/fpml:swapStream
exists fixed in $stream/fpml:calculationPeriodAmount/fpml:calculation/fpml:fixedRateSchedule
)
tradedate
Check that a trade date is not on a weekend day, using a plugin operator. The operator was taken from the shipped date operators.
forall tradedate in //fpml:tradeDate
not day:isWeekendDay($tradedate)