You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Da...@lotus.com on 2001/04/04 23:24:12 UTC
Re: Determining line numbers in source document
I'm not sure whether you're talking about Xalan-C++ or Xalan-J, so I'll
respond for Xalan-C++. Someone else would have to comment for the Java
processor.
We don't currently capture this information as it would add lots of
overhead. Also, for programmatically-built source trees, it would be
pretty meaningless.
One option would be to add some compile time facility through #ifdef to
include that information in a custom build. Another possiblity is to use a
separate table to store this information during parse. That would be
fairly easy to do by subclassing XalanSourceTreeContentHandler and
XalanSourceTreeParserLiaison.
Dave
"Brian
Quinlan" To: <xa...@xml.apache.org>
<BrianQ@Active cc: (bcc: David N Bertoni/CAM/Lotus)
State.com> Subject: Determining line numbers in source document
04/04/2001
12:16 PM
Please respond
to xalan-dev
Hi,
I am trying to determine the line/column number of the current source node
in a TraceListener using Xalan 1.0. I am in the process of writing code to
build a parallel DOM, which captures this information, but was wondering if
there is an easier/better way.
--
Brian Quinlan
Python and XSLT Developer
BrianQ@ActiveState.com
Use the power of the dragon for your programming needs.
Download the beta of Komodo XSLT, our Mozilla-based,
cross-platform IDE.
http://www.ActiveState.com/
RE: Determining line numbers in source document
Posted by Brian Quinlan <Br...@ActiveState.com>.
If I added the necessary infrastructure to associate line/column numbers to
XalanNodes, which could be enabled through the preprocessor, is it likely
that my changes would be integrated into Xalan?
--
Brian Quinlan
Python and XSLT Developer
BrianQ@ActiveState.com
Use the power of the dragon for your programming needs.
Download Komodo, our Mozilla-based, cross-platform IDE.
http://www.ActiveState.com/Komodo
> -----Original Message-----
> From: David_N_Bertoni@lotus.com [mailto:David_N_Bertoni@lotus.com]
> Sent: Wednesday, April 04, 2001 2:24 PM
> To: xalan-dev@xml.apache.org
> Subject: Re: Determining line numbers in source document
>
>
>
> I'm not sure whether you're talking about Xalan-C++ or
> Xalan-J, so I'll
> respond for Xalan-C++. Someone else would have to comment
> for the Java
> processor.
>
> We don't currently capture this information as it would add lots of
> overhead. Also, for programmatically-built source trees, it would be
> pretty meaningless.
>
> One option would be to add some compile time facility through
> #ifdef to
> include that information in a custom build. Another
> possiblity is to use a
> separate table to store this information during parse. That would be
> fairly easy to do by subclassing XalanSourceTreeContentHandler and
> XalanSourceTreeParserLiaison.
>
> Dave
>
>
>
>
>
> "Brian
>
> Quinlan" To:
> <xa...@xml.apache.org>
>
> <BrianQ@Active cc: (bcc: David
> N Bertoni/CAM/Lotus)
> State.com> Subject:
> Determining line numbers in source document
>
>
>
> 04/04/2001
>
> 12:16 PM
>
> Please respond
>
> to xalan-dev
>
>
>
>
>
>
>
>
> Hi,
>
> I am trying to determine the line/column number of the
> current source node
> in a TraceListener using Xalan 1.0. I am in the process of
> writing code to
> build a parallel DOM, which captures this information, but
> was wondering if
> there is an easier/better way.
>
> --
> Brian Quinlan
> Python and XSLT Developer
> BrianQ@ActiveState.com
>
> Use the power of the dragon for your programming needs.
> Download the beta of Komodo XSLT, our Mozilla-based,
> cross-platform IDE.
> http://www.ActiveState.com/
>
>
>
>
>
>
>
RE: Determining line numbers in source document
Posted by Brian Quinlan <Br...@ActiveState.com>.
Thanks Dave,
I am actually using Xalan C++ 1.0, which converts Xerces DOMs to Xalan DOMs
for source documents. It would seem, therefore, that I can't get linenumbers
because they are simply unavailable.
Sorry about the lack of clarity in the original post, I didn't know that the
various versions/implementations of Xalan used different source parsing
techniques.
-----Original Message-----
From: David_N_Bertoni@lotus.com [mailto:David_N_Bertoni@lotus.com]
Sent: Wednesday, April 04, 2001 2:24 PM
To: xalan-dev@xml.apache.org
Subject: Re: Determining line numbers in source document
I'm not sure whether you're talking about Xalan-C++ or Xalan-J, so I'll
respond for Xalan-C++. Someone else would have to comment for the Java
processor.
We don't currently capture this information as it would add lots of
overhead. Also, for programmatically-built source trees, it would be
pretty meaningless.
One option would be to add some compile time facility through #ifdef to
include that information in a custom build. Another possiblity is to use a
separate table to store this information during parse. That would be
fairly easy to do by subclassing XalanSourceTreeContentHandler and
XalanSourceTreeParserLiaison.
Dave
"Brian
Quinlan" To: <xa...@xml.apache.org>
<BrianQ@Active cc: (bcc: David N
Bertoni/CAM/Lotus)
State.com> Subject: Determining line
numbers in source document
04/04/2001
12:16 PM
Please respond
to xalan-dev
Hi,
I am trying to determine the line/column number of the current source node
in a TraceListener using Xalan 1.0. I am in the process of writing code to
build a parallel DOM, which captures this information, but was wondering if
there is an easier/better way.
--
Brian Quinlan
Python and XSLT Developer
BrianQ@ActiveState.com
Use the power of the dragon for your programming needs.
Download the beta of Komodo XSLT, our Mozilla-based,
cross-platform IDE.
http://www.ActiveState.com/