[Home] [By Thread] [By Date] [Recent Entries]

  • To: "'Greg Hunt'" <greg@f...>,<xml-dev@l...>
  • Subject: RE: Constrain the Number of Occurrences of Elements in your XML Schema
  • From: "Michael Kay" <mike@s...>
  • Date: Sun, 7 Aug 2005 21:36:30 +0100
  • In-reply-to: <42F574A6.9010702@f...>
  • Thread-index: AcWa+bvn5GWhFpxZQGOJCXc1pZVkKwAlWvMg

> If we don't put these limits in the schema, they just have to go 
> somewhere else, somewhere less visible, less maintainable, 
> and with less 
> tool support. How SHOULD we do this if we aren't using the schema for 
> validation of these constraints?

If processing is limited by memory size, then let the limit be enforced by
the memory manager. That way, if you add more memory, the limit goes away.
The concern at higher levels should only be to trap the errors coming from
lower levels and produce meaningful diagnostics and helpful recovery
actions.

I would say it is definitely bad design to try to write a schema that
imposes its own limits solely in order to prevent an "out of memory" error
happening.

Michael Kay
http://www.saxonica.com/



Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member