[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Error and Fatal Error

  • From: Stephen D Green <stephengreenubl@gmail.com>
  • To: Joe Fawcett <joefawcett@hotmail.com>
  • Date: Sat, 16 Jul 2011 17:09:20 +0100

Re:  Error and Fatal Error
It's a bane to developers that parsers regard errors in XML
as fatal which need not be fatal, IMO.
 
e.g. the .NET parser causes me grief when code falls over
because of illegal characters and the only thing I can find to
do is to recover from the error by catching it with its line
number and using that to find and replace the illegal character
with the respective escape sequence. It would be better, I
think, if the XML spec instructed parsers to fail such that
such characters could still be replaced without there being
any kind of exception beforehand. That's my opinion because
once an exception has occurred the state of the parser isn't
as safe as you'd really like it to be.
 
see my blog post about this http://stephengreenxml.blogspot.com/2011/03/xml-special-character-gotchas.html
 
So it would be better for future versions of XML (influenced
perhaps by recent discussion related to MicroXML on this list)
if the specs gave less of a push towards parsers regarding
errors as fatal. That is my opinion but I think is an opinion
of more and more others (or more and more frequently
expressed anyway).
----
Stephen D Green



On 16 July 2011 16:47, Joe Fawcett <joefawcett@hotmail.com> wrote:
Dear List Members

I'm writing a short introduction to XML and would like to have a good example of each of the above that doesn't require too much background knowledge. So far I've covered the basics of a well-formed document, creating elements and attributes. I've shied away from the intricacies of DTDs as they are covered in a separate article. Namespaces are also to be covered later so any examples would preferably be unrelated to either of these two areas.

According to the XML specification a processor may recover from an error that's not described as fatal although in my experience most parsers don't try to do this, would I be wrong here? - and if so what would an example be for something like Saxon or one of the netter known parsers?

Thanks

Joe





[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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
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.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.