Package org.jaxen.pattern
Class Pattern
java.lang.Object
org.jaxen.pattern.Pattern
- Direct Known Subclasses:
LocationPathPattern
,NodeTest
,UnionPattern
Deprecated.
will be removed in Jaxen 2.0
Pattern
defines the behaviour for pattern in
the XSLT processing model.
- Version:
- $Revision$
- Author:
- James Strachan
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final short
Deprecated.Matches any nodestatic final short
Deprecated.Matches attribute nodesstatic final short
Deprecated.Matches CDATA section nodesstatic final short
Deprecated.Matches comment nodesstatic final short
Deprecated.Matches document nodesstatic final short
Deprecated.Matches DocumentType nodesstatic final short
Deprecated.Matches Element nodesstatic final short
Deprecated.Matches entity reference nodesstatic final short
Deprecated.The maximum number of node types for sizing purposesstatic final short
Deprecated.Matches a Namespace Nodestatic final short
Deprecated.Matches no nodesstatic final short
Deprecated.Matches ProcessingInstructionstatic final short
Deprecated.Matches text nodesstatic final short
Deprecated.Does not match any valid node -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.For patterns which only match an ATTRIBUTE_NODE or an ELEMENT_NODE then this pattern may return the name of the element or attribute it matches.short
Deprecated.Returns the type of node the pattern matches.double
Deprecated.Returns the default resolution policy of the pattern according to the XSLT conflict resolution rules.abstract String
getText()
Deprecated.Returns a textual representation of this patternPattern[]
Deprecated.If this pattern is a union pattern then this method should return an array of patterns which describe the union pattern, which should contain more than one pattern.abstract boolean
Deprecated.simplify()
Deprecated.
-
Field Details
-
ELEMENT_NODE
public static final short ELEMENT_NODEDeprecated.Matches Element nodes- See Also:
-
ATTRIBUTE_NODE
public static final short ATTRIBUTE_NODEDeprecated.Matches attribute nodes- See Also:
-
TEXT_NODE
public static final short TEXT_NODEDeprecated.Matches text nodes- See Also:
-
CDATA_SECTION_NODE
public static final short CDATA_SECTION_NODEDeprecated.Matches CDATA section nodes- See Also:
-
ENTITY_REFERENCE_NODE
public static final short ENTITY_REFERENCE_NODEDeprecated.Matches entity reference nodes- See Also:
-
PROCESSING_INSTRUCTION_NODE
public static final short PROCESSING_INSTRUCTION_NODEDeprecated.Matches ProcessingInstruction- See Also:
-
COMMENT_NODE
public static final short COMMENT_NODEDeprecated.Matches comment nodes- See Also:
-
DOCUMENT_NODE
public static final short DOCUMENT_NODEDeprecated.Matches document nodes- See Also:
-
DOCUMENT_TYPE_NODE
public static final short DOCUMENT_TYPE_NODEDeprecated.Matches DocumentType nodes- See Also:
-
NAMESPACE_NODE
public static final short NAMESPACE_NODEDeprecated.Matches a Namespace Node- See Also:
-
UNKNOWN_NODE
public static final short UNKNOWN_NODEDeprecated.Does not match any valid node- See Also:
-
MAX_NODE_TYPE
public static final short MAX_NODE_TYPEDeprecated.The maximum number of node types for sizing purposes- See Also:
-
ANY_NODE
public static final short ANY_NODEDeprecated.Matches any node- See Also:
-
NO_NODE
public static final short NO_NODEDeprecated.Matches no nodes- See Also:
-
-
Constructor Details
-
Pattern
public Pattern()Deprecated.
-
-
Method Details
-
matches
Deprecated.- Parameters:
node
- ????context
- ????- Returns:
- true if the pattern matches the given node
- Throws:
JaxenException
- if ????
-
getPriority
public double getPriority()Deprecated.Returns the default resolution policy of the pattern according to the XSLT conflict resolution rules.- Returns:
- 0.5; the default priority defined in XSLT
- See Also:
-
getUnionPatterns
Deprecated.If this pattern is a union pattern then this method should return an array of patterns which describe the union pattern, which should contain more than one pattern. Otherwise this method should return null.- Returns:
- an array of the patterns which make up this union pattern or null if this pattern is not a union pattern
-
getMatchType
public short getMatchType()Deprecated.Returns the type of node the pattern matches.- Returns:
ANY_NODE
unless overridden
-
getMatchesNodeName
Deprecated.For patterns which only match an ATTRIBUTE_NODE or an ELEMENT_NODE then this pattern may return the name of the element or attribute it matches. This allows a more efficient rule matching algorithm to be performed, rather than a brute force approach of evaluating every pattern for a given Node.- Returns:
- the name of the element or attribute this pattern matches or null if this pattern matches any or more than one name
-
simplify
Deprecated. -
getText
Deprecated.Returns a textual representation of this pattern- Returns:
- the usual string form of this XSLT pattern
-