Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > b3bdfe6d859a3d6920ff2c44b38e9a6f > files > 2932

saxon-manual-9.4.0.9-2.mga7.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_18) on Fri Dec 09 20:48:45 GMT 2011 -->
<TITLE>
SaxonXQForwardSequence
</TITLE>

<META NAME="date" CONTENT="2011-12-09">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="SaxonXQForwardSequence";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <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="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="../../../../net/sf/saxon/xqj/SaxonXQExpression.html" title="class in net.sf.saxon.xqj"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../net/sf/saxon/xqj/SaxonXQItem.html" title="class in net.sf.saxon.xqj"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?net/sf/saxon/xqj/SaxonXQForwardSequence.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="SaxonXQForwardSequence.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&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>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
net.sf.saxon.xqj</FONT>
<BR>
Class SaxonXQForwardSequence</H2>
<PRE>
<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../net/sf/saxon/xqj/Closable.html" title="class in net.sf.saxon.xqj">net.sf.saxon.xqj.Closable</A>
      <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>net.sf.saxon.xqj.SaxonXQForwardSequence</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html" title="interface in javax.xml.xquery">XQItemAccessor</A>, <A HREF="../../../../javax/xml/xquery/XQResultSequence.html" title="interface in javax.xml.xquery">XQResultSequence</A>, <A HREF="../../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>SaxonXQForwardSequence</B><DT>extends <A HREF="../../../../net/sf/saxon/xqj/Closable.html" title="class in net.sf.saxon.xqj">Closable</A><DT>implements <A HREF="../../../../javax/xml/xquery/XQResultSequence.html" title="interface in javax.xml.xquery">XQResultSequence</A></DL>
</PRE>

<P>
The class is a Saxon implementation of the XQJ interface XQResultSequence. This
 implementation is used to represent a sequence that can only be read in a forwards direction.
<P>

<P>
<HR>

<P>

<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected </CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#SaxonXQForwardSequence(net.sf.saxon.om.SequenceIterator, net.sf.saxon.xqj.SaxonXQPreparedExpression)">SaxonXQForwardSequence</A></B>(<A HREF="../../../../net/sf/saxon/om/SequenceIterator.html" title="interface in net.sf.saxon.om">SequenceIterator</A>&nbsp;iterator,
                       <A HREF="../../../../net/sf/saxon/xqj/SaxonXQPreparedExpression.html" title="class in net.sf.saxon.xqj">SaxonXQPreparedExpression</A>&nbsp;expression)</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" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#absolute(int)">absolute</A></B>(int&nbsp;itempos)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the <code>XQSequence</code>'s position to the given item
 number in this object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#afterLast()">afterLast</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Move to the position after the last item.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#beforeFirst()">beforeFirst</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves to the position before the first item.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#count()">count</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a number indicating the number of items in the sequence.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#first()">first</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves to the first item in the sequence.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#getAtomicValue()">getAtomicValue</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the current item as a Java <code>String</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#getBoolean()">getBoolean</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the current item as a <code>boolean</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#getByte()">getByte</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the current item as a <code>byte</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../javax/xml/xquery/XQConnection.html" title="interface in javax.xml.xquery">XQConnection</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#getConnection()">getConnection</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the XQuery connection associated with this result sequence</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#getDouble()">getDouble</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the current item as a <code>double</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#getFloat()">getFloat</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the current item as a <code>float</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#getInt()">getInt</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the current item as an <code>int</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../javax/xml/xquery/XQItem.html" title="interface in javax.xml.xquery">XQItem</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#getItem()">getItem</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the current item as an immutable <code>XQItem</code> object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/stream/XMLStreamReader.html?is-external=true" title="class or interface in javax.xml.stream">XMLStreamReader</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#getItemAsStream()">getItemAsStream</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read the current item as an <code>XMLStreamReader</code> object, as described
 in <i>Section 12.1 Serializing an XDM instance into a StAX event stream
 (XMLStreamReader), XQuery API for Java (XQJ) 1.0</i>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#getItemAsString(java.util.Properties)">getItemAsString</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;props)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Serializes the current item  according to the
 <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#getItemType()">getItemType</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the type of the item.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#getLong()">getLong</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the current item as a <code>long</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/org/w3c/dom/Node.html?is-external=true" title="class or interface in org.w3c.dom">Node</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#getNode()">getNode</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the item as a DOM node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#getNodeUri()">getNodeUri</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the URI for this item.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#getObject()">getObject</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the current item as an <code>Object</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#getPosition()">getPosition</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the current cursor position.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/stream/XMLStreamReader.html?is-external=true" title="class or interface in javax.xml.stream">XMLStreamReader</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#getSequenceAsStream()">getSequenceAsStream</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read the entire sequence starting from the current position as an
 <code>XMLStreamReader</code> object, as described in 
 <i>Section 12.1 Serializing an XDM instance into a StAX event stream
 (XMLStreamReader), XQuery API for Java (XQJ) 1.0</i>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#getSequenceAsString(java.util.Properties)">getSequenceAsString</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;props)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Serializes the sequence starting from the current position to a String
 according to the <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;short</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#getShort()">getShort</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the current item as a <code>short</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#instanceOf(javax.xml.xquery.XQItemType)">instanceOf</A></B>(<A HREF="../../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A>&nbsp;type)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks if the item "matches" an item type, as defined in
 <a href="http://www.w3.org/TR/xquery/#id-matching-item"><i>2.5.4.2
 Matching an Item Type and an Item, XQuery 1.0: An XML Query Language</i></a>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#isAfterLast()">isAfterLast</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks if the current position is after the last item in the sequence.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#isBeforeFirst()">isBeforeFirst</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks if the current position before the first item in the sequence.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#isFirst()">isFirst</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks if the current position at the first item in the sequence.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#isLast()">isLast</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks if the current position at the last item in the sequence.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#isOnItem()">isOnItem</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Check if the sequence is positioned on an item or not.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#isScrollable()">isScrollable</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks if the sequence is scrollable.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#last()">last</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves to the last item in the sequence.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#next()">next</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves to the next item in the sequence.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#previous()">previous</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves to the previous item in the sequence.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#relative(int)">relative</A></B>(int&nbsp;itempos)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the cursor a relative number of items, either positive or negative.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#writeItem(java.io.OutputStream, java.util.Properties)">writeItem</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A>&nbsp;os,
          <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;props)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Serializes the current item to a <code>Writer</code> according to
 <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#writeItem(java.io.Writer, java.util.Properties)">writeItem</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</A>&nbsp;ow,
          <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;props)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Serializes the current item to a <code>Writer</code> according to
 <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#writeItemToResult(javax.xml.transform.Result)">writeItemToResult</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/transform/Result.html?is-external=true" title="class or interface in javax.xml.transform">Result</A>&nbsp;result)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes the current item to a <code>Result</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#writeItemToSAX(org.xml.sax.ContentHandler)">writeItemToSAX</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/org/xml/sax/ContentHandler.html?is-external=true" title="class or interface in org.xml.sax">ContentHandler</A>&nbsp;saxHandler)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes the current item to a SAX handler, as described in
 in <i>Section 12.2 Serializing an XDM instance into a SAX event stream,
 XQuery API for Java (XQJ) 1.0</i>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#writeSequence(java.io.OutputStream, java.util.Properties)">writeSequence</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A>&nbsp;os,
              <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;props)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Serializes the sequence starting from the current position to an
 <code>OutputStream</code> according to the 
 <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#writeSequence(java.io.Writer, java.util.Properties)">writeSequence</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</A>&nbsp;ow,
              <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;props)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Serializes the sequence starting from the current position to a Writer
 according to the  <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#writeSequenceToResult(javax.xml.transform.Result)">writeSequenceToResult</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/transform/Result.html?is-external=true" title="class or interface in javax.xml.transform">Result</A>&nbsp;result)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes the entire sequence starting from the current position to a
 <code>Result</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html#writeSequenceToSAX(org.xml.sax.ContentHandler)">writeSequenceToSAX</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/org/xml/sax/ContentHandler.html?is-external=true" title="class or interface in org.xml.sax">ContentHandler</A>&nbsp;saxHandler)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes the entire sequence starting from the current position to a SAX
 handler, as described in <i>Section 12.2 Serializing an XDM instance
 into a SAX event stream, XQuery API for Java (XQJ) 1.0</i>.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_net.sf.saxon.xqj.Closable"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class net.sf.saxon.xqj.<A HREF="../../../../net/sf/saxon/xqj/Closable.html" title="class in net.sf.saxon.xqj">Closable</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../net/sf/saxon/xqj/Closable.html#close()">close</A>, <A HREF="../../../../net/sf/saxon/xqj/Closable.html#isClosed()">isClosed</A>, <A HREF="../../../../net/sf/saxon/xqj/Closable.html#setClosableContainer(net.sf.saxon.xqj.Closable)">setClosableContainer</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_javax.xml.xquery.XQSequence"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface javax.xml.xquery.<A HREF="../../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#close()">close</A>, <A HREF="../../../../javax/xml/xquery/XQSequence.html#isClosed()">isClosed</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="SaxonXQForwardSequence(net.sf.saxon.om.SequenceIterator, net.sf.saxon.xqj.SaxonXQPreparedExpression)"><!-- --></A><H3>
