[XML-DEV Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Heed this warning about Postel's Prescription
- From: "Costello, Roger L." <costello@mitre.org>
- To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
- Date: Sun, 21 Jun 2015 12:06:49 +0000
Hi Folks,
[Definition] Bedevil: to cause great and continual trouble.
In Eric Raymond’s book [1] he writes:
Consider also Postel's Prescription: “Be liberal in what you accept, and conservative in what you send”. Postel was speaking of network service programs, but the underlying idea is more general. Well-designed programs cooperate with other programs by making
as much sense as they can from ill-formed inputs; they either fail noisily or pass strictly clean and correct data to the next program in the chain.
However, heed this warning:
|
The original HTML documents recommended “be generous in what you accept”, and it has bedeviled us ever since because each browser accepts a different superset of the specifications. It is the
specifications that should be generous, not their interpretation.
|
|
--
Doug McIlroy
|
|
McIlroy urges us to design for generosity rather than compensating for inadequate standards with permissive implementations. Otherwise, as he rightly points out, it's all too easy to end up in tag soup.
--------------------------------------
What does it mean to create a generous specification? Does Postel’s Prescription apply to XML Schema design? Suppose I create an XML Schema for, say, books. What would a
generous book XML Schema look like?
Postel’s Prescription says that my applications should accept/process XML inputs that are
kind of lousy, but my applications should only send out XML documents that are
perfect. Can you give an example of a kind of lousy book XML document that my applications should accept/process and a
perfect book XML document that my applications should send out?
/Roger
[1] Fabulous book: The Art of Unix Programming. It’s available (for free) online at
http://www.catb.org/esr/writings/taoup/html/
[2] This Wikipedia article defines “tag soup”:
https://en.wikipedia.org/wiki/Tag_soup
|
[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.
|
|