org.apache.xpath.objects

Class XRTreeFragSelectWrapper

public class XRTreeFragSelectWrapper extends XRTreeFrag implements Cloneable

This class makes an select statement act like an result tree fragment.
Constructor Summary
XRTreeFragSelectWrapper(Expression expr)
Method Summary
DTMIteratorasNodeIterator()
Cast result object to a DTMIterator.
voiddetach()
Detaches the DTMIterator from 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(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.
Stringstr()
Cast result object to a string.
XMLStringxstr()
Cast result object to an XMLString.

Constructor Detail

XRTreeFragSelectWrapper

public XRTreeFragSelectWrapper(Expression expr)

Method Detail

asNodeIterator

public DTMIterator asNodeIterator()
Cast result object to a DTMIterator.

Returns: The document fragment as a DTMIterator

detach

public void detach()
Detaches the DTMIterator from the set which it iterated over, releasing any computational resources and placing the iterator in the INVALID state. After detach has been invoked, calls to nextNode or previousNode will raise a runtime exception. In general, detach should only be called once on the object.

execute

public XObject execute(XPathContext xctxt)
For support of literal objects in xpaths.

Parameters: xctxt The XPath execution context.

Returns: the result of executing the select expression

Throws: javax.xml.transform.TransformerException

fixupVariables

public void fixupVariables(Vector vars, int globalsSize)
This function is used to fixup variables from QNames to stack frame indexes at stylesheet build time.

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).

getType

public int getType()
Tell what kind of class this is.

Returns: the string type

num

public double num()
Cast result object to a number.

Returns: The result tree fragment as a number or NaN

rtf

public int rtf()
Cast result object to a result tree fragment.

Returns: The document fragment this wraps

str

public String str()
Cast result object to a string.

Returns: The document fragment node data or the empty string.

xstr

public XMLString xstr()
Cast result object to an XMLString.

Returns: The document fragment node data or the empty string.

Copyright B) 2006 Apache XML Project. All Rights Reserved.