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

Re: Heed this warning about Postel's Prescription

  • From: Michael Kay <mike@saxonica.com>
  • To: "Costello, Roger L." <costello@mitre.org>
  • Date: Sun, 28 Jun 2015 21:52:07 +0100

Re:  Heed this warning about Postel's Prescription
Let’s just face it, there are arguments for Postel’s Law and there are arguments against.

XML has opted for the “be strict in what you accept” approach, which forces senders to be strict in what they transmit. The effect of that policy is that people who create garbage and call it XML find that no-one can use it. Hopefully this creates a feedback loop that forces them to change their ways, though there are often a lot of StackOverflow questions raised (by frustrated would-be recipients) en route to that goal.

If you go for the opposite “be liberal in what you accept” approach, senders will take less care over what they produce, and some recipients will be able to handle it and others won’t.

Which approach generates better interoperability in the long run? I don’t think anyone has a definitive answer to that question. But all my instincts tell me that I want to know the rules and I’m prepared to abide by them if it means that other people who do the same can communicate with me.

Michael Kay
Saxonica


> On 28 Jun 2015, at 20:59, Costello, Roger L. <costello@mitre.org> wrote:
> 
> How might Postel's Law be applied to web services that receive XML and sends out XML? 
> 
> Here are two ways:
> 
> 1. The web service is willing to receive UTF-8 XML documents containing a pseudo-BOM. The web service sends out UTF-8 XML documents without a pseudo-BOM. [1] 
> 
> 2. The web service is willing to receive XML character streams with Unicode decoding errors: it processes the character stream by replacing the offending bytes by the Unicode replacement character U+FFFD until it manages to resynchronize the UTF-{8,16} byte stream. The web service sends out XML documents without character decoding errors. [2] 
> 
> /Roger
> 
> [1] See Rick Jelliffe's post on the xml-dev list: http://lists.xml.org/archives/xml-dev/201506/msg00065.html 
> 
> [2] See Daniel Bunzli's post on the unicode list: http://www.unicode.org/mail-arch/unicode-ml/y2015-m06/0247.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!

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.