|
[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Ignore Order while validating XSD
From: Philip Aker <philip.aker@shaw.ca>
Date: Mon, 26 Jan 2009 06:26:56 -0800 Cc: 'Pete Cordell' <petexmldev@codalogic.com>, xmlschema-dev@w3.org Message-Id: <3CCF2F8D-62E9-4B4D-963A-229578E4D919@shaw.ca> To: Michael Kay <mike@saxonica.com> On 2009-01-26, at 05:32:31, Michael Kay wrote: >> Not being an XSD expert, maybe my question is "why can't the >> content ordering possibilities be specified as a regex-like >> pattern?". > One of the criticisms of DTDs, which XSD attempted to address, was > that DTDs > were written in a non-XML-like syntax which made it difficult for > applications to process the information (and difficult in many cases > for > authors to remember the syntax). The thinking was that by using an > XML-based > syntax, the data would be much more accessible; and some argued that > verboseness doesn't matter because authors would be working with > specialized > tools rather than editing at the source level. I see. I believe that syntax integrity is good. However, my thinking is that xs:pattern regexen are part of vocabulary, and elements, including user-defined element types, are now supported data types. Therefore a pattern can express element ordering possibilities using a subset of regex notation. So this mythical 'collection' model group would subsume 'all', 'choice', and 'sequence' by having the ordering specified in a 'pattern' attribute provided it could contain itself. <xsd:collection pattern="(b|c|x|xsd:collection){0,}, a{2}, (a|b|c|x) {0,}"> ⦠</xsd:collection> This would result in a simplification of both the specification and implementation and probably be more cost efficient in the long term. > There is continued interested in defining a less verbose syntax. > However, the XML Schema WG is very stretched for resources. If I had the money, I'd send you all millions. XSD is a truly worthy endeavor. Philip Aker echo astwta@l...@nl | tr a-z@. p-za-o.@ Democracy: Two wolves and a sheep voting on lunch.Received on Monday, 26 January 2009 14:27:38 GMT |
Subscribe in XML format
|






