public QName([email protected] name) : this(XMLConstants.DEFAULT_NS_PREFIX.Equals(name.Prefix) ? null : name.Prefix, name.LocalPart) { if (!XMLConstants.NULL_NS_URI.Equals(name.NamespaceURI)) { set_namespace(name.NamespaceURI); } _expanded = true; }
public virtual Function resolveFunction([email protected] name, int arity) { if (sc.function_exists(new QName(name), arity)) { if (sc is DefaultStaticContext) { DefaultStaticContext dc = (DefaultStaticContext)sc; return(dc.function(new QName(name), arity)); } } throw new System.ArgumentException("Function not found " + name); }
/// <summary> /// Validate a cast expression. /// </summary> /// <param name="cexp"> /// is the expression. </param> /// <returns> null. </returns> public virtual object visit(CastExpr cexp) { printBinExpr("CAST", cexp); SingleType st = (SingleType)cexp.right(); QName type = st.type(); [email protected] qName = type.asQName(); Function f = _sc.resolveFunction(qName, 1); if (f == null) { reportError(new StaticFunctNameError("Type does not exist: " + type.ToString())); } cexp.set_function(f); _resolvedFunctions.Add(qName); return(null); }
/// <summary> /// Validate a function call. /// </summary> /// <param name="e"> /// is the expression. </param> /// <returns> null. </returns> public virtual object visit(FunctionCall e) { QName name = e.name(); if (!expandFunctionQName(name)) { reportBadPrefix(name.prefix()); } [email protected] qName = name.asQName(); Function f = _sc.resolveFunction(qName, e.arity()); if (f == null) { reportError(new StaticFunctNameError("Function does not exist: " + name.@string() + " arity: " + e.arity())); } e.set_function(f); _resolvedFunctions.Add(qName); visitExprs(e.GetEnumerator()); return(null); }
private QName qn([email protected] name) { return(new QName(name)); }
public virtual org.eclipse.wst.xml.xpath2.api.typesystem.ItemType getVariableType([email protected] name) { return(new SimpleAtomicItemTypeImpl(BuiltinTypeLibrary.XS_ANYTYPE)); }
public virtual bool isVariablePresent([email protected] name) { return(outerInstance.sc.variable_exists(outerInstance.qn(name))); }