SaxonXQForwardSequence</H3>
<PRE>
protected <B>SaxonXQForwardSequence</B>(<A HREF="../../../../net/sf/saxon/om/SequenceIterator.html" title="interface in net.sf.saxon.om">SequenceIterator</A>&nbsp;iterator,
                                 <A HREF="../../../../net/sf/saxon/xqj/SaxonXQPreparedExpression.html" title="class in net.sf.saxon.xqj">SaxonXQPreparedExpression</A>&nbsp;expression)</PRE>
<DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="getConnection()"><!-- --></A><H3>
getConnection</H3>
<PRE>
public <A HREF="../../../../javax/xml/xquery/XQConnection.html" title="interface in javax.xml.xquery">XQConnection</A> <B>getConnection</B>()
                           throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQResultSequence.html#getConnection()">XQResultSequence</A></CODE></B></DD>
<DD>Gets the XQuery connection associated with this result sequence
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQResultSequence.html#getConnection()">getConnection</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQResultSequence.html" title="interface in javax.xml.xquery">XQResultSequence</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the connection associated with this result sequence
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if the result sequence is in a closed state</DL>
</DD>
</DL>
<HR>

<A NAME="getAtomicValue()"><!-- --></A><H3>
getAtomicValue</H3>
<PRE>
public <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getAtomicValue</B>()
                      throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#getAtomicValue()">XQItemAccessor</A></CODE></B></DD>
<DD>Gets the current item as a Java <code>String</code>. The current item
 must be an atomic value. This function casts the current item to an
 <code>xs:string</code> value according to the casting rules defined in 
 <a href="http://www.w3.org/TR/xpath-functions/#casting-from-strings">
 <i>17.1.2 Casting to xs:string and xs:untypedAtomic, XQuery 1.0 and
 XPath 2.0 Functions and Operators</i></a>,
 and then returns the value as a Java <code>String</code>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#getAtomicValue()">getAtomicValue</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html" title="interface in javax.xml.xquery">XQItemAccessor</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the string representation of the item
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors accessing the item's value,
                            (2) the item is not an atomic value,
                            (3) there is an error when casting the
                            item to a string representation,
                            (4) the underlying sequence or item is in a
                            closed state, or (5) in the case of forward only
                            sequences, a get or write method was already
                            invoked on the current item</DL>
</DD>
</DL>
<HR>

<A NAME="getBoolean()"><!-- --></A><H3>
getBoolean</H3>
<PRE>
public boolean <B>getBoolean</B>()
                   throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#getBoolean()">XQItemAccessor</A></CODE></B></DD>
<DD>Gets the current item as a <code>boolean</code>. 
 The current item must be an atomic value of type <code>xs:boolean</code>
 or a subtype.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#getBoolean()">getBoolean</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html" title="interface in javax.xml.xquery">XQItemAccessor</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>a <code>boolean</code> representing the current item
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the conversion of the current item to a
                            <code>boolean</code> fails, (2) if there are
                            errors accessing the current item, (3) if the
                            underlying sequence or item is in a closed state,
                            or (4) in the case of forward only sequences, a
                            get or write method was already invoked on the
                            current item</DL>
</DD>
</DL>
<HR>

<A NAME="getByte()"><!-- --></A><H3>
getByte</H3>
<PRE>
public byte <B>getByte</B>()
             throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#getByte()">XQItemAccessor</A></CODE></B></DD>
<DD>Gets the current item as a <code>byte</code>.
 The current item must be an atomic value of type <code>xs:decimal</code>
 or a subtype, and its value must be in the value space of <code>byte</code>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#getByte()">getByte</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html" title="interface in javax.xml.xquery">XQItemAccessor</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>a <code>byte</code> representing the current item
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the conversion of the current item to a
                            <code>byte</code> fails, (2) if there are
                            errors accessing the current item, (3) if the
                            underlying sequence or item is in a closed state,
                            or (4) in the case of forward only sequences, a
                            get or write method was already invoked on the
                            current item</DL>
</DD>
</DL>
<HR>

<A NAME="getDouble()"><!-- --></A><H3>
getDouble</H3>
<PRE>
public double <B>getDouble</B>()
                 throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#getDouble()">XQItemAccessor</A></CODE></B></DD>
