>Is there a utility in Xalan that, given a dom, will construct an XPath
>(string or some other representation) from the root to a given node? 

I don't believe so. Proposed solutions have been posted to this mailing 
list; check the archives.

There's an open question re where to put such a routine -- does it belong 
with the DOM impelementation (eg in Xerces), with the XPath implementation 
(eg in Xalan), or in a utility package (which would probably make the 
xml-commons project the right host)? I'd lean slightly toward xml-commons, 
simply because it should be made reusable with any implementation of 
either DOM or XPath.

As you noted, the hardest part of doing this properly is 
generating/reconciling the list of prefixes needed by the XPath.

______________________________________
Joe Kesselman  / IBM Research

Reply via email to