Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - RE: [XML Schema 1.1] I respectfully recommend these changes to [Thread Next] RE: [XML Schema 1.1] I respectfully recommend these changes toTo: "'G. Ken Holman'" <gkholman@----------------.--->, <xmlschema-dev@--.---> Date: 5/12/2009 2:19:00 PM > Think of validating a 20Gb document made up of: > > <logs> > <log .... /> > <log .... /> > <log .... /> > ... > </logs> > > Very simple to validate as a pattern. A *big* burden to > support assertions for the entire tree. > > I'm not on the committee, but I suspect the requirement to > keep an entire document tree in memory for validation is a > non-starter. Whereas dealing with all of the information > about an element and its attributes can be done easily > because that is where the validator is at the time. > > . . . . . . . . . . . Ken If you change that to <logs count="28654"> <log> ... </logs> Then I think it's perfectly reasonable to have an assertion at the top level that says test="@count = count(log)" And indeed the specification allows you to do so. Some implementations will be able to handle this efficiently; some won't. Users will have to make decisions (about designing their schemas, and about choosing their products) that take this into account. So I don't think the argument based on performance is overriding. The main reason for not allowing navigation outside a subtree is the theory that a type defines a set of instances, and that the set of instances of a type doesn't depend on the phase of the moon. Regards, Michael Kay http://www.saxonica.com/ http://twitter.com/michaelhkay | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