<DD>Gets the current item as a <code>double</code>.
 The current item must be an atomic value of type <code>xs:double</code>
 or a subtype.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#getDouble()">getDouble</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html" title="interface in javax.xml.xquery">XQItemAccessor</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>a <code>double</code> representing the current item
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the conversion of the current item to a
                            <code>double</code> fails, (2) if there are
                            errors accessing the current item, (3) if the
                            underlying sequence or item is in a closed state,
                            or (4) in the case of forward only sequences, a
                            get or write method was already invoked on the
                            current item</DL>
</DD>
</DL>
<HR>

<A NAME="getFloat()"><!-- --></A><H3>
getFloat</H3>
<PRE>
public float <B>getFloat</B>()
               throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#getFloat()">XQItemAccessor</A></CODE></B></DD>
<DD>Gets the current item as a <code>float</code>.
 The current item must be an atomic value of type <code>xs:float</code>
 or a subtype.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#getFloat()">getFloat</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html" title="interface in javax.xml.xquery">XQItemAccessor</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>a <code>float</code> representing the current item
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the conversion of the current item to a
                            <code>float</code> fails, (2) if there are
                            errors accessing the current item, (3) if the
                            underlying sequence or item is in a closed state,
                            or (4) in the case of forward only sequences, a
                            get or write method was already invoked on the
                            current item</DL>
</DD>
</DL>
<HR>

<A NAME="getInt()"><!-- --></A><H3>
getInt</H3>
<PRE>
public int <B>getInt</B>()
           throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#getInt()">XQItemAccessor</A></CODE></B></DD>
<DD>Gets the current item as an <code>int</code>.
 The current item must be an atomic value of type <code>xs:decimal</code>
 or a subtype, and its value must be in the value space of <code>int</code>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#getInt()">getInt</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html" title="interface in javax.xml.xquery">XQItemAccessor</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>an <code>int</code> representing the current item
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the conversion of the current item to a
                            <code>int</code> fails, (2) if there are
                            errors accessing the current item, (3) if the
                            underlying sequence or item is in a closed state,
                            or (4) in the case of forward only sequences, a
                            get or write method was already invoked on the
                            current item</DL>
</DD>
</DL>
<HR>

<A NAME="getItemAsStream()"><!-- --></A><H3>
getItemAsStream</H3>
<PRE>
public <A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/stream/XMLStreamReader.html?is-external=true" title="class or interface in javax.xml.stream">XMLStreamReader</A> <B>getItemAsStream</B>()
                                throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#getItemAsStream()">XQItemAccessor</A></CODE></B></DD>
<DD>Read the current item as an <code>XMLStreamReader</code> object, as described
 in <i>Section 12.1 Serializing an XDM instance into a StAX event stream
 (XMLStreamReader), XQuery API for Java (XQJ) 1.0</i>.

 Note that the serialization process might fail, in which case a 
 <code>XQException</code> is thrown.
 
 While the stream is being read, the application MUST NOT do any other
 concurrent operations on the underlying item or sequence.
 The operation on the stream is undefined if the underlying sequence
 is repositioned or the state of the underlying item or sequence
 is changed by concurrent operations.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#getItemAsStream()">getItemAsStream</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html" title="interface in javax.xml.xquery">XQItemAccessor</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>an XML reader object as <code>XMLStreamReader</code>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors accessing the current item
                            or the underlying sequence, (2) the underlying sequence
                            or item is in a closed state, (3) in the case of a forward
                            only sequence, a get or write method has already been
                            invoked on the current item, or (4) in case of an error
                            during serialization of the current item into a StAX event
                            stream as defined in <i>Section 12.1 Serializing an XDM
                            instance into a StAX event stream (XMLStreamReader), XQuery
                            API for Java (XQJ) 1.0</i></DL>
</DD>
</DL>
<HR>

<A NAME="getItemAsString(java.util.Properties)"><!-- --></A><H3>
getItemAsString</H3>
<PRE>
public <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getItemAsString</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;props)
                       throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#getItemAsString(java.util.Properties)">XQItemAccessor</A></CODE></B></DD>
<DD>Serializes the current item  according to the
 <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>.
 
 Serialization parameters, which influence how serialization is
 performed, can be specified. Refer to the 
 <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>
 and <i>Section 12 Serialization, XQuery
  API for Java (XQJ) 1.0</i> for more information.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#getItemAsString(java.util.Properties)">getItemAsString</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html" title="interface in javax.xml.xquery">XQItemAccessor</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>props</CODE> - specifies the serialization parameters,
                            <code>null</code> is considered equivalent to an empty
                            <code>Properties</code> object
<DT><B>Returns:</B><DD>the serialized representation of the item
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors accessing the current
                            item or the underlying sequence, (2) the underlying
                            sequence or item is in a closed state,
                            (3) in the case of a forward only sequence,
                            a get or write method has already been
                            invoked on the current item, or (4)
                            if there are errors during serialization</DL>
</DD>
</DL>
<HR>

<A NAME="getItemType()"><!-- --></A><H3>
getItemType</H3>
<PRE>
public <A HREF="../../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> <B>getItemType</B>()
                       throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#getItemType()">XQItemAccessor</A></CODE></B></DD>
<DD>Gets the type of the item.
 <br>

 On a forward only sequence this method can be called independent of any
 other get or write method. It will not raise an error if such method has
 been called already, nor will it affect subsequent invocations of any
 other get or write method.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#getItemType()">getItemType</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html" title="interface in javax.xml.xquery">XQItemAccessor</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the type of the item
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors accessing the type of the item,
                            or (2) the underlying sequence or item is in a closed state</DL>
</DD>
</DL>
<HR>

<A NAME="getLong()"><!-- --></A><H3>
getLong</H3>
<PRE>
public long <B>getLong</B>()
             throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#getLong()">XQItemAccessor</A></CODE></B></DD>
<DD>Gets the current item as a <code>long</code>.
 The current item must be an atomic value of type <code>xs:decimal</code>
 or a subtype, and its value must be in the value space of <code>long</code>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#getLong()">getLong</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html" title="interface in javax.xml.xquery">XQItemAccessor</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>a <code>long</code> representing the current item
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the conversion of the current item to a
                            <code>long</code> fails, (2) if there are
                            errors accessing the current item, (3) if the
                            underlying sequence or item is in a closed state,
                            or (4) in the case of forward only sequences, a
                            get or write method was already invoked on the
                            current item</DL>
</DD>
</DL>
<HR>

<A NAME="getNode()"><!-- --></A><H3>
getNode</H3>
<PRE>
public <A HREF="http://download.oracle.com/javase/6/docs/api/org/w3c/dom/Node.html?is-external=true" title="class or interface in org.w3c.dom">Node</A> <B>getNode</B>()
             throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#getNode()">XQItemAccessor</A></CODE></B></DD>
