windler
windler

Reputation: 57

setting minOccurs-value with the value of another attribute in a xsd-file

I am writing a xsd-schema file and I need to ensure that a value of an attribute (positve integer) is also the value of minOccurs and maxOccurs of another attribute. Is this somehow possible?

Upvotes: 0

Views: 66

Answers (1)

Petru Gardea
Petru Gardea

Reputation: 21638

Not with XSD 1.0 alone.

If you could use another schema language with XSD 1.0, Schematron can do it. If you can move to XSD 1.1, an xsd:assert would do the same thing here (as the Schematron).

Upvotes: 1

Related Questions