Re: ACTION-512 - Research getting line and column information from XPath

One additional gotcha here is that Saxon's DOMs aren't modifiable, so
can't be used in most parts of the code where we build one up. So: use
Saxon to parse the source Document and the default Xerces for
everything else. Cross your fingers that this works out.

Also: I have a feature request for DOM Level 4... can you guess what it is?

Sean

On 6/22/07, Roland Gülle <roland@7val.com> wrote:
>
> Hi Laura,
>
> great research, thanks!
>
> > This final implementation was decided upon after a few dead ends
> > with Xerces and Saxon's TinyTree. Both offer a class of ElementImpl
> > (or variation of that name) which contain a method called
> > getLineNumber() and getColumnNumber(). However, after trying to
> > implement these methods unsuccessfully, we learned that these
> > methods were inherited from an interface and had remained
> > unimplemented. After some more searching, it seems as if there are
> > no other methods that we can use to get column number without some
> > intense hacking on our side by possibly wrapping the nodes
> > ourselves with this information.
> >
> > So, in the end, we have line number but no column number. I'm going
> > to open this up for input and get some thoughts. If no one has any
> > objections, I'll commit the changes soon.
> Getting the line numbers is the first big step,
> but beside the problems you find in the research, lots of mobile
> generator tools print the complete page in one line.
>
> The current solution, return the line and no column number, sounds
> for me OK for a basic 1.0 checker version,
> but we have to keep this at the agenda for (maybe) later releases.
>
> Cheers,
>   Roland
>
>
>

Received on Friday, 22 June 2007 14:47:53 UTC