<DD>Gets the item as a DOM node. The current item must be a node.
 The type of the returned DOM node is governed by <i>Table 7 -
 XQuery Node Types and Corresponding Java Object Types  XQuery
 API for Java (XQJ) 1.0</i>

 The instance of the returned node is implementation dependent. The node
 may be a reference or a copy of the internal state of the item. It is
 advisable to make a copy of the node if the application plans to modify
 it.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#getNode()">getNode</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html" title="interface in javax.xml.xquery">XQItemAccessor</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>a DOM node representing the current item
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) if there are errors accessing the current item,
                            (2) the current item is not a node, (3) if the
                            underlying sequence or item is in a closed state,
                            or (4) in the case of forward only sequences, a
                            get or write method was already invoked on the
                            current item</DL>
</DD>
</DL>
<HR>

<A NAME="getNodeUri()"><!-- --></A><H3>
getNodeUri</H3>
<PRE>
public <A HREF="http://download.oracle.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A> <B>getNodeUri</B>()
               throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#getNodeUri()">XQItemAccessor</A></CODE></B></DD>
<DD>Returns the URI for this item. If the item is a document node, then this
 method returns the absolute URI of the resource from which the document
 node was constructed. If the document URI is not available, then the
 empty string is returned. If the document URI is available, the returned
 value is the same as if <code>fn:document-uri</code> were evaluated on this document
 node. If the item is of a node kind other than document node, then the
 returned URI is implementation-defined.<br>

 On a forward only sequence this method can be called independent of any
 other get or write method. It will not raise an error if such method has
 been called already, nor will it affect subsequent invocations of any
 other get or write method on the current item.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#getNodeUri()">getNodeUri</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html" title="interface in javax.xml.xquery">XQItemAccessor</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the document URI for this document node or the empty string if
                            not available. For other node kinds, the result is
                            implementation-defined
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) if there are errors accessing the current item,
                            (2) the current item is not a node, (3) if the
                            underlying sequence or item is in a closed state</DL>
</DD>
</DL>
<HR>

<A NAME="getObject()"><!-- --></A><H3>
getObject</H3>
<PRE>
public <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>getObject</B>()
                 throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#getObject()">XQItemAccessor</A></CODE></B></DD>
<DD>Gets the current item as an <code>Object</code>. 

 The data type of the returned object will be the Java <code>Object</code>
 type as specified in <i>14.4 Mapping an XQuery Atomic Value to a
 Java Object Type and 14.5 Mapping an XQuery Node to a Java Object Type,
 XQuery API for Java (XQJ) 1.0</i>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#getObject()">getObject</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html" title="interface in javax.xml.xquery">XQItemAccessor</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>an object representing the current item
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) if there are errors accessing the current item,
                            (2) if the underlying sequence or item is in a closed state,
                            or (3) in the case of forward only sequences, a
                            get or write method was already invoked on the
                            current item</DL>
</DD>
</DL>
<HR>

<A NAME="getShort()"><!-- --></A><H3>
getShort</H3>
<PRE>
public short <B>getShort</B>()
               throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#getShort()">XQItemAccessor</A></CODE></B></DD>
<DD>Gets the current item as a <code>short</code>.
 The current item must be an atomic value of type <code>xs:decimal</code>
 or a subtype, and its value must be in the value space of <code>short</code>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#getShort()">getShort</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html" title="interface in javax.xml.xquery">XQItemAccessor</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>a <code>short</code> representing the current item
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the conversion of the current item to a
                            <code>short</code> fails, (2) if there are
                            errors accessing the current item, (3) if the
                            underlying sequence or item is in a closed state,
                            or (4) in the case of forward only sequences, a
                            get or write method was already invoked on the
                            current item</DL>
</DD>
</DL>
<HR>

<A NAME="instanceOf(javax.xml.xquery.XQItemType)"><!-- --></A><H3>
instanceOf</H3>
<PRE>
public boolean <B>instanceOf</B>(<A HREF="../../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A>&nbsp;type)
                   throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#instanceOf(javax.xml.xquery.XQItemType)">XQItemAccessor</A></CODE></B></DD>
<DD>Checks if the item "matches" an item type, as defined in
 <a href="http://www.w3.org/TR/xquery/#id-matching-item"><i>2.5.4.2
 Matching an Item Type and an Item, XQuery 1.0: An XML Query Language</i></a>.

 You can use this method to first check the type of the result before 
 calling the specific get methods. 
 <br>
 <br>
 Example -
 <pre>
  ...
  XQItemType strType = conn.createAtomicType(XQItemType.XQBASETYPE_STRING);
  XQItemType nodeType = conn.createNodeType();

  XQSequence result = preparedExpr.executeQuery();
  while (result.next())
  {
     // Generic check for node.. 
     if (result.instanceOf(nodeType))
        org.w3.dom.Node node = result.getNode();
     else if (result.instanceOf(strType))
        String str = result.getAtomicValue();
   }
 </pre>
 <br>
 If either the type of the <code>XQItemAccessor</code> or the input 
 <code>XQItemType</code> is not a built-in type, then this method is 
 allowed to raise exception if it can NOT determine the instanceOf 
 relationship due to the lack of the access of
 the XML schema that defines the user defined schema types if the
 <code>XQMetaData.isUserDefinedXMLSchemaTypeSupported()</code> method
 returns <code>false</code>.
 <br>
 Otherwise, this method must determine if the type of the
 <code>XQItemAccessor</code>  is an instance of the input
 <code>XQItemType</code>. Note even if 
 <code>isUserDefinedXMLSchemaTypeSupported()</code> returns <code>false</code>,
 an XQJ implementation may still be able to determine the instanceOf
 relationship for certain cases involving user defined schema type.
 For example, if the type of an <code>XQItemAccessor</code> is of
 <code>mySchema:hatSize</code> sequence type and the input parameter 
 <code>XQItemType</code> is of <code>item()</code> sequence type, 
 the return value for instanceOf relationship should always be <code>true</code>
 even though the XQJ implementation does not know the precise type
 information of <code>mySchema:hatSize</code> type defined in XML
 schema <code>'mySchema'</code>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#instanceOf(javax.xml.xquery.XQItemType)">instanceOf</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html" title="interface in javax.xml.xquery">XQItemAccessor</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>type</CODE> - item type to match
<DT><B>Returns:</B><DD><code>true</code> if this item matches
                            the input item type as defined in
                            <a href="http://www.w3.org/TR/xquery/#id-matching-item">
                            <i>2.5.4.2 Matching an Item Type and an Item,
                            XQuery 1.0: An XML Query Language</i></a>,
                            and <code>false</code> if it does not
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors accessing the item's
                            type, (2) if the underlying sequence or item
                            is in a closed state, (3) if the implementation
                            is unable to determine the schema definition of a
                            user defined schema type, or (4) the <code>type</code>
                            parameter is <code>null</code></DL>
</DD>
</DL>
<HR>

<A NAME="writeItem(java.io.OutputStream, java.util.Properties)"><!-- --></A><H3>
writeItem</H3>
<PRE>
public void <B>writeItem</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A>&nbsp;os,
                      <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;props)
               throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#writeItem(java.io.OutputStream, java.util.Properties)">XQItemAccessor</A></CODE></B></DD>
