Thanks for you reply.

I have written some code to generate the DTM from an XMLString. The creation 
does not throw any exception. But when I do a dumpDTM, I get the following 
exception :

Total nodes: 3
=========== index=0 handle=99 ===========
java.lang.ArrayIndexOutOfBoundsException
        at 
org.apache.xml.dtm.ref.ExpandedNameTable.getNamespaceID(ExpandedNameTable.java:339)
        at org.apache.xml.dtm.ref.sax2dtm.SAX2DTM.getNodeName(SAX2DTM.java:636)
        at 
org.apache.xml.dtm.ref.DTMDefaultBase.dumpDTM(DTMDefaultBase.java:697)
        at MyParser.main(MyParser.java:65)

Could someone help me figure the cause. Attached is the source code. The reason 
I want to ues the DTM this way is that I want to reduce the overhead imposed by 
the current DTMManager. My goal is to create the DTM and use the Expression to 
execute XPath expressions.

Thanks in advance,
Siljan

----- Original Message -----
From: Joseph Kesselman <[EMAIL PROTECTED]>
Date: Fri, 27 Jun 2003 13:22:19 -0400
To: "Siljan Simpson" <[EMAIL PROTECTED]>
Subject: Re: usage of DTMManagerDefault

> 
> 
> 
> 
> >I was hoping some one could help me understand the benefit of having the
> >incremental and doIndexing flag to true
> 
> These are performance-tuning hints. Not all DTM implementations will
> respond to them, or respond the same way to them. But in general:
> 
> The incremental flag, when true, indicates that the DTM model should be
> built "on demand" rather than being completly constructed in memory before
> processing begins. This is basically a latency-versus-throughput issue; if
> you're running the stylesheet's output onto a display, for example, this
> lets you start producing output as quickly as possible and makes the
> application feel more responsive. Incremental mode may also may have
> significant advatanges if your stylesheet/xpath doesn't examine the entire
> document -- for example, if it only formats chapter 1, there's no reason to
> load the other 27 chapters into memory. HOWEVER: Incremental mode does
> impose performance costs in some DTMs, so if your main concern is overall
> time to style the whole document you may not want to use an incremental
> model. See also http://xml.apache.org/xalan-j/dtm.html#settings
> 
> Indexing refers to building lookup tables during model construction to help
> optimize certain kinds of XPaths -- for example, building a table that
> lists all nodes by node name might tremendously speed up evaluation of the
> path "//foo". But again, this has trade-offs; the time spent building those
> tables isn't always less than the time saved by using them, and the tables
> may consume a significant amount of memory. Which tables are built, if any,
> and how they are used is up to the specific DTM implementation. Note that
> we have not exposed a public control for this parameter at this time; it's
> only being used internally, based on our own best guesses about how the
> document or RTF is likely to be accessed.
> 

-- 
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

Attachment: MyParser.java
Description: Binary data

Reply via email to