"Transform" };
throw new TransformationException("xml.WrongContent", exArgs);
}
XPathFilterCHGPContainer xpathContainer =
XPathFilterCHGPContainer.getInstance(xpathElement,
input.getSourceURI());
// get the document (root node) for the traversal
Document inputDoc = null;
{
Iterator it = this.inputSet.iterator();
if (it.hasNext()) {
inputDoc = XMLUtils.getOwnerDocument((Node) it.next());
}
}
{
// 'tag' the include-but-search nodes
Node includeButSearchCtxNode =
xpathContainer.getHereContextNodeIncludeButSearch();
NodeList includeButSearchNodes = null;
if (includeButSearchCtxNode != null) {
includeButSearchNodes = xPathFuncHereAPI.selectNodeList(doc,
includeButSearchCtxNode, xpathContainer.getElement());
}
this.includeSearchSet = nodeListToSet(includeButSearchNodes);
}
{
// 'tag' the exclude-but-search nodes
Node excludeButSearchCtxNode =
xpathContainer.getHereContextNodeExcludeButSearch();
NodeList excludeButSearchNodes = null;
if (excludeButSearchCtxNode != null) {
excludeButSearchNodes = xPathFuncHereAPI.selectNodeList(doc,
excludeButSearchCtxNode, xpathContainer.getElement());
}
this.excludeSearchSet = nodeListToSet(excludeButSearchNodes);
}
{
// 'tag' the exclude nodes
Node excludeCtxNode = xpathContainer.getHereContextNodeExclude();
NodeList excludeNodes = null;
if (excludeCtxNode != null) {
excludeNodes = xPathFuncHereAPI.selectNodeList(doc,
excludeCtxNode, xpathContainer.getElement());
}
this.excludeSet = nodeListToSet(excludeNodes);
}
if (xpathContainer.getIncludeSlashPolicy()
== XPathFilterCHGPContainer.IncludeSlash) {
this.includeSearchSet.add(inputDoc);
} else {
this.excludeSearchSet.add(inputDoc);
}