[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Handling well-formedness or validity errors
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/
|
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
|