<DD>Serializes the current item to a <code>Writer</code> according to
 <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>.

 Serialization parameters, which influence how serialization is
 performed, can be specified. Refer to the 
 <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>
 and <i>Section 12 Serialization, XQuery
 API for Java (XQJ) 1.0</i> for more information.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#writeItem(java.io.OutputStream, java.util.Properties)">writeItem</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html" title="interface in javax.xml.xquery">XQItemAccessor</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>os</CODE> - the output stream into which the current item is
                            to be serialized<DD><CODE>props</CODE> - specifies the serialization parameters,
                            <code>null</code> is considered equivalent to an empty
                            <code>Properties</code> object
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors accessing the current
                            item or the underlying sequence, (2) the underlying
                            sequence or item is in a closed state,
                            (3) in the case of a forward only sequence, a get or
                            write method has already been invoked on the current item,
                            (4) if there are errors during serialization, or 
                            (5) the <code>os</code> parameter is <code>null</code></DL>
</DD>
</DL>
<HR>

<A NAME="writeItem(java.io.Writer, java.util.Properties)"><!-- --></A><H3>
writeItem</H3>
<PRE>
public void <B>writeItem</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</A>&nbsp;ow,
                      <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;props)
               throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#writeItem(java.io.Writer, java.util.Properties)">XQItemAccessor</A></CODE></B></DD>
<DD>Serializes the current item to a <code>Writer</code> according to
 <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>.
 
 Serialization parameters, which influence how serialization is
 performed, can be specified. Refer to the 
 <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>
 and <i>Section 12 Serialization, XQuery
 API for Java (XQJ) 1.0</i> for more information.
 <br>
 <br>
 Warning: When outputting to a <code>Writer</code>, make sure the writer's encoding
 matches the encoding parameter if specified as a property or the default
 encoding.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#writeItem(java.io.Writer, java.util.Properties)">writeItem</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html" title="interface in javax.xml.xquery">XQItemAccessor</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ow</CODE> - the writer object into which the current item is to be
                            serialized<DD><CODE>props</CODE> - specifies the serialization parameters,
                            <code>null</code> is considered equivalent to an empty
                            <code>Properties</code> object
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors accessing the current
                            item or the underlying sequence, (2) the underlying
                            sequence or item is in a closed state,
                            (3) in the case of a forward only sequence, a get or
                            write method has already been invoked on the current item,
                            (4) if there are errors during serialization, or
                            (5) the <code>ow</code> parameter is <code>null</code></DL>
</DD>
</DL>
<HR>

<A NAME="writeItemToResult(javax.xml.transform.Result)"><!-- --></A><H3>
writeItemToResult</H3>
<PRE>
public void <B>writeItemToResult</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/transform/Result.html?is-external=true" title="class or interface in javax.xml.transform">Result</A>&nbsp;result)
                       throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#writeItemToResult(javax.xml.transform.Result)">XQItemAccessor</A></CODE></B></DD>
<DD>Writes the current item to a <code>Result</code>. First the item is
 normalized as described in <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>. Subsequently it is
 serialized to the <code>Result</code> object.<br>

 Note that the normalization process can fail, in which case an
 <code>XQException</code> is thrown.

 An XQJ implementation must at least support the following implementations:
 <ul>
   <li><code>javax.xml.transform.dom.DOMResult</code></li>
   <li><code>javax.xml.transform.sax.SAXResult</code></li>
   <li><code>javax.xml.transform.stream.StreamResult</code></li>
 </ul>
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#writeItemToResult(javax.xml.transform.Result)">writeItemToResult</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html" title="interface in javax.xml.xquery">XQItemAccessor</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>result</CODE> - the result object into which the item is to be serialized
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors accessing the current
                            item or the underlying sequence, (2) the underlying
                            sequence or item is in a closed state, (3) in the case
                            of a forward only sequence, a get or write method has
                            already been invoked on the current item, (4) in case
                            of an error while serializing the current item into the
                            <code>Result</code> object, or (5) the <code>result</code>
                            parameter is <code>null</code></DL>
</DD>
</DL>
<HR>

<A NAME="writeItemToSAX(org.xml.sax.ContentHandler)"><!-- --></A><H3>
writeItemToSAX</H3>
<PRE>
public void <B>writeItemToSAX</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/org/xml/sax/ContentHandler.html?is-external=true" title="class or interface in org.xml.sax">ContentHandler</A>&nbsp;saxHandler)
                    throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#writeItemToSAX(org.xml.sax.ContentHandler)">XQItemAccessor</A></CODE></B></DD>
<DD>Writes the current item to a SAX handler, as described in
 in <i>Section 12.2 Serializing an XDM instance into a SAX event stream,
 XQuery API for Java (XQJ) 1.0</i>.

 Note that the serialization process might fail, in
 which case a <code>XQException</code> is thrown. 

 The specified <code>org.xml.sax.ContentHandler</code> can optionally implement the
 <code>org.xml.sax.LexicalHandler</code> interface. An implementation must check if the
 specified <code>ContentHandler</code> implements <code>LexicalHandler</code>.
 If the handler is a <code>LexicalHandler</code> comment nodes are reported, otherwise
 they will be silently ignored.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html#writeItemToSAX(org.xml.sax.ContentHandler)">writeItemToSAX</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQItemAccessor.html" title="interface in javax.xml.xquery">XQItemAccessor</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>saxHandler</CODE> - the SAX content handler, optionally a lexical handler
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors accessing the current
                            item or the underlying sequence, (2) the underlying
                            sequence or item is in a closed state, (3) in the case
                            of a forward only sequence, a get or write method has
                            already been invoked on the current item, (4) in case
                            of an error while serializing the XDM instance
                            into a SAX event stream, or (5) the <code>saxhdlr</code>
                            parameter is <code>null</code></DL>
</DD>
</DL>
<HR>

<A NAME="absolute(int)"><!-- --></A><H3>
absolute</H3>
<PRE>
public boolean <B>absolute</B>(int&nbsp;itempos)
                 throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#absolute(int)">XQSequence</A></CODE></B></DD>
<DD>Moves the <code>XQSequence</code>'s position to the given item
 number in this object. If the item number is positive, the
 <code>XQSequence</code> moves to the given item number with
 respect to the beginning of the <code>XQSequence</code>.  <p>
 The first item is item 1, the second is item 2, and so on. <p>
 If the given item number is negative, the <code>XQSequence</code>
 positions itself on an absolute item position with respect to the
 end of the sequence. 
 <p>
 For example, calling the method <code>absolute(-1)</code>
 positions the <code>XQSequence</code> on the last item; 
 calling the method <code>absolute(-2)</code> moves the
 <code>XQSequence</code> to the next-to-last item, and so on. 
 <code>absolute(0)</code> will position the sequence before the first item.
 <p>
 An attempt to position the sequence beyond the first/last item 
 set leaves the current position to be before the first item or 
 after the last item. <p>

 Calling this method on an empty sequence 
 will return <code>false</code>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#absolute(int)">absolute</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>itempos</CODE> - the item position to jump to
