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

RE: DTD and Illegal Construct

  • From: Deborah Aleyne Lapeyre <dalapeyre@m...>
  • To: xml-dev@l...
  • Date: Wed, 10 Jan 2001 19:56:37 -0500

RE: DTD and Illegal Construct
Wow, it was so good to see Sam Wilmott quoted again,
he is one of our industries real thinkers.

My personal favorite ambiguity puzzle (which I used to
give to SGML DTD-writer classes) goes something like this:
(It's been a while, so pleased forgive any ambiguity;
the wordiness is deliberate obfuscation.)

We need to write a single content model for an element.
That element contains 3 elements: X, Y, and A such that:

  - All X's (if any) must come before all Y's.
  - All X's must clump together. (e.g., X+ or X*)
  - All Y's must similarly clump together.
  - Both the potentially multiple X's and the
    potentially multiple Y's may be followed by
    multiple A's. (That is, if there are any A's,
    they always follow the X's or the Y's.)
  - A's are always optional.
  - Need not have X's or Y's.

The most straight-forward answers are ambiguous,
but listing the cases and solving those will
usually lead to a solution.  (Parser developers
see the solution intuitively, or so they claim.)

--Debbie

(By X's, I mean the plural of "X", sorry.)
-- 
======================================================================
Deborah Aleyne Lapeyre               mailto:dalapeyre@m...
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9633
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
   Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================

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.