- Knowledgebase
- Studio Guide
- Training Expert
-
Glossary
-
XML / ISO 20022 Standard
-
ISO 20022 Messages
-
XML Schema
- Miscellaneous
- Attribute
- Closing Tag
- Comment
- Content
- Cvc-complex-type
- Cvc-elt
- Cvc-id
- Cvc-identity-constraint
- Cvc-minexclusive-valid
- Cvc-mininclusive-valid
- Cvc-type
- Cvc-totaldigits-valid
- Cvc-attribute
- Cvc-datatype-valid
- Maximum Length
- Cvc-enumeration-valid
- Cvc-fractiondigits-valid
- Cvc-length-valid
- Cvc-maxexclusive-valid
- Cvc-maxinclusive-valid
- Cvc-maxlength-valid
- Cvc-minlength-valid
- Cvc-pattern-valid
- Element Value
- Encoding
- Length
- Mandatory element
- Missing
- Missing Tag
- Missing Child Element
- MIXD
- Root
- Unsupported Characters
- UTF-8
- Value
- Wrong Declaration
-
EPC SEPA
-
CGI-MP
-
US ACH (Nacha)
-
SWIFT MT
-
Finvoice
-
Bank-Specific
-
XMLdation Service Guides
-
Studio Guide
-
Simulator
C - Expert 3 - Calculations within collections
Purpose Purpose of the section is to introduce calculation within collections
Description
- Adding a rule which compares the value of NbOfTxs to the amount of Tx occurrences within file
- Testing
Instructions
1: Adding a rule which compares the value of NbOfTxs to the amount of Tx occurrences within file
When we are comparing a value of an element to a number of occurrences of another element, we first have to find a shared context for both of these elements and keep in mind that we most likely are comparing a string value to an integer value, depending on the type defined in the schema.
In this rule, we can start by making a rule from scratch. We should select NumberOfTransactions from the tree, but this time choosing plus icon instead of a dropdown. Following empty modal should now be visible.
We now have to fill every mandatory text box manually.
First common type of the relevant elements has to be "Message", and OCL code will be as follows:
self.Header.NumberOfTransactions = self.Transaction->size()
->size() will return an integer of the amount of Transaction elements.
2: Testing
Testing should include both valid and invalid amounts.