Thanks for reporting these.
The first one, with string literals, is easy to fix: the code is already
trying to deal with this situation but there's a trivial coding error.
The problems with direct attribute constructors are a bit trickier because
these get parsed twice: that's done because the expressions in the attribute
value (between curly braces) can use namespace prefixes that haven't been
declared yet. This is why the error message is appearing twice. Probably if
any errors are reported during the first pass over the attribute, the second
pass shouldn't be attempted.
Regards,
Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay
> -----Original Message-----
> From: Gunther Rademacher [mailto:grd@...]
> Sent: 23 August 2009 15:03
> To: saxon-help@...
> Subject: [saxon] XQuery error message line/column numbers
>
> Here are two observations that I made on line/column numbers
> of Saxon's XQuery error messages.
>
> First, the line number may be wrong by the number of line
> feeds preceding the error location, when those line feeds
> occur inside of string literals or direct attribute content.
> E.g. for either of
>
> "x
> y",%
> or
> <e a="x
> y"/>,%
>
> the error is reported in line 1, regardless of how many line
> feeds are enclosed between the quotes.
>
> Second, for errors in embedded expressions of direct
> attribute constructors there are two error messages
> indicating different column numbers. E.g. for
>
> (:xxxxxxxx:)
> <e a="{+}"/>
>
> the first reported column number includes a count of any
> characters preceding the error location (the comment as
> well), whereas the second one will point to the angle bracket
> starting the element constructor.
>
> Tested with both Saxon-HE 9.2.0.2J and Saxon 9.1.0.5J.
>
> Best regards
> Gunther
>
>
> --------------------------------------------------------------
> ----------------
> Let Crystal Reports handle the reporting - Free Crystal
> Reports 2008 30-Day trial. Simplify your report design,
> integration and deployment - and focus on what you do best,
> core application coding. Discover what's new with Crystal
> Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> saxon-help mailing list archived at
> http://saxon.markmail.org/ saxon-help@...
> https://lists.sourceforge.net/lists/listinfo/saxon-help
|