FileDocCategorySizeDatePackage
XRTreeFragSelectWrapper.javaAPI DocJava SE 6 API5239Tue Jun 10 00:23:16 BST 2008com.sun.org.apache.xpath.internal.objects

XRTreeFragSelectWrapper

public class XRTreeFragSelectWrapper extends XRTreeFrag implements Cloneable
This class makes an select statement act like an result tree fragment.

Fields Summary
static final long
serialVersionUID
Constructors Summary
public XRTreeFragSelectWrapper(Expression expr)

    
  
    super(expr);
  
Methods Summary
public com.sun.org.apache.xml.internal.dtm.DTMIteratorasNodeIterator()
Cast result object to a DTMIterator.

return
The document fragment as a DTMIterator

    throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, null)); //"asNodeIterator() not supported by XRTreeFragSelectWrapper!");
  
public voiddetach()
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.

	throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, null)); //"detach() not supported by XRTreeFragSelectWrapper!");
  
public com.sun.org.apache.xpath.internal.objects.XObjectexecute(com.sun.org.apache.xpath.internal.XPathContext xctxt)
For support of literal objects in xpaths.

param
xctxt The XPath execution context.
return
the result of executing the select expression
throws
javax.xml.transform.TransformerException

	 XObject m_selected;
     m_selected = ((Expression)m_obj).execute(xctxt);
     m_selected.allowDetachToRelease(m_allowRelease);
     if (m_selected.getType() == CLASS_STRING)
       return m_selected;
     else
       return new XString(m_selected.str());
  
public voidfixupVariables(java.util.Vector vars, int globalsSize)
This function is used to fixup variables from QNames to stack frame indexes at stylesheet build time.

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

    ((Expression)m_obj).fixupVariables(vars, globalsSize);
  
public intgetType()
Tell what kind of class this is.

return
the string type

    return CLASS_STRING;
  
public doublenum()
Cast result object to a number.

return
The result tree fragment as a number or NaN


	throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, null)); //"num() not supported by XRTreeFragSelectWrapper!");
  
public intrtf()
Cast result object to a result tree fragment.

return
The document fragment this wraps

    throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, null)); //"rtf() not supported by XRTreeFragSelectWrapper!");
  
public java.lang.Stringstr()
Cast result object to a string.

return
The document fragment node data or the empty string.

	throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, null)); //"str() not supported by XRTreeFragSelectWrapper!");
  
public com.sun.org.apache.xml.internal.utils.XMLStringxstr()
Cast result object to an XMLString.

return
The document fragment node data or the empty string.

	throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, null)); //"xstr() not supported by XRTreeFragSelectWrapper!");