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

Re: Again wit da AND and Repetitions / Singletons in a DTD

  • From: terje@i... (Terje Norderhaug)
  • To: xml-dev@i...
  • Date: Mon, 17 May 1999 19:29:10 -0700

Re: Again wit da AND and Repetitions / Singletons in a DTD
At 11:50 AM 5/17/99, roddey@u... wrote:
>>>But I guess the & syntax from SGML is deceptively simple.  I don't
>>>completely follow that other thread, but I gather it's hard to implement
>>>which is probably why they left it out of XML.
>>
>>No, it is not particularly hard to implement support for the AND connector
>>in a validating parser. However, the AND connector is redundant, as one can
>>express the same using the other connectors (although not very elegant).
>>
>>For example, take the content model (A & B & C) expressing that we require
>>the three elements in any order. Here is the XML equivalent content model:
>
>  [snip]
>
>>However, there are better ways of implementing support for AND connectors
>>than to convert AND content model into such tree structures. Simply make
>>the parser keep track of which elements in the AND list have not yet been
>>parsed. For each element encountered, remove its item from the list. Signal
>>an error if the parser encounter an element not in the list of remainders,
>>unless all of the remainding elements in the list are optional. Repeat
>>until the list is empty or a parsed element is not in the list and all
>>remainders are optional.
>
>But that ignores the issue of what happens when an AND connector is embedded
>deeply with some very complex content model that is otherwise totally a
>straight
>XML type DFA! Do you then give up on doing a DFA for the entire content model
>when that happens? If not, then how do you do it? If you do, then its not
>terribly simple to do and its definitely not terribly quick. This gets back to
>my original question of how to deal with AND.

Please provide an example of such a complex content model that includes use
of AND, simplified as much as possible while still demonstrating your
point.

-- Terje <Terje@i...> | Media Design in*Progress

   Software for Mac Web Professionals at <http://www.in-progress.com>
   Take advantage of XML with Emile, the first XML editor for Mac.



xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


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.