<DT><B>Returns:</B><DD><code>true</code> if the current position is
                            within the sequence, <code>false</code> otherwise
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the sequence is forward only, or
                            (2) the sequence is in a closed state</DL>
</DD>
</DL>
<HR>

<A NAME="afterLast()"><!-- --></A><H3>
afterLast</H3>
<PRE>
public void <B>afterLast</B>()
               throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#afterLast()">XQSequence</A></CODE></B></DD>
<DD>Move to the position after the last item.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#afterLast()">afterLast</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the sequence is forward only,
                            or (2) the sequence is in a closed state</DL>
</DD>
</DL>
<HR>

<A NAME="beforeFirst()"><!-- --></A><H3>
beforeFirst</H3>
<PRE>
public void <B>beforeFirst</B>()
                 throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#beforeFirst()">XQSequence</A></CODE></B></DD>
<DD>Moves to the position before the first item.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#beforeFirst()">beforeFirst</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the sequence is forward only,
                            or (2) the sequence is in a closed state</DL>
</DD>
</DL>
<HR>

<A NAME="count()"><!-- --></A><H3>
count</H3>
<PRE>
public int <B>count</B>()
          throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#count()">XQSequence</A></CODE></B></DD>
<DD>Returns a number indicating the number of items in the sequence.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#count()">count</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the number of items in this sequence
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the sequence is forward-only, or (2)
                            the sequence is closed</DL>
</DD>
</DL>
<HR>

<A NAME="first()"><!-- --></A><H3>
first</H3>
<PRE>
public boolean <B>first</B>()
              throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#first()">XQSequence</A></CODE></B></DD>
<DD>Moves to the first item in the sequence. The method returns 
 <code>true</code>, if it was able to move to the first item in the sequence
 <code>false</code>, otherwise. Calling this method on an empty sequence 
 will return <code>false</code>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#first()">first</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD><code>true</code> if the sequence was positioned 
                            on the first item, <code>false</code> otherwise
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the sequence is forward only,
                            or (2) the sequence is in a closed state</DL>
</DD>
</DL>
<HR>

<A NAME="getItem()"><!-- --></A><H3>
getItem</H3>
<PRE>
public <A HREF="../../../../javax/xml/xquery/XQItem.html" title="interface in javax.xml.xquery">XQItem</A> <B>getItem</B>()
               throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#getItem()">XQSequence</A></CODE></B></DD>
<DD>Get the current item as an immutable <code>XQItem</code> object. 
 In case of an <code>XQResultSequence</code>, the item is an
 <code>XQResultItem</code>.
 In the case of forward only sequences, this method or any other 
 get or write method may only be called once on the curent item. <p>

 The <code>XQItem</code> object is dependent on the sequence from which
 it was created and is only valid for the duration of <code>XQSequence</code>
 lifetime. Thus, the <code>XQSequence</code> is closed, this <code>XQItem</code>
 object will be implicitly closed and it can no longer be used.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#getItem()">getItem</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>an <code>XQItem</code> object
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors retrieving the item,
                            or (2) in the case of a forward only sequence,
                            a get or write method has already been invoked
                            on the current item.</DL>
</DD>
</DL>
<HR>

<A NAME="getPosition()"><!-- --></A><H3>
getPosition</H3>
<PRE>
public int <B>getPosition</B>()
                throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#getPosition()">XQSequence</A></CODE></B></DD>
<DD>Gets the current cursor position. <p>
 0 indicates that the position is before the first item 
 and <code>count() + 1</code> indicates position after the last item.
 A specific position indicates that the cursor is positioned on
 the item at that position. Use the <code>isOnItem</code>
 method to verify if the cursor is positioned on the item.<p>

 Calling this method on an empty sequence 
 will return <code>0</code>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#getPosition()">getPosition</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the sequence is forward-only, or (2)
                            the sequence is closed</DL>
</DD>
</DL>
<HR>

<A NAME="getSequenceAsStream()"><!-- --></A><H3>
getSequenceAsStream</H3>
<PRE>
public <A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/stream/XMLStreamReader.html?is-external=true" title="class or interface in javax.xml.stream">XMLStreamReader</A> <B>getSequenceAsStream</B>()
                                    throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#getSequenceAsStream()">XQSequence</A></CODE></B></DD>
<DD>Read the entire sequence starting from the current position as an
 <code>XMLStreamReader</code> object, as described in 
 <i>Section 12.1 Serializing an XDM instance into a StAX event stream
 (XMLStreamReader), XQuery API for Java (XQJ) 1.0</i>.

 Note that the serialization process might fail, in which case a 
 <code>XQException</code> is thrown.
 
 While the stream is being read, the application MUST NOT do any other
 concurrent operations on the sequence. The operation on the stream is
 undefined if the underlying sequence position or state is changed by
 concurrent operations.
 
 After all items are written to the stream, the current position of the
 cursor is set to point after the last item.
 
 Also, in the case of forward only sequences, this method may only be
 called if the current item has not yet been read through any of the get
 or write methods.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#getSequenceAsStream()">getSequenceAsStream</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>an XML reader object as <code>XMLStreamReader</code>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors accessing any of the items
                            in the sequence, (2) the sequence is in a closed state,
                            (3) in the case of a forward only sequence, a get or write
                            method has already been invoked on the current item, or 
                            (4) in case of an error during serialization of the sequence
                            into a StAX event stream as defined in <i>Section 12.1 
                            Serializing an XDM instance into a StAX event stream
                            (XMLStreamReader), XQuery API for Java (XQJ) 1.0</i></DL>
</DD>
</DL>
<HR>

<A NAME="getSequenceAsString(java.util.Properties)"><!-- --></A><H3>
getSequenceAsString</H3>
<PRE>
public <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getSequenceAsString</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;props)
                           throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#getSequenceAsString(java.util.Properties)">XQSequence</A></CODE></B></DD>
<DD>Serializes the sequence starting from the current position to a String
 according to the <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>.

 Serialization parameters, which influence how serialization is
 performed, can be specified. Refer to the 
 <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>
 and <i>Section 12 Serialization, XQuery
  API for Java (XQJ) 1.0</i> for more information.
 
 Reading the sequence during the serialization process performs implicit
 next operations to read the items. 

 After all items are written to the stream, the current position of the
 cursor is set to point after the last item.

 Also, in the case of forward only sequences, this method may only be
 called if the current item has not yet been read through any of the get
 or write methods.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#getSequenceAsString(java.util.Properties)">getSequenceAsString</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>props</CODE> - specifies the serialization parameters,
                            <code>null</code> is considered equivalent to an
                            empty <code>Properties</code> object
