Modifier and Type | Field and Description |
---|---|
private boolean | m_isTotallyWild
True if this test has a null namespace and a local name of |
protected String | m_name
The local name to be tested for. |
pack-priv String | m_namespace
The namespace to be tested for, which may be null. |
pack-priv XNumber | m_score
Statically calculated score for this test. |
protected int | m_whatToShow
This attribute determines which node types are accepted. |
public static final XNumber | SCORE_NODETEST
The match score if the pattern consists of just a NodeTest. |
public static final XNumber | SCORE_NONE
The match score if no match is made. |
public static final XNumber | SCORE_NSWILD
The match score if the pattern pattern has the form NCName:*. |
public static final XNumber | SCORE_OTHER
The match score if the pattern consists of something other than just a NodeTest or just a qname. |
public static final XNumber | SCORE_QNAME
The match score if the pattern has the form of a QName optionally preceded by an @ character. |
pack-priv static final long | |
public static final int | SHOW_BYFUNCTION
Special bitmap for match patterns starting with a function. |
public static final String | SUPPORTS_PRE_STRIPPING
The URL to pass to the Node#supports method, to see if the DOM has already been stripped of whitespace nodes. |
public static final String | WILD
The namespace or local name for node tests with a wildcard. |
Access | Constructor and Description |
---|---|
public | NodeTest(int
Bit set defined mainly by whatToShow, String org. .The namespace to be tested. namespace, String The local name to be tested. name)Construct an NodeTest that tests for namespaces and node names. |
public | NodeTest(int
Bit set defined mainly by whatToShow)org. .Construct an NodeTest that doesn't test for node names. |
public |
Modifier and Type | Method and Description |
---|---|
protected void | |
public void | callVisitors(ExpressionOwner
The owner of the visitor, where that path may be
rewritten if needed. owner, XPathVisitor The visitor whose appropriate method will be called. visitor)Implements com. This will traverse the heararchy, calling the visitor for each member. |
public static void | debugWhatToShow(int
Bit set defined mainly by
whatToShow)com. .Do a diagnostics dump of a whatToShow bit set. |
public boolean | deepEquals(Expression
Another expression object. expr)Implements abstract com. Compare this object with another object and see if they are equal, include the sub heararchy. |
public XObject | Returns: com. ,
com. ,
com. ,
com. , or
com. .XPath runtime context. xctxt, int The node being tested. context)Overrides com. Tell what the test score is for the given node. |
public XObject | Returns: com. ,
com. ,
com. ,
com. , or
com. .XPath runtime context. xctxt, int The node being tested. context, DTM The DTM of the current node. dtm, int The expanded type ID of the current node. expType)Overrides com. Tell what the test score is for the given node. |
public XObject | Returns: com. ,
com. ,
com. ,
com. , or
com. .XPath runtime context. xctxt)Implements abstract com. Test the current node to see if it matches the given node test. |
public void | fixupVariables(List<QName>
List of QNames that correspond to variables. This list
should be searched backwards for the first qualified name that
corresponds to the variable reference qname. The position of the
QName in the vector from the start of the vector will be its position
in the stack frame (but variables above the globalsTop value will need
to be offset to the current stack frame).
NEEDSDOC @param globalsSize vars, int globalsSize)Implements abstract com. Node tests by themselves do not need to fix up variables. |
public double | Returns: the score that this test will return if a test succeeds.Get the score that this test will return if a test succeeds. |
public String | Returns: the local name to be tested, orWILD , or an empty string.Return the local name to be tested. |
public String | Returns: The namespace to be tested for, orWILD , or null.Return the namespace to be tested. |
public static int | Returns: the node type for the whatToShow. Since whatToShow can specify multiple types, it will return the first bit tested that is on, so the caller of this function should take care that this is the function they really want to call. If none of the known bits are set, this function will return zero.Bit set defined mainly by
whatToShow)com. .Tell what node type to test, if not DTMFilter.SHOW_ALL. |
public XNumber | Returns: Should be one of the SCORE_XXX constants.Get the static score for this node test. |
public int | Returns: bitset mainly defined inorg. .This attribute determines which node types are accepted. |
public void | initNodeTest(int
Bit set defined mainly by whatToShow)org. .Initialize this node test by setting the whatToShow property, and calculating the score that this test will return if a test succeeds. |
public void | initNodeTest(int
Bit set defined mainly by whatToShow, String org. .The namespace to be tested. namespace, String The local name to be tested. name)Initialize this node test by setting the whatToShow property and the namespace and local name, and calculating the score that this test will return if a test succeeds. |
public void | setLocalName(String
the local name to be tested, or name)WILD , or an empty string.Set the local name to be tested. |
public void | setNamespace(String
The namespace to be tested for, or ns)WILD , or null.Set the namespace to be tested. |
public void | setStaticScore(XNumber
Should be one of the SCORE_XXX constants. score)Set the static score for this node test. |
public void | setWhatToShow(int
bitset mainly defined in what)org. .This attribute determines which node types are accepted. |
private static final boolean | Returns: true if the strings match according to the rules of this method.part string from the node. p, String target string, which may be t)WILD .Two names are equal if they and either both are null or the name t is wild and the name p is non-null, or the two strings are equal. |
private static final boolean | Returns: true if the strings match according to the rules of this method.part string from the node, which may represent the null namespace
as null or as "". p, String target string, which may be t)WILD .This is temporary to patch over Xerces issue with representing DOM namespaces as "". |
m_isTotallyWild | back to summary |
---|---|
private boolean m_isTotallyWild True if this test has a null namespace and a local name of |
m_name | back to summary |
---|---|
protected String m_name The local name to be tested for. |
m_namespace | back to summary |
---|---|
pack-priv String m_namespace The namespace to be tested for, which may be null. |
m_score | back to summary |
---|---|
pack-priv XNumber m_score Statically calculated score for this test. One of
|
m_whatToShow | back to summary |
---|---|
protected int m_whatToShow This attribute determines which node types are accepted. |
SCORE_NODETEST | back to summary |
---|---|
public static final XNumber SCORE_NODETEST The match score if the pattern consists of just a NodeTest. |
SCORE_NONE | back to summary |
---|---|
public static final XNumber SCORE_NONE The match score if no match is made. |
SCORE_NSWILD | back to summary |
---|---|
public static final XNumber SCORE_NSWILD The match score if the pattern pattern has the form NCName:*. |
SCORE_OTHER | back to summary |
---|---|
public static final XNumber SCORE_OTHER The match score if the pattern consists of something other than just a NodeTest or just a qname. |
SCORE_QNAME | back to summary |
---|---|
public static final XNumber SCORE_QNAME The match score if the pattern has the form of a QName optionally preceded by an @ character. |
serialVersionUID | back to summary |
---|---|
pack-priv static final long serialVersionUID Hides com. |
SHOW_BYFUNCTION | back to summary |
---|---|
public static final int SHOW_BYFUNCTION Special bitmap for match patterns starting with a function.
Make sure this does not conflict with |
SUPPORTS_PRE_STRIPPING | back to summary |
---|---|
public static final String SUPPORTS_PRE_STRIPPING The URL to pass to the Node#supports method, to see if the DOM has already been stripped of whitespace nodes. |
WILD | back to summary |
---|---|
public static final String WILD The namespace or local name for node tests with a wildcard.
|
NodeTest | back to summary |
---|---|
public NodeTest(int whatToShow, String namespace, String name) Construct an NodeTest that tests for namespaces and node names.
|
NodeTest | back to summary |
---|---|
public NodeTest(int whatToShow) Construct an NodeTest that doesn't test for node names.
|
NodeTest | back to summary |
---|---|
public NodeTest() Null argument constructor. |
calcScore | back to summary |
---|---|
protected void calcScore() Static calc of match score. |
callVisitors | back to summary |
---|---|
public void callVisitors(ExpressionOwner owner, XPathVisitor visitor) Implements com. Doc from com. This will traverse the heararchy, calling the visitor for each member. If the called visitor method returns false, the subtree should not be called.
|
debugWhatToShow | back to summary |
---|---|
public static void debugWhatToShow(int whatToShow) Do a diagnostics dump of a whatToShow bit set.
|
deepEquals | back to summary |
---|---|
public boolean deepEquals(Expression expr) Implements abstract com. Doc from com. Compare this object with another object and see if they are equal, include the sub heararchy.
|
execute | back to summary |
---|---|
public XObject execute(XPathContext xctxt, int context) throws TransformerException Overrides com. Tell what the test score is for the given node.
|
execute | back to summary |
---|---|
public XObject execute(XPathContext xctxt) throws TransformerException Implements abstract com. Test the current node to see if it matches the given node test.
|
fixupVariables | back to summary |
---|---|
public void fixupVariables(List<QName> vars, int globalsSize) Implements abstract com. Node tests by themselves do not need to fix up variables.
|
getDefaultScore | back to summary |
---|---|
public double getDefaultScore() Get the score that this test will return if a test succeeds.
|
getLocalName | back to summary |
---|---|
public String getLocalName() Return the local name to be tested. |
getNamespace | back to summary |
---|---|
public String getNamespace() Return the namespace to be tested. |
getNodeTypeTest | back to summary |
---|---|
public static int getNodeTypeTest(int whatToShow) Tell what node type to test, if not DTMFilter.SHOW_ALL.
|
getStaticScore | back to summary |
---|---|
public XNumber getStaticScore() Get the static score for this node test.
|
getWhatToShow | back to summary |
---|---|
public int getWhatToShow() This attribute determines which node types are accepted.
These constants are defined in the
|
initNodeTest | back to summary |
---|---|
public void initNodeTest(int whatToShow) Initialize this node test by setting the whatToShow property, and calculating the score that this test will return if a test succeeds.
|
initNodeTest | back to summary |
---|---|
public void initNodeTest(int whatToShow, String namespace, String name) Initialize this node test by setting the whatToShow property and the namespace and local name, and calculating the score that this test will return if a test succeeds.
|
setLocalName | back to summary |
---|---|
public void setLocalName(String name) Set the local name to be tested. |
setNamespace | back to summary |
---|---|
public void setNamespace(String ns) Set the namespace to be tested. |
setStaticScore | back to summary |
---|---|
public void setStaticScore(XNumber score) Set the static score for this node test.
|
setWhatToShow | back to summary |
---|---|
public void setWhatToShow(int what) This attribute determines which node types are accepted.
These constants are defined in the
|
subPartMatch | back to summary |
---|---|
private static final boolean subPartMatch(String p, String t) Two names are equal if they and either both are null or the name t is wild and the name p is non-null, or the two strings are equal. |
subPartMatchNS | back to summary |
---|---|
private static final boolean subPartMatchNS(String p, String t) This is temporary to patch over Xerces issue with representing DOM namespaces as "". |