Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Lexical information?

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: <nu.xom AT io7m.com>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Lexical information?
  • Date: Wed, 1 Jun 2016 18:34:41 +0000

On 2016-05-31T22:52:38 +0100
Michael Kay <mike AT saxonica.com> wrote:
>
> Of course, a naive implementation of node.getLineNumber() etc would add
> significantly to the memory occupancy of node objects. Saxon's approach is
> that (a) when building the tree, you have to ask for location information
> to be retained (setLineNumbering(true)), and (b) the location information
> is then held in a separate data structure which only exists when this
> option is requested.
>

That seems ideal to me. You don't get the costs of the extra data if
you don't ask for it, and it doesn't affect the existing API in any way.

M




Archive powered by MHonArc 2.6.24.

Top of Page