DR 09-0176 (string length constraints) - homework

Alex Brown alexb at griffinbrown.co.uk
Thu May 6 15:24:55 CEST 2010

Dear all,

I was asked to provide a general rationale for *not* expressing general string length constraints in OOXML. How about this?

The WG considers it inadvisable to modify the schema as suggested to specify minimum/maximum string lengths.

Maximum lengths tend to be implementation-specific and may be better defined by implementers. Inevitably even specifying some string lengths would result in a situation where some element with apparently unlimited length in fact had hidden constraints resulting from the architecture of the computer systems on which implementations run, thus the Standard would not accurately guarantee minimum/maximum lengths consistently. We know of no other mainstream document format (e.g. ODF, HTML, DocBook, NLM) that constrains string lengths in the manner suggested.

Specifying minimum lengths complicate the use case of having valid but text-free XML templates (or the creation of "skeleton" XML content when using a direct XML editor).

Furthermore, the WG notes that maximum string length constraints are in practice poorly implemented in XSD processors, and that no equivalent functionality exists for ISO/IEC 19757-2 - OOXML's other schema language.

On the question of quotation marks in attribute values, the correct mechanism is defined by the XML Recommendation §2.4, which states:

To allow attribute values to contain both single and double quotes, the apostrophe or single-quote character (') may be represented as " '  ", and the double-quote character (") as " "  "

- Alex.

Alex Brown
Convenor, ISO/IEC JTC 1/SC 34/WG 1
Editor, ISO/IEC 19757-1 (DSDL Overview)
Editor, ISO/IEC 19757-5 (Extensible Datatypes)

This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 

More information about the sc34wg4 mailing list