Coker, Jonathan M wrote:
Thanks Will. I will look through your code and get back with questions. I joined the list on 3/1 so I will look for archives to find your discussion with Dave. Part of what I am trying to do is clean up order dependencies in some initialization files. If I can collect a set of nodes from anywhere in a document then use each one of those as the context node for a data extractor function, I can get rid of some very inflexible code. (Is there any problem with setting the context node to a "/" in selectSingleNode?)
By "/", I'm assuming you mean the root node, which is the node you would get back if you executed that string as an XPath expression. However, you don't need to do that, since you presumably already have a pointer to the XalanDocument instance you're searching.
There's no problem with setting the context node to the root, and in fact it's quite common. Just remember that any relative location path you evaluate will be evaluated relative to the context node.
Dave