if ( qname == null ) {
//JAXP 1.3 spec says that if variable name is null then
// we need to through IllegalArgumentException
String fmsg = XSLMessages.createXPATHMessage(
XPATHErrorResources.ER_ARG_CANNOT_BE_NULL,
new Object[] {"Variable qname"} );
throw new IllegalArgumentException( fmsg );
}
javax.xml.namespace.QName name =
new javax.xml.namespace.QName(
qname.getNamespace(),
qname.getLocalPart());
Object varValue = resolver.resolveVariable( name );
if ( varValue == null ) {
String fmsg = XSLMessages.createXPATHMessage(
XPATHErrorResources.ER_RESOLVE_VARIABLE_RETURNS_NULL,
new Object[] { name.toString()} );
throw new TransformerException( fmsg );
}
return XObject.create( varValue, xctxt );