Skip to content

XSD

cardinality

For XML schema (XSD) only, there is a special cardinality query parameter which sets the xsd:element maxOccurs attribute. By default it is set to cardinality=n.

Cardinality=1 is useful when we require a schema for individual resources, such as for canonical URLs with a primary key column only.

Usage:

?cardinality=[xsd_maxOccurs_value]

Value type:

  • integer greater than 0
  • string "n"
  • string "unbounded"

Default: unbounded

Applicable to: list of resources, list of arrays, vectors

Examples:

/Invoice.xsd?cardinality=5 - XSD contains maxOccurs="5" and when validation will check how many times Invoice tag appears in XML file.