1 package com.icl.saxon.pattern; 2 import com.icl.saxon.Context; 3 import com.icl.saxon.om.*; 4 import com.icl.saxon.expr.XPathException; 5 6 11 12 public final class AnyChildNodePattern extends NodeTest { 13 14 19 20 public boolean matches(NodeInfo node) { 21 short type = node.getNodeType(); 22 return (type == NodeInfo.ELEMENT || 23 type == NodeInfo.TEXT || 24 type == NodeInfo.COMMENT || 25 type == NodeInfo.PI); 26 } 27 28 33 34 public boolean matches(short nodeType, int fingerprint) { 35 return (nodeType == NodeInfo.ELEMENT || 36 nodeType == NodeInfo.TEXT || 37 nodeType == NodeInfo.COMMENT || 38 nodeType == NodeInfo.PI); 39 } 40 41 45 46 public short getNodeType() { 47 return NodeInfo.NODE; 48 } 49 50 54 55 public double getDefaultPriority() { 56 return -0.5; 57 } 58 59 } 60 61 | Popular Tags |