if (s1.isSameType(s2)) { return SAME_TYPE; break; if (t1.isSameType(s2)) { return SUBSUMED_BY; break; if (t2.isSameType(s1)) { return SUBSUMES;
if (s1.isSameType(s2)) { return SAME_TYPE; break; if (t1.isSameType(s2)) { return SUBSUMED_BY; break; if (t2.isSameType(s1)) { return SUBSUMES;
if (s1.isSameType(s2)) { return SAME_TYPE; if (t1.isSameType(s2)) { return SUBSUMED_BY; if (t2.isSameType(s1)) { return SUBSUMES;
if (s1.isSameType(s2)) { return SAME_TYPE; if (t1.isSameType(s2)) { return SUBSUMED_BY; if (t2.isSameType(s1)) { return SUBSUMES;
/** * Get the content type allowed by this NodeTest (that is, the type annotation of the matched nodes). * Return AnyType if there are no restrictions. The default implementation returns AnyType. */ public SchemaType getContentType() { SchemaType type1 = nodetest1.getContentType(); SchemaType type2 = nodetest2.getContentType(); if (type1.isSameType(type2)) return type1; if (operator == Token.INTERSECT) { if (type2 instanceof AnyType) { return type1; } if (type1 instanceof AnyType) { return type2; } } return AnyType.getInstance(); }
/** * Get the content type allowed by this NodeTest (that is, the type annotation of the matched nodes). * Return AnyType if there are no restrictions. The default implementation returns AnyType. */ public SchemaType getContentType() { SchemaType type1 = nodetest1.getContentType(); SchemaType type2 = nodetest2.getContentType(); if (type1.isSameType(type2)) return type1; if (operator == Token.INTERSECT) { if (type2 instanceof AnyType) { return type1; } if (type1 instanceof AnyType) { return type2; } } return AnyType.getInstance(); }
/** * Get the content type allowed by this NodeTest (that is, the type annotation of the matched nodes). * Return AnyType if there are no restrictions. The default implementation returns AnyType. */ public SchemaType getContentType() { SchemaType type1 = nodetest1.getContentType(); SchemaType type2 = nodetest2.getContentType(); if (type1.isSameType(type2)) { return type1; } if (operator == Token.INTERSECT) { if (type2 instanceof AnyType || (type2 instanceof AnySimpleType && type1.isSimpleType())) { return type1; } if (type1 instanceof AnyType || (type1 instanceof AnySimpleType && type2.isSimpleType())) { return type2; } } return AnyType.getInstance(); }
/** * Get the content type allowed by this NodeTest (that is, the type annotation of the matched nodes). * Return AnyType if there are no restrictions. The default implementation returns AnyType. */ public SchemaType getContentType() { SchemaType type1 = nodetest1.getContentType(); SchemaType type2 = nodetest2.getContentType(); if (type1.isSameType(type2)) { return type1; } if (operator == Token.INTERSECT) { if (type2 instanceof AnyType || (type2 instanceof AnySimpleType && type1.isSimpleType())) { return type1; } if (type1 instanceof AnyType || (type1 instanceof AnySimpleType && type2.isSimpleType())) { return type2; } } return AnyType.getInstance(); }