Package org.apache.xpath.objects
Class XRTreeFragSelectWrapper
- java.lang.Object
-
- org.apache.xpath.Expression
-
- org.apache.xpath.objects.XObject
-
- org.apache.xpath.objects.XRTreeFrag
-
- org.apache.xpath.objects.XRTreeFragSelectWrapper
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,javax.xml.transform.SourceLocator,ExpressionNode,XPathVisitable
public class XRTreeFragSelectWrapper extends XRTreeFrag implements java.lang.Cloneable
This class makes an select statement act like an result tree fragment.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.xpath.objects.XObject
CLASS_BOOLEAN, CLASS_NODESET, CLASS_NULL, CLASS_NUMBER, CLASS_RTREEFRAG, CLASS_STRING, CLASS_UNKNOWN, CLASS_UNRESOLVEDVARIABLE
-
-
Constructor Summary
Constructors Constructor Description XRTreeFragSelectWrapper(Expression expr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DTMIteratorasNodeIterator()Cast result object to a DTMIterator.voiddetach()Detaches theDTMIteratorfrom the set which it iterated over, releasing any computational resources and placing the iterator in the INVALID state.XObjectexecute(XPathContext xctxt)For support of literal objects in xpaths.voidfixupVariables(java.util.Vector vars, int globalsSize)This function is used to fixup variables from QNames to stack frame indexes at stylesheet build time.intgetType()Tell what kind of class this is.doublenum()Cast result object to a number.intrtf()Cast result object to a result tree fragment.java.lang.Stringstr()Cast result object to a string.XMLStringxstr()Cast result object to an XMLString.-
Methods inherited from class org.apache.xpath.objects.XRTreeFrag
allowDetachToRelease, appendToFsb, bool, convertToNodeset, equals, getTypeString, object
-
Methods inherited from class org.apache.xpath.objects.XObject
boolWithSideEffects, callVisitors, castToType, create, create, deepEquals, destruct, dispatchCharactersEvents, getFresh, greaterThan, greaterThanOrEqual, iter, lessThan, lessThanOrEqual, mutableNodeset, nodelist, nodeset, notEquals, numWithSideEffects, reset, rtf, rtree, rtree, toString
-
Methods inherited from class org.apache.xpath.Expression
asIterator, asIteratorRaw, asNode, assertion, bool, canTraverseOutsideSubtree, error, execute, execute, execute, executeCharsToContentHandler, exprAddChild, exprGetChild, exprGetNumChildren, exprGetParent, exprSetParent, getColumnNumber, getExpressionOwner, getLineNumber, getPublicId, getSystemId, isNodesetExpr, isStableNumber, num, warn, xstr
-
-
-
-
Constructor Detail
-
XRTreeFragSelectWrapper
public XRTreeFragSelectWrapper(Expression expr)
-
-
Method Detail
-
fixupVariables
public void fixupVariables(java.util.Vector vars, int globalsSize)This function is used to fixup variables from QNames to stack frame indexes at stylesheet build time.- Overrides:
fixupVariablesin classXObject- Parameters:
vars- 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).
-
execute
public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
For support of literal objects in xpaths.
-
detach
public void detach()
Detaches theDTMIteratorfrom the set which it iterated over, releasing any computational resources and placing the iterator in the INVALID state. Afterdetachhas been invoked, calls tonextNodeorpreviousNodewill raise a runtime exception. In general, detach should only be called once on the object.- Overrides:
detachin classXRTreeFrag
-
num
public double num() throws javax.xml.transform.TransformerExceptionCast result object to a number.- Overrides:
numin classXRTreeFrag- Returns:
- The result tree fragment as a number or NaN
- Throws:
javax.xml.transform.TransformerException
-
xstr
public XMLString xstr()
Cast result object to an XMLString.- Overrides:
xstrin classXRTreeFrag- Returns:
- The document fragment node data or the empty string.
-
str
public java.lang.String str()
Cast result object to a string.- Overrides:
strin classXRTreeFrag- Returns:
- The document fragment node data or the empty string.
-
getType
public int getType()
Tell what kind of class this is.- Overrides:
getTypein classXRTreeFrag- Returns:
- the string type
-
rtf
public int rtf()
Cast result object to a result tree fragment.- Overrides:
rtfin classXRTreeFrag- Returns:
- The document fragment this wraps
-
asNodeIterator
public DTMIterator asNodeIterator()
Cast result object to a DTMIterator.- Overrides:
asNodeIteratorin classXRTreeFrag- Returns:
- The document fragment as a DTMIterator
-
-