[XML-DEV Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
A Friday afternoon XML koan
- From: Roger L Costello <costello@mitre.org>
- To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
- Date: Fri, 6 May 2022 20:59:24 +0000

There are many aspects of XML that require knowledge of its context. For example, earlier in the week my “XML quiz” noted that & does not always mean & (in the context of a CDATA section or a comment it means & but otherwise it
means &)
So things are context-dependent.
Another way of saying it is: Things are context-sensitive. XML is context-sensitive.
Koan: If XML isn’t context-free, why are we always writing context-free grammars for it? (And don't say, "Because it's useful to do so;" that begs the question:
Why is it useful?)
Scroll down to see the answer …………..
Even though XML isn’t context-free as such, it is
locally context-free, in the sense that the set of permissible expressions within a small region in a particular XML document can be described by a context-free grammar.
Adapted from the article “The Concept of Grammar Adaptability” by John N. Shutt (https://web.cs.wpi.edu/~jshutt/adapt/concept.html)
|
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
|
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
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.
|
|