OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Postel's Law Has No Exceptions

[ Lists Home | Date Index | Thread Index ]

At 05:02 PM 8/19/2003, Simon St.Laurent wrote:
>From:
>http://www.aaronsw.com/weblog/001025
>
>"This is not to say that all apps should have to process invalid
>documents, or that they should work hard to guess what the author meant,
>or that we should encourage or tolerate invalid documents. We should try
>still try to get rid of invalid documents, but taking things out on the
>users is the wrong way to do it.

"Postel's Law", generally quoted as "be liberal in what you accept and 
conservative in what you put out", was originally stated thus:


>   The implementation of a protocol must be robust.  Each implementation
>   must expect to interoperate with others created by different
>   individuals.  While the goal of this specification is to be explicit
>   about the protocol there is the possibility of differing
>   interpretations.  In general, an implementation should be conservative
>   in its sending behavior, and liberal in its receiving behavior.  That
>   is, it should be careful to send well-formed datagrams, but should
>   accept any datagram that it can interpret (e.g., not object to
>   technical errors where the meaning is still clear).

It was not meant as a universal law for all applications, it was a great 
design guideline for an Internet protocol. It was not phrased as a 
universal law, but as a guideline that is useful "in general" for protocols.

It's not a great policy in some environments. If you are a database, 
blindly shooting data that is clearly bad into the database will get you 
into trouble very quickly. If you are a web site that displays stock 
prices, and you get a data feed that says that the S&P is in negative 
digits, you probably do not want to pass that information on to the user, 
it is much better to raise an error.

It's not a bad policy for browsers. The web log entry seems to be thinking 
primarily about things like text oriented web pages, and seems to make the 
assumption that XML is primarily another web page format. If Aaron is 
trying to say that a web browser that is trying to display XML should try 
to recover from errors and display whatever it can, that makes sense. He 
could have said it more clearly.

Jonathan  





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS