DR 09-0176 (string length constraints) - homework
Chris Rae
Chris.Rae at microsoft.com
Thu May 6 15:51:36 CEST 2010
This looks good to me - we (Microsoft) do already cover the maximum string lengths we can deal with in different situations in our existing implementer's notes. There are other precedents for similar behaviour - for example, the standard does not call out in schema the maximum number of levels of grouping and outlining that can exist in SpreadsheetML - Excel can deal with a maximum of seven; this limit is mentioned only in an informative note (and one could argue ought to instead be in an implementer's note).
Chris
-----Original Message-----
From: Alex Brown [mailto:alexb at griffinbrown.co.uk]
Sent: 06 May 2010 06:25
To: 'e-SC34-WG4 at ecma-international.org'
Subject: DR 09-0176 (string length constraints) - homework
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