Reputation: 31
I have a WSDL with some types defined. Some elements accept lists of elements and on the service return I also have elements with list of values (or other elements).
As a result I have some magic numbers in the XSD (e.g. minOccurs="10", maxOccurs="250" etc). These values 10, 250 etc are repeated throughout the XSD types.
Is there a way to declare them as some sort of constants? and then reuse them by name for the minOccurs and maxOccurs attributes?
Upvotes: 3
Views: 234
Reputation: 163587
XSD is XML so you could use entities defined in a DTD:
minOccurs="&minOccurs;"
Upvotes: 0
Reputation: 6349
No there isn't. The only thing you could do is to pre-process the schema using some sort of template processor before loading.
Upvotes: 1