if (!_base.typeCheck(stable).identicalTo(Type.NodeSetDTM)) {
if (!_base.typeCheck(stable).identicalTo(Type.NodeSet)) {
    public Type typeCheck(SymbolTable stable) throws TypeCheckError {	// At least one argument - two at most	final int ac = argumentCount();	if ((ac < 1) || (ac > 2)) {	    ErrorMsg msg = new ErrorMsg("Illegal number of arguments "+					"to document() function");	    throw new TypeCheckError(msg);	}	// Parse the first argument - the document URI	_uri = argument(0);	if (_uri instanceof LiteralExpr) {	    LiteralExpr expr = (LiteralExpr)_uri;	    if (expr.getValue().equals(Constants.EMPTYSTRING)) {		Stylesheet stylesheet = getStylesheet();		if (stylesheet == null) {		    ErrorMsg msg = new ErrorMsg("Illegal argument "+						"to document() function");		    throw new TypeCheckError(msg);		}		_uri = new LiteralExpr(stylesheet.getURL().toString(),				       Constants.EMPTYSTRING);	    }	}	_uriType = _uri.typeCheck(stable);	if ((_uriType != Type.NodeSetDTM) && (_uriType != Type.String)) {	    _uri = new CastExpr(_uri, Type.String);	}	// Parse the second argument - the document URI base	if (ac == 2) {	    _base = argument(1);	    if (!_base.typeCheck(stable).identicalTo(Type.NodeSetDTM)) {		ErrorMsg msg = new ErrorMsg("Second argument to document() "+					    "function must be a node-set.");		throw new TypeCheckError(msg);	    }	}	return _type = Type.NodeSetDTM;    }