net.sf.saxon.om.StructuredQName Java Examples

The following examples show how to use net.sf.saxon.om.StructuredQName. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SaxonExtendedTraceCodeInjector.java    From intellij-xquery with Apache License 2.0 5 votes vote down vote up
@Override
public Expression inject(Expression expression, StaticContext staticContext, int construct, StructuredQName qName) {
    log("injecting trace for =" + expression.getClass() + " line: " + expression.getLocation().getLineNumber() + " construct: " + construct + " module: " + staticContext.getSystemId());
    TraceExpression trace = new TraceExpression(expression);
    trace.setNamespaceResolver(staticContext.getNamespaceResolver());
    trace.setConstructType(construct);
    trace.setObjectName(qName);
    return trace;
}
 
Example #2
Source File: TEFunctionLibrary.java    From teamengine with Apache License 2.0 5 votes vote down vote up
public boolean isAvailable(StructuredQName functionName, int arity) {
    String key = functionName.getClarkName();
    List<FunctionEntry> functions = index.getFunctions(key);
    if (functions != null) {
        for (FunctionEntry fe : functions) {
            if (arity == -1) {
                return true;
            }
            if (arity >= fe.getMinArgs() && arity <= fe.getMaxArgs()) {
                return true;
            }
        }
    }
    return false;
}
 
Example #3
Source File: XPathFunctionFromUserFunction.java    From ph-schematron with Apache License 2.0 4 votes vote down vote up
/**
 * @return The function name.
 */
@Nonnull
public StructuredQName getFunctionName ()
{
  return m_aUserFunc.getFunctionName ();
}
 
Example #4
Source File: GetTypeFunctionCall.java    From teamengine with Apache License 2.0 4 votes vote down vote up
public GetTypeFunctionCall(StructuredQName functionName,
        Expression[] staticArgs, StaticContext env) {
    super(functionName, staticArgs, env);
}
 
Example #5
Source File: TEXSLFunctionCall.java    From teamengine with Apache License 2.0 4 votes vote down vote up
public TEXSLFunctionCall(FunctionEntry fe, StructuredQName functionName,
        Expression[] staticArgs, StaticContext env) {
    super(functionName, staticArgs, env);
    this.fe = fe;
}
 
Example #6
Source File: TEFunctionCall.java    From teamengine with Apache License 2.0 4 votes vote down vote up
public TEFunctionCall(StructuredQName functionName,
        Expression[] staticArgs, StaticContext env) {
    super();
    this.setFunctionName(functionName);
    this.setArguments(staticArgs);
}
 
Example #7
Source File: TEJavaFunctionCall.java    From teamengine with Apache License 2.0 4 votes vote down vote up
public TEJavaFunctionCall(FunctionEntry fe, StructuredQName functionName,
        Expression[] staticArgs, StaticContext env) throws XPathException {
    super(functionName, staticArgs, env);
    this.fe = fe;
}
 
Example #8
Source File: MyConcatExtensionFunctionDefinition.java    From kite with Apache License 2.0 4 votes vote down vote up
@Override
public StructuredQName getFunctionQName() {
  return new StructuredQName("myfn", "my.custom.uri", "my-concat-def");
}