[XML-DEV Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Handling well-formedness or validity errors
- From: Seairth Jacobs <seairth@b...>
- To: xml-dev <xml-dev@l...>
- Date: Mon, 18 Dec 2000 09:46:25 -0500
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)? More specifically,
I am concerned with XML requests that are received over HTTP (or similar
transport) and require some form of response.
In a small specification I am working on, I have
come up with the following:
1) When it comes to validity, each request is
wrapped in a <add>, <edit>, <delete>, or <get>
block. The response document contains an associated <addresponse>,
<editresponse>, <deleteresponse>, or <getresponse>
block. On of the attributes is a success code similar to the HTTP response
codes. If the document is not valid according to the specification, the
appropriate response is sent back with the appropriate error code. This
seems fine as long as the the validity failure occurs inside of the root
element. Outside of the root element, I am not sure of the
appropriate response.
2) When it comes to well-formedness, I have no good
thoughts. Every idea I have thought of has a weakness or two. I
had even thought of returning an error at the HTTP level itself, but I didn't
want to tie the specification to the transport. Or do I need to? Is
it acceptable to use an HTTP-level 4xx error response when using HTTP as the
transport, while using a different method altogether when using an onrelated
transport (such as SMTP or FTP)?
Any thought would be appreciated.
|
|
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.
|
|