// construct a DOM document (used by psychopath engine as XPath XDM
// instance). A PSVI DOM is constructed, to comply to PsychoPath
// architecture. This doesn't seem to affect CTA psychopath evaluations.
// CTA spec, doesn't require a typed XDM tree.
// relook...
Document document = new PSVIDocumentImpl();
Element elem = document.createElementNS(element.uri, element.rawname);
for (int attrIndx = 0; attrIndx < attributes.getLength(); attrIndx++) {
PSVIAttrNSImpl attrNode = new PSVIAttrNSImpl((PSVIDocumentImpl)document,
attributes.getURI(attrIndx),
attributes.getQName(attrIndx));
attrNode.setNodeValue(attributes.getValue(attrIndx));
elem.setAttributeNode(attrNode);
}
document.appendChild(elem);
// construct parameter values for psychopath processor
Map psychoPathParams = new HashMap();
psychoPathParams.put("XPATH2_NS_CONTEXT", fXPath2NamespaceContext);
initDynamicContext(null, document, psychoPathParams);