[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: saxon fatal error reports odd location
Firstly, credit where credit is due: the XML parser that ships with Saxon is David Megginson's AElfred, upgraded to SAX2 by David Brownell, and with two or three bug fixes added by me. In most cases where it gets the line numbering wrong, it's because it's confused about the character encoding. It's difficult to count newline characters if you're looking for them in the wrong encoding. That doesn't seem to be the case here. I think it's more likely to be due to differences in handling CR, CRLF, and LF sequences. Looking at the code (which I'm hesitant to touch as I don't have a regression test suite for it) I suspect that it's not incrementing the line number and resetting the column number when it finds a CR that isn't paired with an LF, while processing PCDATA. There's some pretty hairy optimisation code in AElfred doing lookahead and backtracking, and I suspect speed was regarded as more important than getting the column number right. Mike Kay > > Fatal error reported by XML parser: required string (expected > "BIOGPROSE") > URL: file:/C:/Documents and Settings/dave/Desktop/XSLT/all.xml > Line: 27643 > Column: 1982 > Transform failed: required string (expected "BIOGPROSE") > > I considered posting this message at http://saxon.xsl.listbot.com/, but I couldn't find a way to post to it without actually registering and subscribing, which I presumed would flood my mailbox Traffic on that list is quite bearable, about 1 to 5 messages on a typical day. Mike Kay XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|