err.setErrorCode("XPST0017");
err.setIsStaticError(true);
throw err;
}
return new CastExpression(arguments[0], type, true);
}
// Now see if it's a constructor function for a user-defined type
if (arguments.length == 1) {
int fp = config.getNamePool().getFingerprint(uri, localName);
if (fp != -1) {
SchemaType st = config.getSchemaType(fp);
if (st != null && st.isAtomicType()) {
return new CastExpression(arguments[0], (AtomicType)st, true);
}
}
}
return null;