I work on a W3C XML Schema (not written by me). One tool, xmllint, refuses to use the schema:
traceroute.xsd:658: element element: Schemas parser error : Element
'{http://www.w3.org/2001/XMLSchema}element', attribute 'maxOccurs': The value
'4294967295' is not valid. Expected is '(xs:nonNegativeInteger | unbounded)'.
4294967295 is 2^32-1 so, clearly, xmllint implements integers with signed 32bits number and that's not enough.
Is xmllint right? The standard apparently does not limit the size of integers:
http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#p-max_occurs http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#nonNegativeInteger
The value space of nonNegativeInteger is the infinite set {0,1,2,...}.
So, implementors are supposed to use infinite integers...
What are the best practices?
Should implementors use bigints or similar things? (In that case, xmllint is wrong.)
Should schema authors limit themselves to "reasonable" values for maxOccurs? (In that case, I will report the issue to the schema authors.)