<!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:47:46 GMT 2011 --> <TITLE> PullNamespaceReducer </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="PullNamespaceReducer"; } } </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> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../com/saxonica/pull/PullFromIterator.html" title="class in com.saxonica.pull"><B>PREV CLASS</B></A> <A HREF="../../../com/saxonica/pull/PullToStax.html" title="class in com.saxonica.pull"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?com/saxonica/pull/PullNamespaceReducer.html" target="_top"><B>FRAMES</B></A> <A HREF="PullNamespaceReducer.html" target="_top"><B>NO FRAMES</B></A> <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: NESTED | <A HREF="#fields_inherited_from_class_net.sf.saxon.pull.PullFilter">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <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"> com.saxonica.pull</FONT> <BR> Class PullNamespaceReducer</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/pull/PullFilter.html" title="class in net.sf.saxon.pull">net.sf.saxon.pull.PullFilter</A> <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.saxonica.pull.PullNamespaceReducer</B> </PRE> <DL> <DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../net/sf/saxon/om/NamespaceResolver.html" title="interface in net.sf.saxon.om">NamespaceResolver</A>, <A HREF="../../../net/sf/saxon/pull/PullProvider.html" title="interface in net.sf.saxon.pull">PullProvider</A></DD> </DL> <HR> <DL> <DT><PRE>public class <B>PullNamespaceReducer</B><DT>extends <A HREF="../../../net/sf/saxon/pull/PullFilter.html" title="class in net.sf.saxon.pull">PullFilter</A><DT>implements <A HREF="../../../net/sf/saxon/om/NamespaceResolver.html" title="interface in net.sf.saxon.om">NamespaceResolver</A></DL> </PRE> <P> PullNamespaceReducer is a PullFilter responsible for removing duplicate namespace declarations. It also performs namespace fixup: that is, it ensures that the namespaces used in element and attribute names are all declared. <p/> <p>This class is derived from, and contains much common code with, the NamespaceReducer in the push pipeline. (In the push version, however, namespace fixup is not performed by the NamespaceReducer, but by the ComplexContentOutputter).</p> <P> <P> <DL> <DT><B>See Also:</B><DD><A HREF="../../../net/sf/saxon/event/NamespaceReducer.html" title="class in net.sf.saxon.event"><CODE>NamespaceReducer</CODE></A></DL> <HR> <P> <!-- =========== FIELD SUMMARY =========== --> <A NAME="field_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>Field Summary</B></FONT></TH> </TR> </TABLE> <A NAME="fields_inherited_from_class_net.sf.saxon.pull.PullFilter"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Fields inherited from class net.sf.saxon.pull.<A HREF="../../../net/sf/saxon/pull/PullFilter.html" title="class in net.sf.saxon.pull">PullFilter</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../net/sf/saxon/pull/PullFilter.html#currentEvent">currentEvent</A></CODE></TD> </TR> </TABLE> <A NAME="fields_inherited_from_class_net.sf.saxon.pull.PullProvider"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Fields inherited from interface net.sf.saxon.pull.<A HREF="../../../net/sf/saxon/pull/PullProvider.html" title="interface in net.sf.saxon.pull">PullProvider</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../net/sf/saxon/pull/PullProvider.html#ATOMIC_VALUE">ATOMIC_VALUE</A>, <A HREF="../../../net/sf/saxon/pull/PullProvider.html#ATTRIBUTE">ATTRIBUTE</A>, <A HREF="../../../net/sf/saxon/pull/PullProvider.html#COMMENT">COMMENT</A>, <A HREF="../../../net/sf/saxon/pull/PullProvider.html#END_DOCUMENT">END_DOCUMENT</A>, <A HREF="../../../net/sf/saxon/pull/PullProvider.html#END_ELEMENT">END_ELEMENT</A>, <A HREF="../../../net/sf/saxon/pull/PullProvider.html#END_OF_INPUT">END_OF_INPUT</A>, <A HREF="../../../net/sf/saxon/pull/PullProvider.html#NAMESPACE">NAMESPACE</A>, <A HREF="../../../net/sf/saxon/pull/PullProvider.html#PROCESSING_INSTRUCTION">PROCESSING_INSTRUCTION</A>, <A HREF="../../../net/sf/saxon/pull/PullProvider.html#START_DOCUMENT">START_DOCUMENT</A>, <A HREF="../../../net/sf/saxon/pull/PullProvider.html#START_ELEMENT">START_ELEMENT</A>, <A HREF="../../../net/sf/saxon/pull/PullProvider.html#START_OF_INPUT">START_OF_INPUT</A>, <A HREF="../../../net/sf/saxon/pull/PullProvider.html#TEXT">TEXT</A></CODE></TD> </TR> </TABLE> <!-- ======== 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><CODE><B><A HREF="../../../com/saxonica/pull/PullNamespaceReducer.html#PullNamespaceReducer(net.sf.saxon.pull.PullProvider)">PullNamespaceReducer</A></B>(<A HREF="../../../net/sf/saxon/pull/PullProvider.html" title="interface in net.sf.saxon.pull">PullProvider</A> base)</CODE> <BR> Create a namespace reducer for a pull pipeline</TD> </TR> </TABLE> <!-- ========== 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> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/saxonica/pull/PullNamespaceReducer.html#endElement()">endElement</A></B>()</CODE> <BR> endElement: Discard the namespaces declared on this element.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../net/sf/saxon/om/AttributeCollection.html" title="interface in net.sf.saxon.om">AttributeCollection</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/saxonica/pull/PullNamespaceReducer.html#getAttributes()">getAttributes</A></B>()</CODE> <BR> Get the attributes associated with the current element.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/saxonica/pull/PullNamespaceReducer.html#getNameCode()">getNameCode</A></B>()</CODE> <BR> Get the nameCode identifying the name of the current node.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../net/sf/saxon/om/NamespaceBinding.html" title="class in net.sf.saxon.om">NamespaceBinding</A>[]</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/saxonica/pull/PullNamespaceReducer.html#getNamespaceDeclarations()">getNamespaceDeclarations</A></B>()</CODE> <BR> Get the namespace declarations associated with the current element.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <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="../../../com/saxonica/pull/PullNamespaceReducer.html#getURIForPrefix(java.lang.String, boolean)">getURIForPrefix</A></B>(<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> prefix, boolean useDefault)</CODE> <BR> Get the namespace URI corresponding to a given prefix.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</A><<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="../../../com/saxonica/pull/PullNamespaceReducer.html#iteratePrefixes()">iteratePrefixes</A></B>()</CODE> <BR> Get an iterator over all the prefixes declared in this namespace context.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/saxonica/pull/PullNamespaceReducer.html#next()">next</A></B>()</CODE> <BR> next(): handle next event.</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_net.sf.saxon.pull.PullFilter"><!-- --></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.pull.<A HREF="../../../net/sf/saxon/pull/PullFilter.html" title="class in net.sf.saxon.pull">PullFilter</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../net/sf/saxon/pull/PullFilter.html#close()">close</A>, <A HREF="../../../net/sf/saxon/pull/PullFilter.html#current()">current</A>, <A HREF="../../../net/sf/saxon/pull/PullFilter.html#getAtomicValue()">getAtomicValue</A>, <A HREF="../../../net/sf/saxon/pull/PullFilter.html#getFingerprint()">getFingerprint</A>, <A HREF="../../../net/sf/saxon/pull/PullFilter.html#getNamePool()">getNamePool</A>, <A HREF="../../../net/sf/saxon/pull/PullFilter.html#getPipelineConfiguration()">getPipelineConfiguration</A>, <A HREF="../../../net/sf/saxon/pull/PullFilter.html#getSchemaType()">getSchemaType</A>, <A HREF="../../../net/sf/saxon/pull/PullFilter.html#getSourceLocator()">getSourceLocator</A>, <A HREF="../../../net/sf/saxon/pull/PullFilter.html#getStringValue()">getStringValue</A>, <A HREF="../../../net/sf/saxon/pull/PullFilter.html#getUnderlyingProvider()">getUnderlyingProvider</A>, <A HREF="../../../net/sf/saxon/pull/PullFilter.html#getUnparsedEntities()">getUnparsedEntities</A>, <A HREF="../../../net/sf/saxon/pull/PullFilter.html#setPipelineConfiguration(net.sf.saxon.event.PipelineConfiguration)">setPipelineConfiguration</A>, <A HREF="../../../net/sf/saxon/pull/PullFilter.html#skipToMatchingEnd()">skipToMatchingEnd</A></CODE></TD> </TR> </TABLE> <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> <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="PullNamespaceReducer(net.sf.saxon.pull.PullProvider)"><!-- --></A><H3> PullNamespaceReducer</H3> <PRE> public <B>PullNamespaceReducer</B>(<A HREF="../../../net/sf/saxon/pull/PullProvider.html" title="interface in net.sf.saxon.pull">PullProvider</A> base)</PRE> <DL> <DD>Create a namespace reducer for a pull pipeline <P> <DL> <DT><B>Parameters:</B><DD><CODE>base</CODE> - the next stage in the pipeline, from which events are read</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="next()"><!-- --></A><H3> next</H3> <PRE> public int <B>next</B>() throws <A HREF="../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE> <DL> <DD>next(): handle next event. The START_ELEMENT event removes redundant namespace declarations, and possibly adds an xmlns="" undeclaration. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../net/sf/saxon/pull/PullProvider.html#next()">next</A></CODE> in interface <CODE><A HREF="../../../net/sf/saxon/pull/PullProvider.html" title="interface in net.sf.saxon.pull">PullProvider</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../net/sf/saxon/pull/PullFilter.html#next()">next</A></CODE> in class <CODE><A HREF="../../../net/sf/saxon/pull/PullFilter.html" title="class in net.sf.saxon.pull">PullFilter</A></CODE></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>an integer code indicating the type of event. The code <A HREF="../../../net/sf/saxon/pull/PullProvider.html#END_OF_INPUT"><CODE>PullProvider.END_OF_INPUT</CODE></A> is returned at the end of the sequence. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE> - if a dynamic error occurs</DL> </DD> </DL> <HR> <A NAME="getNameCode()"><!-- --></A><H3> getNameCode</H3> <PRE> public int <B>getNameCode</B>()</PRE> <DL> <DD>Get the nameCode identifying the name of the current node. This method can be used after the <A HREF="../../../net/sf/saxon/pull/PullProvider.html#START_ELEMENT"><CODE>PullProvider.START_ELEMENT</CODE></A>, <A HREF="../../../net/sf/saxon/pull/PullProvider.html#PROCESSING_INSTRUCTION"><CODE>PullProvider.PROCESSING_INSTRUCTION</CODE></A>, <A HREF="../../../net/sf/saxon/pull/PullProvider.html#ATTRIBUTE"><CODE>PullProvider.ATTRIBUTE</CODE></A>, or <A HREF="../../../net/sf/saxon/pull/PullProvider.html#NAMESPACE"><CODE>PullProvider.NAMESPACE</CODE></A> events. With some PullProvider implementations, <b>including this one</b>, it can also be used after <A HREF="../../../net/sf/saxon/pull/PullProvider.html#END_ELEMENT"><CODE>PullProvider.END_ELEMENT</CODE></A> If called at other times, the result is undefined and may result in an IllegalStateException. If called when the current node is an unnamed namespace node (a node representing the default namespace) the returned value is -1. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../net/sf/saxon/pull/PullProvider.html#getNameCode()">getNameCode</A></CODE> in interface <CODE><A HREF="../../../net/sf/saxon/pull/PullProvider.html" title="interface in net.sf.saxon.pull">PullProvider</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../net/sf/saxon/pull/PullFilter.html#getNameCode()">getNameCode</A></CODE> in class <CODE><A HREF="../../../net/sf/saxon/pull/PullFilter.html" title="class in net.sf.saxon.pull">PullFilter</A></CODE></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the nameCode. The nameCode can be used to obtain the prefix, local name, and namespace URI from the name pool.</DL> </DD> </DL> <HR> <A NAME="getAttributes()"><!-- --></A><H3> getAttributes</H3> <PRE> public <A HREF="../../../net/sf/saxon/om/AttributeCollection.html" title="interface in net.sf.saxon.om">AttributeCollection</A> <B>getAttributes</B>() throws <A HREF="../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE> <DL> <DD>Get the attributes associated with the current element. This method must be called only after a START_ELEMENT event has been notified. The contents of the returned AttributeCollection are guaranteed to remain unchanged until the next START_ELEMENT event, but may be modified thereafter. The object should not be modified by the client. <p/> <p>Attributes may be read before or after reading the namespaces of an element, but must not be read after the first child node has been read, or after calling one of the methods skipToEnd(), getStringValue(), or getTypedValue().</p> <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../net/sf/saxon/pull/PullProvider.html#getAttributes()">getAttributes</A></CODE> in interface <CODE><A HREF="../../../net/sf/saxon/pull/PullProvider.html" title="interface in net.sf.saxon.pull">PullProvider</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../net/sf/saxon/pull/PullFilter.html#getAttributes()">getAttributes</A></CODE> in class <CODE><A HREF="../../../net/sf/saxon/pull/PullFilter.html" title="class in net.sf.saxon.pull">PullFilter</A></CODE></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>an AttributeCollection representing the attributes of the element that has just been notified. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE> - if a dynamic error occurs</DL> </DD> </DL> <HR> <A NAME="getNamespaceDeclarations()"><!-- --></A><H3> getNamespaceDeclarations</H3> <PRE> public <A HREF="../../../net/sf/saxon/om/NamespaceBinding.html" title="class in net.sf.saxon.om">NamespaceBinding</A>[] <B>getNamespaceDeclarations</B>() throws <A HREF="../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE> <DL> <DD>Get the namespace declarations associated with the current element. This method must be called only after a START_ELEMENT event has been notified. In the case of a top-level START_ELEMENT event (that is, an element that either has no parent node, or whose parent is not included in the sequence being read), the NamespaceDeclarations object returned will contain a namespace declaration for each namespace that is in-scope for this element node. In the case of a non-top-level element, the NamespaceDeclarations will contain a set of namespace declarations and undeclarations, representing the differences between this element and its parent. <p/> <p>This class extends the semantics of the PullProvider interface by allowing this method to be called also after an END_ELEMENT event. This is to support PullToStax, which requires this functionality. In this situation it returns the namespaces declared on the startElement associated with the element that has just ended.</p> <p>It is permissible for this method to return namespace declarations that are redundant.</p> <p/> <p>The NamespaceDeclarations object is guaranteed to remain unchanged until the next START_ELEMENT event, but may then be overwritten. The object should not be modified by the client.</p> <p/> <p>Namespaces may be read before or after reading the attributes of an element, but must not be read after the first child node has been read, or after calling one of the methods skipToEnd(), getStringValue(), or getTypedValue().</p>* <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../net/sf/saxon/pull/PullProvider.html#getNamespaceDeclarations()">getNamespaceDeclarations</A></CODE> in interface <CODE><A HREF="../../../net/sf/saxon/pull/PullProvider.html" title="interface in net.sf.saxon.pull">PullProvider</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../net/sf/saxon/pull/PullFilter.html#getNamespaceDeclarations()">getNamespaceDeclarations</A></CODE> in class <CODE><A HREF="../../../net/sf/saxon/pull/PullFilter.html" title="class in net.sf.saxon.pull">PullFilter</A></CODE></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the namespace declarations associated with the current START_ELEMENT event. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE> - if a dynamic error occurs</DL> </DD> </DL> <HR> <A NAME="endElement()"><!-- --></A><H3> endElement</H3> <PRE> public void <B>endElement</B>() throws <A HREF="../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE> <DL> <DD>endElement: Discard the namespaces declared on this element. Note, however, that for the benefit of PullToStax, the namespaces that go out of scope on this endElement are available so long as the endElement is the current event <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Throws:</B> <DD><CODE><A HREF="../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE></DL> </DD> </DL> <HR> <A NAME="getURIForPrefix(java.lang.String, boolean)"><!-- --></A><H3> getURIForPrefix</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>getURIForPrefix</B>(<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> prefix, boolean useDefault)</PRE> <DL> <DD>Get the namespace URI corresponding to a given prefix. Return null if the prefix is not in scope. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../net/sf/saxon/om/NamespaceResolver.html#getURIForPrefix(java.lang.String, boolean)">getURIForPrefix</A></CODE> in interface <CODE><A HREF="../../../net/sf/saxon/om/NamespaceResolver.html" title="interface in net.sf.saxon.om">NamespaceResolver</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>prefix</CODE> - the namespace prefix<DD><CODE>useDefault</CODE> - true if the default namespace is to be used when the prefix is "" <DT><B>Returns:</B><DD>the uri for the namespace, or null if the prefix is not in scope</DL> </DD> </DL> <HR> <A NAME="iteratePrefixes()"><!-- --></A><H3> iteratePrefixes</H3> <PRE> public <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</A><<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>iteratePrefixes</B>()</PRE> <DL> <DD>Get an iterator over all the prefixes declared in this namespace context. This will include the default namespace (prefix="") and the XML namespace where appropriate <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../net/sf/saxon/om/NamespaceResolver.html#iteratePrefixes()">iteratePrefixes</A></CODE> in interface <CODE><A HREF="../../../net/sf/saxon/om/NamespaceResolver.html" title="interface in net.sf.saxon.om">NamespaceResolver</A></CODE></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>an iterator over all the prefixes for which a namespace binding exists, including the zero-length string to represent the null/absent prefix if it is bound</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> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../com/saxonica/pull/PullFromIterator.html" title="class in com.saxonica.pull"><B>PREV CLASS</B></A> <A HREF="../../../com/saxonica/pull/PullToStax.html" title="class in com.saxonica.pull"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?com/saxonica/pull/PullNamespaceReducer.html" target="_top"><B>FRAMES</B></A> <A HREF="PullNamespaceReducer.html" target="_top"><B>NO FRAMES</B></A> <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: NESTED | <A HREF="#fields_inherited_from_class_net.sf.saxon.pull.PullFilter">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <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>