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

Re: Re: Getting info of runtime failure in saxon envi

Subject: Re: Re: Getting info of runtime failure in saxon environment
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Wed, 27 Feb 2013 16:28:41 +0000
Re:  Re: Getting info of runtime failure in saxon  envi
On 27/02/2013 15:56, John English wrote:
On 27/02/2013 12:41, Michael Kay wrote:
Note that the reason some parsers fail to provide location information for an
encoding error is that in a properly layered architecture you need to do
decoding before you start recognizing line endings, which means that the
information about line numbers is typically not available at the point where the
decoding error is detected.

I'm not sure I understand this. It seems from what you're saying that, for example, a compiler should also be unable to give line number information for errors (unless it's not "properly layered"). Shouldn't the tokeniser keep track of where each token comes from in the source file and be able to tell you this if asked?
My point is that to break a file into lines you need first to decode the bytes, and if it's sufficiently corrupt that you can't decode it, then knowing what line you're on requires some fancy footwork. Your decoding error was happening well before tokenization.

Michael Kay
Saxonica

Current Thread

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
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.