- Knowledgebase
- Studio Guide
- List of OCL Methods
-
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
->size()
Description of the method
Description: |
->size() returns the occurrence number of the specified element. Please note that this differs from size used with dot notation, .size(), as that method returns the length of element in OCL. |
Available for: |
base64binary, boolean, datetime, double/decimal, date, hexBinary, integer, string, double/decimal and integer |
Parameters: | - |
Return type: | integer |
Example1
Context: | TransactionType1 |
OCL: |
self.Creditor.Name->size() = 1 |
Description: | The example rule mandates the usage of both Creditor Name. I.e. the size of occurrence number of element Creditor / Name has to be 1. |
The XML snippet below would pass this check.
<Transaction>
<Id>203</Id>
<Amount>201</Amount>
<Debtor>
<Name>Debtor2</Name>
</Debtor>
<Creditor>
<Name>Creditor2</Name>
</Creditor>
</Transaction>
<Transaction>
The other snippet below however would not pass
<Transaction>
<Id>203</Id>
<Amount>201</Amount>
<Creditor>
</Creditor>
</Transaction>
<Transaction>