From: Michael Kay <mhk@mh...> - 2004-09-07 22:13:31
Thanks for sending the extra info.
It turns out to be nothing to do with JDOM or with your application, the
problem can be reproduced by running effectively the same query from the
command line. It's already fixed in my current build. The problem is that
the initializing expression for a global variable isn't type-checked
thoroughly enough, which means in this case that the code for atomizing the
nodes isn't added. You can circumvent the problem by calling the data()
function to atomize the nodes explicitly, or by replacing the global
variable with a function, or by using a local variable declared using "let"
rather than a global variable.
I had encountered this one before but hadn't logged it as a bug because I
didn't get to the bottom of the cause.
> -----Original Message-----
> From: Michael Eichberg [mailto:eichberg@...]
> Sent: 07 September 2004 21:59
> To: mike@...
> Subject: Re: [saxon] java.lang.ClassCastException:
> Michael Kay wrote:
> >Thanks for reporting it. It looks as if for some reason the
> path expression
> >./@type hasn't been atomized before doing the comparison,
> which suggests the
> >compile-time type checking has gone wrong.
> >If you attached a source file, it didn't get past the
> mailing list software.
> >I tried to create my own data file and can't reproduce the
> problem, so
> >perhaps you could send the file to me direct (mike at
> saxonica.com). It
> >might also be useful to see your Java application code, and to have
> >confirmation of the versions of Saxon and JDOM that you are using.
> >Michael Kay
> I've made the smallest possible application that reproduces
> this exception (see -hopefully - attached zip file).
> (Java5RC1, JDOM B10 or JDOM 1.0-RC1 and Saxon 8.0(B))
> Start: "java test.Test"
> Michael Eichberg