/** * Represent the expression as a string for diagnostics * @param pool the name pool, used for expanding names in the node test * @return a string representation of the expression */ public String toString(NamePool pool) { return Axis.axisName[axis] + "::" + (test==null ? "node()" : test.toString(pool)); } }
/** * Represent the expression as a string for diagnostics * @param pool the name pool, used for expanding names in the node test * @return a string representation of the expression */ public String toString(NamePool pool) { return Axis.axisName[axis] + "::" + (test==null ? "node()" : test.toString(pool)); } }
/** * Represent the expression as a string for diagnostics * @param pool the name pool, used for expanding names in the node test * @return a string representation of the expression */ public String toString(NamePool pool) { return Axis.axisName[axis] + "::" + (test==null ? "node()" : test.toString(pool)); } }
public String toString(NamePool pool) { return "document-node(" + elementTest.toString(pool) + ')'; }
public String toString(NamePool pool) { return "document-node(" + elementTest.toString(pool) + ')'; }
public String toString(NamePool pool) { if (isGlobalComponentTest) { if (nodetest1 instanceof SubstitutionGroupTest) { return nodetest1.toString(pool); } else { final int kind = nodetest1.getPrimitiveType(); final String skind = (kind == Type.ELEMENT ? "schema-element(" : "schema-attribute("); final String name = pool.getClarkName(nodetest1.getFingerprint()); return skind + name + ')'; } } else if (nodetest1 instanceof NameTest && operator==Token.INTERSECT) { int kind = nodetest1.getPrimitiveType(); String skind = (kind == Type.ELEMENT ? "element(" : "attribute("); String content = ""; if (nodetest2 instanceof ContentTypeTest) { final SchemaType schemaType = ((ContentTypeTest)nodetest2).getSchemaType(); content = ", " + pool.getClarkName(schemaType.getFingerprint()); } String name = pool.getClarkName(nodetest1.getFingerprint()); return skind + name + content + ')'; } else { String nt1 = (nodetest1==null ? "true()" : nodetest1.toString(pool)); String nt2 = (nodetest2==null ? "true()" : nodetest2.toString(pool)); return '(' + nt1 + ' ' + Token.tokens[operator] + ' ' + nt2 + ')'; } }
public String toString(NamePool pool) { if (isGlobalComponentTest) { if (nodetest1 instanceof SubstitutionGroupTest) { return nodetest1.toString(pool); } else { final int kind = nodetest1.getPrimitiveType(); final String skind = (kind == Type.ELEMENT ? "schema-element(" : "schema-attribute("); final String name = pool.getClarkName(nodetest1.getFingerprint()); return skind + name + ')'; } } else if (nodetest1 instanceof NameTest && operator==Token.INTERSECT) { int kind = nodetest1.getPrimitiveType(); String skind = (kind == Type.ELEMENT ? "element(" : "attribute("); String content = ""; if (nodetest2 instanceof ContentTypeTest) { final SchemaType schemaType = ((ContentTypeTest)nodetest2).getSchemaType(); content = ", " + pool.getClarkName(schemaType.getFingerprint()); } String name = pool.getClarkName(nodetest1.getFingerprint()); return skind + name + content + ')'; } else { String nt1 = (nodetest1==null ? "true()" : nodetest1.toString(pool)); String nt2 = (nodetest2==null ? "true()" : nodetest2.toString(pool)); return '(' + nt1 + ' ' + Token.tokens[operator] + ' ' + nt2 + ')'; } }