<DT><B>Returns:</B><DD>the serialized representation of the sequence
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors accessing the items in 
                            the sequence, (2) there are errors
                            during serialization, (3) the sequence is in a closed state,
                            or (4) in the case of a forward only sequence, a get or
                            write method has already been invoked on the current item</DL>
</DD>
</DL>
<HR>

<A NAME="isAfterLast()"><!-- --></A><H3>
isAfterLast</H3>
<PRE>
public boolean <B>isAfterLast</B>()
                    throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#isAfterLast()">XQSequence</A></CODE></B></DD>
<DD>Checks if the current position is after the last item in the sequence.
 Calling this method on an empty sequence 
 will return <code>false</code>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#isAfterLast()">isAfterLast</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD><code>true</code> if the current position is
                            after the last item, <code>false</code> otherwise
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the sequence is forward only, 
                            or (2) the sequence is in a closed state</DL>
</DD>
</DL>
<HR>

<A NAME="isBeforeFirst()"><!-- --></A><H3>
isBeforeFirst</H3>
<PRE>
public boolean <B>isBeforeFirst</B>()
                      throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#isBeforeFirst()">XQSequence</A></CODE></B></DD>
<DD>Checks if the current position before the first item in the sequence.
 Calling this method on an empty sequence 
 will return <code>false</code>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#isBeforeFirst()">isBeforeFirst</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD><code>true</code> if the current position is
                            before the first item, <code>false</code> otherwise
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the sequence is forward only, 
                            or (2) the sequence is in a closed state</DL>
</DD>
</DL>
<HR>

<A NAME="isFirst()"><!-- --></A><H3>
isFirst</H3>
<PRE>
public boolean <B>isFirst</B>()
                throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#isFirst()">XQSequence</A></CODE></B></DD>
<DD>Checks if the current position at the first item in the sequence.
 Calling this method on an empty sequence 
 will return <code>false</code>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#isFirst()">isFirst</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD><code>true</code> if the current position is at
                            the first item, <code>false</code> otherwise
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the sequence is forward only, 
                            or (2) the sequence is in a closed state</DL>
</DD>
</DL>
<HR>

<A NAME="isLast()"><!-- --></A><H3>
isLast</H3>
<PRE>
public boolean <B>isLast</B>()
               throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#isLast()">XQSequence</A></CODE></B></DD>
<DD>Checks if the current position at the last item in the sequence.
 Calling this method on an empty sequence 
 will return <code>false</code>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#isLast()">isLast</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD><code>true</code> if the current position is at
                            the last item, <code>false</code> otherwise
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the sequence is forward only,
                            or (2) the sequence is in a closed state</DL>
</DD>
</DL>
<HR>

<A NAME="isOnItem()"><!-- --></A><H3>
isOnItem</H3>
<PRE>
public boolean <B>isOnItem</B>()
                 throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#isOnItem()">XQSequence</A></CODE></B></DD>
<DD>Check if the sequence is positioned on an item or not. 
 Calling this method on an empty sequence 
 will return <code>false</code>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#isOnItem()">isOnItem</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD><code>true</code> if the sequence is currently
                            positioned on an item, <code>false</code> if sequence 
                            is positioned before the first item, or after the last
                            item
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if the sequence is in a closed state</DL>
</DD>
</DL>
<HR>

<A NAME="isScrollable()"><!-- --></A><H3>
isScrollable</H3>
<PRE>
public boolean <B>isScrollable</B>()
                     throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#isScrollable()">XQSequence</A></CODE></B></DD>
<DD>Checks if the sequence is scrollable.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#isScrollable()">isScrollable</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD><code>true</code> if the sequence can be scrolled
                            backward or forward, <code>false</code> otherwise
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if the sequence is in a closed state</DL>
</DD>
</DL>
<HR>

<A NAME="last()"><!-- --></A><H3>
last</H3>
<PRE>
public boolean <B>last</B>()
             throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#last()">XQSequence</A></CODE></B></DD>
<DD>Moves to the last item in the sequence. This method returns
 <code>true</code>, if it was able to move to the last item in the sequence
 <code>false</code>, otherwise. Calling this method on an empty sequence 
 will return <code>false</code>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#last()">last</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD><code>true</code> if the sequence was positioned
                            on the last item, <code>false</code> otherwise
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the sequence is forward only,
                            or (2) the sequence is in a closed state</DL>
</DD>
</DL>
<HR>

<A NAME="next()"><!-- --></A><H3>
next</H3>
<PRE>
public boolean <B>next</B>()
             throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#next()">XQSequence</A></CODE></B></DD>
<DD>Moves to the next item in the sequence.  Calling this method on an empty sequence 
 will return <code>false</code>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#next()">next</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD><code>true</code> if the new item is valid,
                            <code>false</code> if there are no more items
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if the sequence is in a closed state</DL>
</DD>
</DL>
<HR>

<A NAME="previous()"><!-- --></A><H3>
previous</H3>
<PRE>
public boolean <B>previous</B>()
                 throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#previous()">XQSequence</A></CODE></B></DD>
<DD>Moves to the previous item in the sequence.  Calling this method on an empty sequence 
 will return <code>false</code>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#previous()">previous</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD><code>true</code> if the new current position is
                            within the sequence, (i.e., not before first);
                            <code>false</code> otherwise.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the sequence is forward only, or
                            (2) the sequence is in a closed state.</DL>
</DD>
</DL>
<HR>

<A NAME="relative(int)"><!-- --></A><H3>
relative</H3>
<PRE>
public boolean <B>relative</B>(int&nbsp;itempos)
                 throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#relative(int)">XQSequence</A></CODE></B></DD>
<DD>Moves the cursor a relative number of items, either positive or negative. 
 Attempting to move beyond the first/last item in the sequence positions 
 the sequence before/after the the first/last item.  
 Calling <code>relative(0)</code> is valid, but does not change the cursor position.  
 <p>
 Note: Calling the method <code>relative(1)</code> is identical to calling the method 
 <code>next</code> and calling the method <code>relative(-1)</code> is identical
 to calling the method <code>previous()</code>. 
 Calling this method on an empty sequence will return <code>false</code>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#relative(int)">relative</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>itempos</CODE> - the item position to jump to
<DT><B>Returns:</B><DD><code>true</code> if the new current position is within
                            the sequence (i.e., not before first or after last);
                            <code>false</code> otherwise.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the sequence is forward only, or
                            (2) the sequence is in a closed state.</DL>
</DD>
</DL>
<HR>

<A NAME="writeSequence(java.io.OutputStream, java.util.Properties)"><!-- --></A><H3>
writeSequence</H3>
<PRE>
public void <B>writeSequence</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A>&nbsp;os,
                          <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;props)
                   throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#writeSequence(java.io.OutputStream, java.util.Properties)">XQSequence</A></CODE></B></DD>
