[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Must DTDs constrain order?

  • From: Rick JELLIFFE <ricko@g...>
  • To: xml-dev@l...
  • Date: Sat, 28 Oct 2000 05:02:53 +0800

Re: Must DTDs constrain order?
Michael Rossi wrote:
 
>         In an SGML DTD you would do this with the "&" operator.
> Unfortunately, XML has dropped the "&" in the interest of simplicity (that
> is, simplicity of parser implementation). Maybe now that we're all
> sophisticated enough to handle XML Schemas, we should bring back the "&" in
> DTDs. :-) But I digress.

The Schema WG took a decision that, for XML Schemas 1.0, we wanted it to
be able to be implemented using a (deeterministic) Finite State Machine,
if possible. 

This has two ramifications. First that the content models do not require
lookahead or backtracking: so unambiguous content models are not
allowed.

Second, that the SGML "&" operator could easily cause combinatorial
explosions 
that were not expected by the user, especially if nested within
repeating groups of various sorts.  This could, in fact, be used as a
kind of virus. 

Rather than completely banning them, the WG has allowed an <any> group
at the top-level only. Of course, this is also subject to combinatorial
explosions, but not at nearly the same rate, and probably not of the
same order (anyone who can spare the time working out the order, please
post it to this list: I guess that an any group is O(n!) but it is not
my game.)

Of course, it can be solved simply by implementing an any group as an
array rather than a FSM.  

If it can be shown that there is no need to worry, and that allowing
FSMs implementations does not simplify implementations, then it is not
impossible that some future version of XML Schemas could relax these
rules.  But they are not arbitrary.

Rick Jelliffe

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.