*/
public ItemType getSchemaAttributeTest(QName name) throws SaxonApiException {
Configuration config = processor.getUnderlyingConfiguration();
int fingerprint = config.getNamePool().allocate("", name.getNamespaceURI(), name.getLocalName());
SchemaDeclaration decl = config.getAttributeDeclaration(fingerprint);
if (decl == null) {
throw new SaxonApiException("No global declaration found for attribute " + name.getClarkName());
}
CombinedNodeTest combo = new CombinedNodeTest(
new NameTest(Type.ATTRIBUTE, fingerprint, config.getNamePool()),
Token.INTERSECT,
new ContentTypeTest(Type.ATTRIBUTE, decl.getType(), config));
combo.setGlobalComponentTest(true);
return new ItemType(combo, processor);
}