Max default length xsd string
39,391
The default is unlimited length - the spec say that xs:string
is '...finite-length sequences of characters...'
Author by
Sharpeye500
Updated on July 16, 2022Comments
-
Sharpeye500 almost 2 years
What is the default max length of xsd string if max length is not specified?
https://www.w3schools.com/xml/schema_facets.asp
maxLength - Specifies the maximum number of characters or list items allowed. Must be equal to or greater than zero.
Is it zero if not specified?
-
Michael Kay about 12 yearsOr one could argue that the limit is implementation-defined, since implementations are allowed to impose limits on the resources consumed by a document or a validation episode.
-
Sharpeye500 about 12 yearsIs there a link for reference on this, I truly can't find any where the max length of string in XSD if not supplied.
-
C. M. Sperberg-McQueen over 11 yearsSharpeye500, there is a good reason you cannot find any place where the default maximum length of a string in XSD is specified. The reason is that there is no such default maximum length. The XSD spec is clear that the string type includes strings of any finite length and that for that reason the type is infinite. For all infinite types, implementations may impose limits on the size of values they support; no minimum implementation limits are imposed by the XSD spec. See w3.org/TR/xmlschema11-2/#partial-implementation