fp == StandardNames.XSI_NIL ||
fp == StandardNames.XSI_NO_NAMESPACE_SCHEMA_LOCATION) {
return;
}
if (parentType instanceof SimpleType) {
XPathException err = new XPathException("Attribute " + env.getNamePool().getDisplayName(nameCode) +
" is not permitted in the content model of the simple type " + parentType.getDescription());
err.setIsTypeError(true);
err.setLocator(this);
if (getHostLanguage() == Configuration.XSLT) {
err.setErrorCode("XTTE1510");
} else {
err.setErrorCode("XQDY0027");
}
throw err;
}
SchemaType type;
try {
type = ((ComplexType)parentType).getAttributeUseType(fp);
} catch (SchemaException e) {
throw new XPathException(e);
}
if (type == null) {
XPathException err = new XPathException("Attribute " + env.getNamePool().getDisplayName(nameCode) +
" is not permitted in the content model of the complex type " + parentType.getDescription());
err.setIsTypeError(true);
err.setLocator(this);
if (getHostLanguage() == Configuration.XSLT) {
err.setErrorCode("XTTE1510");
} else {
err.setErrorCode("XQDY0027");
}
throw err;
}
if (type instanceof AnyType) {
return;