[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|