Hi,

It seems from the javadoc that DTM's are considered read-only. Is this
true?

I'm tring to use the XPath implementation without XSLT stylesheets, and I
don't particulary need DTM's, although I might switch to them if that is
needed. However, the document I'm doing xpath queries on is changing all
the time.

I find that you need to create a new XPathContext each time for a query,
or else changes in the DOM between the previous and the next query aren't
always seen by the xpath implementation.

I fear that this is quite slow; it builds a new DTM for the DOM for every
new XPathContext that is used, doesn't it?

Looking at the xpath source code there are some hard coded references to
the XSLTC code, for example in the VariableStack. So far I've steered
around that, even getting variables to work.

My requirements for this application of xpath would be:

- being able work work with context nodes from a frequently changing
documents
- context nodes in a format that supports many XML features, particulary
xsd:schema checking. That would be DOM, unless DTM can offer that too
- setting xpath variables before executing queries (that works, but isn't
easy now)
- easy handling of query results (that works too, but is even more
difficult since XObjects don't implement many of the conversions that are
specified in the API)
- pluggable XPath implementations (nice to have, making it easy to work
with data sources that have an XPath datamodel but are not XML)


I'm sure that isn't all possible any time soon, but what are the current
plans for the XPath implementation?

Wouldn't it be nice to maintain an XPath implementation that works on DOM
trees in addition to the DTM version?

Regards,
  Erwin Bolwidt

Reply via email to