Fixed handling of attributes in xpath
Added external resource data category support.