[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Error and Fatal Error
On Mon, 2011-07-18 at 08:38 +0100, Stephen D Green wrote: > Thanks Liam, but it seems the spec also seeks to cater for the use case > where the conforming XML parser is used as a first step to repairing > errors, isn't it? No. The XML parser tells you whether your input conforms to the specification. > it seems document-centric use cases somehow > cloud the issue, which I respect if it was the primary scenario of XML). Pretty much the only scenario in fact. At any rate, the use case of random unknown humans typing markup into an HTML form in a Web browser and the developer wanting to hand that off to other tools without checking it at all was indeed not considered. The use case of random unknown humans typing (C code, SQL, assembly code, ...) into text boxes was not considered by the respective language designers either, many of whom would have had very little patience for the idea. Instead, give people a JavaScript-based front end to edit markup, ala wordpress, and then if the markup isn't well-formed, e.g. because they didn't go through the javascript front end, simply reject it on the server. You are asking compiler technology to do things it doesn't generally do. XML might look superficially like HTML, since they share a common SGML ancestry, but it is used very differently. Neither SGML not XML support automatic error correction. XML does not forbid it, as long as the parser notifies the application that the input is not in fact well-formed XML, but the result is no longer defined by the XML specification of course. I did actually use a C compiler with error recovery built in, a long time ago. I liked it, but, if an error was corrected, it did not generate code - the correction was used to give clearer messages. Liam -- Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/ Pictures from old books: http://fromoldbooks.org/
[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! 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
|