XSElementOrAttrRef[][] results = new XSElementOrAttrRef[numFields][];
// populate the results, the first dimension is indexed by 'field'
for ( int i=0; i<numFields; i++ ) {
XsEField field = fields[i];
String fieldXPath = field.getXpath().getToken();
XPathMatcher fieldMatcher = XPathMatcher.parse(
field.getLocator(),
fieldXPath,
false
);
Set matches = new HashSet(3);