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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: Handling well-formedness or validity errors

[ Lists Home | Date Index | Thread Index ]
  • From: Mike Brown <mbrown@corp.webb.net>
  • To: 'Seairth Jacobs' <seairth@bbglobex.com>
  • Date: Mon, 18 Dec 2000 19:15:38 -0700

Seairth Jacobs  wrote:
> When processing an XML ducument, how do you all suggest
> returning an appropriate error when the document is either
> not well-formed or is not valid (against a DTD or schema)?

I think you answered your own question in the rest of your message; you want
to avoid using transport-specific error messages for well-formedness or
validity errors. If there was no problem with the transmission/transport of
the data, regardless of how parseable it is, then an HTTP 4xx error response
is not appropriate.

However it is not out of the question to use the body of an HTTP response to
provide an acknowledgement and success/failure info, in any format.. just
don't pick the response code based on that. If the transmission was
successful, return a 200, 201 or 204, according to the guidelines in section
9.5 of the HTTP/1.1 spec. In fact, 10.2.1 says that for a POST (I do hope
you are using POST), a 200 indicates that the request succeeded and it
should provide an entity (body) describing or containing the result of the
action. So there you go. Success of the request is not the same as the
result of the action.

   - Mike
____________________________________________________________________
Mike J. Brown, software engineer at            My XML/XSL resources:
webb.net in Denver, Colorado, USA              http://skew.org/xml/




 

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

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