<DD>Serializes the sequence starting from the current position to an
 <code>OutputStream</code> according to the 
 <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>.

 Serialization parameters, which influence how serialization is
 performed, can be specified. Refer to the
 <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>
 and <i>Section 12 Serialization, XQuery
 API for Java (XQJ) 1.0</i> for more information.
 
 Reading the sequence during the serialization process performs implicit
 next operations to read the items. 

 After all items are written to the stream, the current position of the
 cursor is set to point after the last item.

 Also, in the case of forward only sequences, this method may only be
 called if the current item has not yet been read through any of the
 get or write methods.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#writeSequence(java.io.OutputStream, java.util.Properties)">writeSequence</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>os</CODE> - the output stream into which the sequence is to be serialized<DD><CODE>props</CODE> - specifies the serialization parameters,
                            <code>null</code> is considered equivalent to an empty
                            <code>Properties</code> object
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors accessing the items in 
                            the sequence, (2) there are errors
                            during serialization, (3) the sequence is in a closed state,
                            (4) in the case of a forward only sequence, a get or
                            write method has already been invoked on the current item,
                            or (5) the <code>os</code> parameter is <code>null</code></DL>
</DD>
</DL>
<HR>

<A NAME="writeSequence(java.io.Writer, java.util.Properties)"><!-- --></A><H3>
writeSequence</H3>
<PRE>
public void <B>writeSequence</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</A>&nbsp;ow,
                          <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;props)
                   throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#writeSequence(java.io.Writer, java.util.Properties)">XQSequence</A></CODE></B></DD>
<DD>Serializes the sequence starting from the current position to a Writer
 according to the  <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>.

 Serialization parameters, which influence how serialization is
 performed, can be specified. Refer to the
 <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>
 and <i>Section 12 Serialization, XQuery
 API for Java (XQJ) 1.0</i> for more information.
 <br> 
 <br>
 Warning: When outputting to a <code>Writer</code>, make sure the writer's encoding
 matches the encoding parameter if specified as a property or the default
 encoding.
 <br>
 <br> 

 Reading the sequence during the serialization process performs implicit
 next operations to read the items. 

 After all items are written to the stream, the current position of the
 cursor is set to point after the last item.

 Also, in the case of forward only sequences, this method may only be
 called if the current item has not yet been read through any of the get
 or write methods.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#writeSequence(java.io.Writer, java.util.Properties)">writeSequence</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ow</CODE> - the writer object into which the sequence is to be serialized<DD><CODE>props</CODE> - specifies the serialization parameters,
                            <code>null</code> is considered equivalent to an empty
                            <code>Properties</code> object
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors accessing the items in 
                            the sequence, (2) there are errors during serialization,
                            (3) the sequence is in a closed state,
                            (4) in the case of a forward only sequence, a get or
                            write method has already been invoked on the current item,
                            or (5) the <code>ow</code> parameter is <code>null</code></DL>
</DD>
</DL>
<HR>

<A NAME="writeSequenceToResult(javax.xml.transform.Result)"><!-- --></A><H3>
writeSequenceToResult</H3>
<PRE>
public void <B>writeSequenceToResult</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/transform/Result.html?is-external=true" title="class or interface in javax.xml.transform">Result</A>&nbsp;result)
                           throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#writeSequenceToResult(javax.xml.transform.Result)">XQSequence</A></CODE></B></DD>
<DD>Writes the entire sequence starting from the current position to a
 <code>Result</code>. First the sequence is normalized as described in
 <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>.  Subsequently it is serialized
 to the <code>Result</code> object.<br>

 Note that the normalization process can fail, in which case an
 <code>XQException</code> is thrown. 

 An XQJ implementation must at least support the following
 implementations:
 <br>
 <ul>
   <li><code>javax.xml.transform.dom.DOMResult</code></li>
   <li><code>javax.xml.transform.sax.SAXResult</code></li>
   <li><code>javax.xml.transform.stream.StreamResult</code></li>
 </ul>
 <br>
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#writeSequenceToResult(javax.xml.transform.Result)">writeSequenceToResult</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>result</CODE> - the result object into which the sequence
                             is to be serialized
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors accessing any of the items
                             in the sequence, (2) the sequence is in a closed 
                             state, (3) in the case of a forward only sequence, a get or
                             write method has already been invoked on the current item, 
                             (4) in case of an error while serializing the sequence
                             into the <code>Result</code> object, or (5) the
                             <code>result</code> parameter is <code>null</code></DL>
</DD>
</DL>
<HR>

<A NAME="writeSequenceToSAX(org.xml.sax.ContentHandler)"><!-- --></A><H3>
writeSequenceToSAX</H3>
<PRE>
public void <B>writeSequenceToSAX</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/org/xml/sax/ContentHandler.html?is-external=true" title="class or interface in org.xml.sax">ContentHandler</A>&nbsp;saxHandler)
                        throws <A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#writeSequenceToSAX(org.xml.sax.ContentHandler)">XQSequence</A></CODE></B></DD>
<DD>Writes the entire sequence starting from the current position to a SAX
 handler, as described in <i>Section 12.2 Serializing an XDM instance
 into a SAX event stream, XQuery API for Java (XQJ) 1.0</i>.

 Note that the serialization process might fail, in which case a 
 <code>XQException</code> is thrown.  

 After all items are written to the stream, the current position of the
 cursor is set to point after the last item.

 Also, in the case of forward only sequences, this method may only be called
 if the current item has not yet been read through any of the get or write
 methods.

 The specified <code>org.xml.sax.ContentHandler</code> can optionally implement the
 <code>org.xml.sax.LexicalHandler</code> interface. An implementation must check if the
 specified <code>ContentHandler</code> implements <code>LexicalHandler</code>.
 If the handler is a <code>LexicalHandler</code> comment nodes are reported, otherwise
 they will be silently ignored.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html#writeSequenceToSAX(org.xml.sax.ContentHandler)">writeSequenceToSAX</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>saxHandler</CODE> - the SAX content handler, optionally a lexical handler
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors accessing any of the items
                            in the sequence, (2) the sequence is in a closed 
                            state, (3) in the case of a forward only sequence, a get or
                            write method has already been invoked on the current item, 
                            (4) in case of an error during serializing the XDM instance
                            into a SAX event stream, or (5) the <code>saxhdlr</code>
                            parameter is <code>null</code></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <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="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="../../../../net/sf/saxon/xqj/SaxonXQExpression.html" title="class in net.sf.saxon.xqj"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../net/sf/saxon/xqj/SaxonXQItem.html" title="class in net.sf.saxon.xqj"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?net/sf/saxon/xqj/SaxonXQForwardSequence.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="SaxonXQForwardSequence.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&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>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
Copyright (c) 2004-2011 Saxonica Limited. All rights reserved.
</BODY>
</HTML>