blob: f651ce5b00e5be37eb997121028521d98155d834 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Thu Nov 22 17:12:59 EST 2007 -->
<TITLE>
Xalan-Java 2.7.1: Class VariableSafeAbsRef
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/VariableSafeAbsRef.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/apache/xpath/operations/Variable.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="VariableSafeAbsRef.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.xpath.operations</FONT>
<BR>
Class VariableSafeAbsRef</H2>
<PRE>
java.lang.Object
|
+--<A HREF="../../../../org/apache/xpath/Expression.html">org.apache.xpath.Expression</A>
|
+--<A HREF="../../../../org/apache/xpath/operations/Variable.html">org.apache.xpath.operations.Variable</A>
|
+--<B>org.apache.xpath.operations.VariableSafeAbsRef</B>
</PRE>
<HR>
<DL>
<DT>public class <B>VariableSafeAbsRef</B><DT>extends <A HREF="../../../../org/apache/xpath/operations/Variable.html">Variable</A></DL>
<P>
This is a "smart" variable reference that is used in situations where
an absolute path is optimized into a variable reference, but may
be used in some situations where the document context may have changed.
For instance, in select="document(doc/@href)//name[//salary &gt; 7250]", the
root in the predicate will be different for each node in the set. While
this is easy to detect statically in this case, in other cases static
detection would be very hard or impossible. So, this class does a dynamic check
to make sure the document context of the referenced variable is the same as
the current document context, and, if it is not, execute the referenced variable's
expression with the current context instead.
<P>
<DL>
<DT><B>See Also: </B><DD><A HREF="../../../../serialized-form.html#org.apache.xpath.operations.VariableSafeAbsRef">Serialized Form</A></DL>
<HR>
<P>
<!-- ======== INNER CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/xpath/operations/VariableSafeAbsRef.html#VariableSafeAbsRef()">VariableSafeAbsRef</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/xpath/objects/XObject.html">XObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xpath/operations/VariableSafeAbsRef.html#execute(org.apache.xpath.XPathContext, boolean)">execute</A></B>(<A HREF="../../../../org/apache/xpath/XPathContext.html">XPathContext</A>&nbsp;xctxt,
boolean&nbsp;destructiveOK)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dereference the variable, and return the reference value.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.apache.xpath.operations.Variable"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class org.apache.xpath.operations.<A HREF="../../../../org/apache/xpath/operations/Variable.html">Variable</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../org/apache/xpath/operations/Variable.html#callVisitors(org.apache.xpath.ExpressionOwner, org.apache.xpath.XPathVisitor)">callVisitors</A>,
<A HREF="../../../../org/apache/xpath/operations/Variable.html#deepEquals(org.apache.xpath.Expression)">deepEquals</A>,
<A HREF="../../../../org/apache/xpath/operations/Variable.html#execute(org.apache.xpath.XPathContext)">execute</A>,
<A HREF="../../../../org/apache/xpath/operations/Variable.html#fixupVariables(java.util.Vector, int)">fixupVariables</A>,
<A HREF="../../../../org/apache/xpath/operations/Variable.html#getAnalysisBits()">getAnalysisBits</A>,
<A HREF="../../../../org/apache/xpath/operations/Variable.html#getElemVariable()">getElemVariable</A>,
<A HREF="../../../../org/apache/xpath/operations/Variable.html#getGlobal()">getGlobal</A>,
<A HREF="../../../../org/apache/xpath/operations/Variable.html#getIndex()">getIndex</A>,
<A HREF="../../../../org/apache/xpath/operations/Variable.html#getQName()">getQName</A>,
<A HREF="../../../../org/apache/xpath/operations/Variable.html#isPsuedoVarRef()">isPsuedoVarRef</A>,
<A HREF="../../../../org/apache/xpath/operations/Variable.html#isStableNumber()">isStableNumber</A>,
<A HREF="../../../../org/apache/xpath/operations/Variable.html#setIndex(int)">setIndex</A>,
<A HREF="../../../../org/apache/xpath/operations/Variable.html#setIsGlobal(boolean)">setIsGlobal</A>,
<A HREF="../../../../org/apache/xpath/operations/Variable.html#setQName(org.apache.xml.utils.QName)">setQName</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.apache.xpath.Expression"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class org.apache.xpath.<A HREF="../../../../org/apache/xpath/Expression.html">Expression</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../org/apache/xpath/Expression.html#asIterator(org.apache.xpath.XPathContext, int)">asIterator</A>,
<A HREF="../../../../org/apache/xpath/Expression.html#asIteratorRaw(org.apache.xpath.XPathContext, int)">asIteratorRaw</A>,
<A HREF="../../../../org/apache/xpath/Expression.html#asNode(org.apache.xpath.XPathContext)">asNode</A>,
<A HREF="../../../../org/apache/xpath/Expression.html#assertion(boolean, java.lang.String)">assertion</A>,
<A HREF="../../../../org/apache/xpath/Expression.html#bool(org.apache.xpath.XPathContext)">bool</A>,
<A HREF="../../../../org/apache/xpath/Expression.html#canTraverseOutsideSubtree()">canTraverseOutsideSubtree</A>,
<A HREF="../../../../org/apache/xpath/Expression.html#error(org.apache.xpath.XPathContext, java.lang.String, java.lang.Object[])">error</A>,
<A HREF="../../../../org/apache/xpath/Expression.html#execute(org.apache.xpath.XPathContext, int)">execute</A>,
<A HREF="../../../../org/apache/xpath/Expression.html#execute(org.apache.xpath.XPathContext, int, org.apache.xml.dtm.DTM, int)">execute</A>,
<A HREF="../../../../org/apache/xpath/Expression.html#executeCharsToContentHandler(org.apache.xpath.XPathContext, org.xml.sax.ContentHandler)">executeCharsToContentHandler</A>,
<A HREF="../../../../org/apache/xpath/Expression.html#exprAddChild(org.apache.xpath.ExpressionNode, int)">exprAddChild</A>,
<A HREF="../../../../org/apache/xpath/Expression.html#exprGetChild(int)">exprGetChild</A>,
<A HREF="../../../../org/apache/xpath/Expression.html#exprGetNumChildren()">exprGetNumChildren</A>,
<A HREF="../../../../org/apache/xpath/Expression.html#exprGetParent()">exprGetParent</A>,
<A HREF="../../../../org/apache/xpath/Expression.html#exprSetParent(org.apache.xpath.ExpressionNode)">exprSetParent</A>,
<A HREF="../../../../org/apache/xpath/Expression.html#getColumnNumber()">getColumnNumber</A>,
<A HREF="../../../../org/apache/xpath/Expression.html#getExpressionOwner()">getExpressionOwner</A>,
<A HREF="../../../../org/apache/xpath/Expression.html#getLineNumber()">getLineNumber</A>,
<A HREF="../../../../org/apache/xpath/Expression.html#getPublicId()">getPublicId</A>,
<A HREF="../../../../org/apache/xpath/Expression.html#getSystemId()">getSystemId</A>,
<A HREF="../../../../org/apache/xpath/Expression.html#isNodesetExpr()">isNodesetExpr</A>,
<A HREF="../../../../org/apache/xpath/Expression.html#num(org.apache.xpath.XPathContext)">num</A>,
<A HREF="../../../../org/apache/xpath/Expression.html#warn(org.apache.xpath.XPathContext, java.lang.String, java.lang.Object[])">warn</A>,
<A HREF="../../../../org/apache/xpath/Expression.html#xstr(org.apache.xpath.XPathContext)">xstr</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="VariableSafeAbsRef()"><!-- --></A><H3>
VariableSafeAbsRef</H3>
<PRE>
public <B>VariableSafeAbsRef</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="execute(org.apache.xpath.XPathContext, boolean)"><!-- --></A><H3>
execute</H3>
<PRE>
public <A HREF="../../../../org/apache/xpath/objects/XObject.html">XObject</A> <B>execute</B>(<A HREF="../../../../org/apache/xpath/XPathContext.html">XPathContext</A>&nbsp;xctxt,
boolean&nbsp;destructiveOK)
throws <A HREF="../../../../javax/xml/transform/TransformerException.html">TransformerException</A></PRE>
<DL>
<DD>Dereference the variable, and return the reference value. Note that lazy
evaluation will occur. If a variable within scope is not found, a warning
will be sent to the error listener, and an empty nodeset will be returned.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>xctxt</CODE> - The runtime execution context.<DT><B>Returns:</B><DD>The evaluated variable, or an empty nodeset if not found.<DT><B>Throws:</B><DD><A HREF="../../../../javax/xml/transform/TransformerException.html">TransformerException</A> - &nbsp;<DT><B>Overrides:</B><DD><A HREF="../../../../org/apache/xpath/operations/Variable.html#execute(org.apache.xpath.XPathContext, boolean)">execute</A> in class <A HREF="../../../../org/apache/xpath/operations/Variable.html">Variable</A></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/VariableSafeAbsRef.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/apache/xpath/operations/Variable.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="VariableSafeAbsRef.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
Copyright © 2006 Apache XML Project. All Rights Reserved.
</BODY>
</HTML>