public String toShortString() { switch (nodeKind) { case Type.ELEMENT: return getNamespaceURI().isEmpty() ? namePool.getLocalName(getFingerprint()) : toString(); case Type.ATTRIBUTE: return "@" + (getNamespaceURI().isEmpty() ? namePool.getLocalName(getFingerprint()) : toString()); default: return toString(); } }
public PrecedingAxisIterator(XOMNodeWrapper start, boolean includeAncestors, NodeTest test) { this.start = start; this.includeAncestors = includeAncestors; currNode = start.node; nextAncestor = includeAncestors ? null : start.node.getParent(); if (test == AnyNodeTest.getInstance()) { // performance hack test = null; // mark as AnyNodeTest } else if (test instanceof NameTest) { NameTest nt = (NameTest) test; if (nt.getPrimitiveType() == Type.ELEMENT) { // performance hack // mark as element name test NamePool pool = getNamePool(); testLocalName = pool.getLocalName(nt.getFingerprint()); testURI = pool.getURI(nt.getFingerprint()); } } else if (test instanceof NodeKindTest) { if (test.getPrimitiveType() == Type.ELEMENT) { // performance hack // mark as element type test testLocalName = ""; testURI = null; } } nodeTest = test; position = 0; }
QName childName = getQualifiedName(nameTest.getFingerprint(), namePool, contextUris);
index = attlist.getIndexByFingerprint(test.getFingerprint());
index = attlist.getIndexByFingerprint(test.getFingerprint());
private FunctionDefinition[] getFunctionDefinitions() { ArrayList<FunctionDefinition> functionDefinitions = new ArrayList<FunctionDefinition>(); Iterator<XQueryFunction> functions = queryModule.getLocalFunctionLibrary().getFunctionDefinitions(); while (functions.hasNext()) { XQueryFunction function = functions.next(); UserFunctionParameter[] params = function.getParameterDefinitions(); Variable[] args = new Variable[params.length]; for (int i = 0; i < params.length; i++) { QName argname = qnameFor (params[i].getVariableQName()); addNamespaceDeclaration(argname); args[i] = new Variable (argname, getTypeDescription(params[i].getRequiredType())); } QName fname = qnameFor(function.getFunctionName()); addNamespaceDeclaration(fname); SequenceType resultType = function.getResultType(); ItemType returnType = resultType.getPrimaryType(); QName returnTypeName = null; if (returnType instanceof NameTest) { returnTypeName = qnameForNameCode (((NameTest) returnType).getFingerprint()); } FunctionDefinition fdef = new FunctionDefinition(fname, valueTypeForItemType(resultType.getPrimaryType()), cardinalityOf(resultType), returnTypeName, args, exprFor (function.getBody())); functionDefinitions.add (fdef); } return functionDefinitions.toArray(new FunctionDefinition[0]); }
index = attlist.getIndexByFingerprint(test.getFingerprint());
index = attlist.getIndexByFingerprint(test.getFingerprint());
NameTest nt = (NameTest) test; if (start.hasFingerprint()) { stepper = new FollowingFingerprintedElementStepper<>(start, nt.getFingerprint()); } else { stepper = new FollowingElementStepper<>(start, nt.getNamespaceURI(), nt.getLocalPart());
NameTest nt = (NameTest) test; if (start.hasFingerprint()) { stepper = new FollowingFingerprintedElementStepper<>(start, nt.getFingerprint()); } else { stepper = new FollowingElementStepper<>(start, nt.getNamespaceURI(), nt.getLocalPart());