Name

xs:maxLength

Synopsis

<xs:maxLength
  fixed = "( true | false )"
  id = "ID"
  value = "nonNegativeInteger" >
  <!-- (xs:annotation?) -->
</xs:maxLength>

The xs:maxLength facet element specifies the maximum number of characters in a type derived from xs:string, xs:QName, xs:anyURI, or xs:NOTATION. It can also be used to restrict xs:hexBinary and xs:base64Binary. However, in this case, it refers to the maximum number of bytes in the decoded data rather than the maximum number of characters in the encoded data. Finally, when applied to a list type, such as xs:IDREFS, it describes the maximum number of items in the list. If the fixed attribute has the value true, then types derived from this type are not allowed to override the value of maxLength given here.

Get XML in a Nutshell, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.