I've looked over the relevant samples and documentation, but haven't found 
enough information.  Any pointers to useful doc or samples would be 
appreciated.
In fact, the samples and documentation lead me to additional questions:

>From the XercesParserLiaison API, it would appear that I need 
buildMaps=true, and possibly buildWrapper=true, in order to map the Xerces 
DOMNode to its Xalan counterpart, but I don't see any method that uses the 
map to give me the Xalan node from the Xerces node.

What is the overhead of enabling buildWrapper and buildMaps? 
Are they kept current across modifications to the original Xerces DOM?

>From a sample, I have:
   // Set up our link between the Xerces and Xalan DOMs. (doc is a Xerces 
DOMDocument*)
    XercesDOMSupport support;
    XercesParserLiaison liaison(support);
    XercesDOMWrapperParsedSource  src(doc, liaison, support);
    XalanDocument* xalanDoc = src.getDocument( );

Yet it would appear from the API that I could pare that down to:
   // Set up our link between the Xerces and Xalan DOMs. (doc is a Xerces 
DOMDocument*)
    XercesDOMSupport support;
    XercesParserLiaison liaison(support);
    XalanDocument* xalanDoc = liaison.createDocument(doc, false, true, 
true);

Are these equivalent, or is there a reason to use one over the other?
If I use XercesDOMWrapperParsedSource, do I need to set properties of 
liaison first to force mapping and wrapping?

If the overhead is significant to wrapping and/or mapping, especially if 
the entire document is processed, I would want to cache them for later use 
evaluating other XPaths. 
Which of the associated objects is sufficient to cache?  liason and 
xalanDoc?  support?

And finally, how do I map a Xerces DOMNode/DOMElement to a Xalan node to 
use as the context for XPath evaluation?

---------------------------------------------------
David S. Johnson
DeskNet Inc.

Reply via email to