List<String> matchStrings, boolean fragment) throws TransformerException {
String val = null;
XObject xObject = XPathAPI.eval(document, xPathQuery, getPrefixResolver(document));
final int objectType = xObject.getType();
if (objectType == XObject.CLASS_NODESET) {
NodeList matches = xObject.nodelist();
int length = matches.getLength();
for (int i = 0 ; i < length; i++) {
Node match = matches.item(i);
if ( match instanceof Element){
if (fragment){