Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - RE: Ignore Order while validating XSD [Thread Next] Re: Ignore Order while validating XSDTo: Michael Kay <mike@--------.---> Date: 1/25/2009 10:27:00 PM 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,}"> =E2=80=A6 </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. From eduardo.oliveirared@e... Mon Jan 26 18:31:53 2009 Received: from farnsworth. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
