<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc on Tue Sep 18 10:25:43 GMT+01:00 2001 --> <TITLE> : Class NamePool </TITLE> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> </HEAD> <BODY BGCOLOR="white"> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_top"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </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/icl/saxon/om/Name.html"><B>PREV CLASS</B></A> <A HREF="../../../../com/icl/saxon/om/Namespace.html"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="NamePool.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | <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> <!-- =========== END OF NAVBAR =========== --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> com.icl.saxon.om</FONT> <BR> Class NamePool</H2> <PRE> java.lang.Object | +--<B>com.icl.saxon.om.NamePool</B> </PRE> <HR> <DL> <DT>public class <B>NamePool</B><DT>extends java.lang.Object</DL> <P> An object representing a collection of XML names, each containing a Namespace URI, a Namespace prefix, and a local name; plus a collection of namespaces, each consisting of a prefix/URI pair. <br> <p>The equivalence betweem names depends only on the URI and the local name. The prefix is retained for documentary purposes only: it is useful when reconstructing a document to use prefixes that the user is familiar with.</p> <p>The NamePool eliminates duplicate names if they have the same prefix, uri, and local part. It retains duplicates if they have different prefixes</p> <P> <HR> <P> <!-- ======== INNER CLASS SUMMARY ======== --> <!-- =========== FIELD SUMMARY =========== --> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/icl/saxon/om/NamePool.html#NamePool()">NamePool</A></B>()</CODE> <BR> </TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Method Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/icl/saxon/om/NamePool.html#allocate(java.lang.String, short, java.lang.String)">allocate</A></B>(java.lang.String prefix, short uriCode, java.lang.String localName)</CODE> <BR> Allocate a name from the pool, or a new Name if there is not a matching one there</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/icl/saxon/om/NamePool.html#allocate(java.lang.String, java.lang.String, java.lang.String)">allocate</A></B>(java.lang.String prefix, java.lang.String uri, java.lang.String localName)</CODE> <BR> Allocate a name from the pool, or a new Name if there is not a matching one there</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> short</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/icl/saxon/om/NamePool.html#allocateCodeForPrefix(java.lang.String)">allocateCodeForPrefix</A></B>(java.lang.String prefix)</CODE> <BR> Allocate the prefix code for a given Prefix; create one if not found</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> short</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/icl/saxon/om/NamePool.html#allocateCodeForURI(java.lang.String)">allocateCodeForURI</A></B>(java.lang.String uri)</CODE> <BR> Allocate the uri code for a given URI; create one if not found, unless the namepool is sealed</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/icl/saxon/om/NamePool.html#allocateNamespaceCode(int)">allocateNamespaceCode</A></B>(int namecode)</CODE> <BR> Allocate a namespace code for the prefix/URI of a given namecode</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/icl/saxon/om/NamePool.html#allocateNamespaceCode(java.lang.String, java.lang.String)">allocateNamespaceCode</A></B>(java.lang.String prefix, java.lang.String uri)</CODE> <BR> Allocate the namespace code for a namespace prefix/URI pair.</TD> </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/icl/saxon/om/NamePool.html#diagnosticDump()">diagnosticDump</A></B>()</CODE> <BR> Diagnostic print of the namepool contents</TD> </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/icl/saxon/om/NamePool.html#generateJavaConstants()">generateJavaConstants</A></B>()</CODE> <BR> The following code is used to create a list of Java declarations for the fingerprints of standard names used in a stylesheet.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> short</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/icl/saxon/om/NamePool.html#getCodeForPrefix(java.lang.String)">getCodeForPrefix</A></B>(java.lang.String prefix)</CODE> <BR> Get the prefix code for a given Prefix</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> short</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/icl/saxon/om/NamePool.html#getCodeForURI(java.lang.String)">getCodeForURI</A></B>(java.lang.String uri)</CODE> <BR> Get the uri code for a given URI</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static <A HREF="../../../../com/icl/saxon/om/NamePool.html">NamePool</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/icl/saxon/om/NamePool.html#getDefaultNamePool()">getDefaultNamePool</A></B>()</CODE> <BR> Get the singular default NamePool</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/icl/saxon/om/NamePool.html#getDisplayName(int)">getDisplayName</A></B>(int nameCode)</CODE> <BR> Get the display form of a name (the QName), given its name code or fingerprint</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/icl/saxon/om/NamePool.html#getFingerprint(int)">getFingerprint</A></B>(int nameCode)</CODE> <BR> Get a fingerprint for the name with a given name code.</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/icl/saxon/om/NamePool.html#getFingerprint(java.lang.String, java.lang.String)">getFingerprint</A></B>(java.lang.String uri, java.lang.String localName)</CODE> <BR> Get a fingerprint for the name with a given uri and local name.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/icl/saxon/om/NamePool.html#getLocalName(int)">getLocalName</A></B>(int nameCode)</CODE> <BR> Get the local part of a name, given its name code or fingerprint</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/icl/saxon/om/NamePool.html#getNamespaceCode(int)">getNamespaceCode</A></B>(int namecode)</CODE> <BR> Get a namespace code for the prefix/URI of a given namecode</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/icl/saxon/om/NamePool.html#getNamespaceCode(java.lang.String, java.lang.String)">getNamespaceCode</A></B>(java.lang.String prefix, java.lang.String uri)</CODE> <BR> Get the existing namespace code for a namespace prefix/URI pair.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/icl/saxon/om/NamePool.html#getPrefix(int)">getPrefix</A></B>(int nameCode)</CODE> <BR> Get the prefix part of a name, given its name code or fingerprint</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/icl/saxon/om/NamePool.html#getPrefixFromNamespaceCode(int)">getPrefixFromNamespaceCode</A></B>(int code)</CODE> <BR> Get the namespace prefix from a namespace code</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/icl/saxon/om/NamePool.html#getPrefixIndex(short, java.lang.String)">getPrefixIndex</A></B>(short uriCode, java.lang.String prefix)</CODE> <BR> Get the index of a prefix among all the prefixes used with a given URI</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/icl/saxon/om/NamePool.html#getPrefixWithIndex(short, byte)">getPrefixWithIndex</A></B>(short uriCode, byte index)</CODE> <BR> Get a prefix among all the prefixes used with a given URI, given its index</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../com/icl/saxon/style/StandardNames.html">StandardNames</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/icl/saxon/om/NamePool.html#getStandardNames()">getStandardNames</A></B>()</CODE> <BR> Get the standard names</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/icl/saxon/om/NamePool.html#getURI(int)">getURI</A></B>(int nameCode)</CODE> <BR> Get the namespace-URI of a name, given its name code or fingerprint</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> short</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/icl/saxon/om/NamePool.html#getURICode(int)">getURICode</A></B>(int nameCode)</CODE> <BR> Get the URI code of a name, given its name code or fingerprint</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/icl/saxon/om/NamePool.html#getURIFromNamespaceCode(int)">getURIFromNamespaceCode</A></B>(int code)</CODE> <BR> Get the namespace URI from a namespace code</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/icl/saxon/om/NamePool.html#getURIFromURICode(short)">getURIFromURICode</A></B>(short code)</CODE> <BR> Get the namespace URI from a URI code</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/icl/saxon/om/NamePool.html#hasSignature(java.lang.Object)">hasSignature</A></B>(java.lang.Object sig)</CODE> <BR> Test whether the namepool contains names defined in a particular Stylesheet</TD> </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/icl/saxon/om/NamePool.html#importPool(com.icl.saxon.om.NamePool)">importPool</A></B>(<A HREF="../../../../com/icl/saxon/om/NamePool.html">NamePool</A> other)</CODE> <BR> Import the names defined in another namepool (typically the one used to create the stylesheet: these names are imported into the namepool used to build the source document).</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/icl/saxon/om/NamePool.html#isSealed()">isSealed</A></B>()</CODE> <BR> Determine whether the namepool is sealed</TD> </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/icl/saxon/om/NamePool.html#loadStandardNames()">loadStandardNames</A></B>()</CODE> <BR> Load the standard names that have a special meaning to XSLT</TD> </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/icl/saxon/om/NamePool.html#setStylesheetSignature(java.lang.Object)">setStylesheetSignature</A></B>(java.lang.Object sig)</CODE> <BR> Mark the NamePool to indicate that it contains names defined in a particular stylesheet</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Methods inherited from class java.lang.Object</B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> </TR> </TABLE> <P> <!-- ============ FIELD DETAIL =========== --> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TD> </TR> </TABLE> <A NAME="NamePool()"><!-- --></A><H3> NamePool</H3> <PRE> public <B>NamePool</B>()</PRE> <DL> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Method Detail</B></FONT></TD> </TR> </TABLE> <A NAME="getDefaultNamePool()"><!-- --></A><H3> getDefaultNamePool</H3> <PRE> public static <A HREF="../../../../com/icl/saxon/om/NamePool.html">NamePool</A> <B>getDefaultNamePool</B>()</PRE> <DL> <DD>Get the singular default NamePool</DL> <HR> <A NAME="loadStandardNames()"><!-- --></A><H3> loadStandardNames</H3> <PRE> public void <B>loadStandardNames</B>()</PRE> <DL> <DD>Load the standard names that have a special meaning to XSLT</DL> <HR> <A NAME="getStandardNames()"><!-- --></A><H3> getStandardNames</H3> <PRE> public <A HREF="../../../../com/icl/saxon/style/StandardNames.html">StandardNames</A> <B>getStandardNames</B>()</PRE> <DL> <DD>Get the standard names</DL> <HR> <A NAME="setStylesheetSignature(java.lang.Object)"><!-- --></A><H3> setStylesheetSignature</H3> <PRE> public void <B>setStylesheetSignature</B>(java.lang.Object sig)</PRE> <DL> <DD>Mark the NamePool to indicate that it contains names defined in a particular stylesheet</DL> <HR> <A NAME="hasSignature(java.lang.Object)"><!-- --></A><H3> hasSignature</H3> <PRE> public boolean <B>hasSignature</B>(java.lang.Object sig)</PRE> <DL> <DD>Test whether the namepool contains names defined in a particular Stylesheet</DL> <HR> <A NAME="importPool(com.icl.saxon.om.NamePool)"><!-- --></A><H3> importPool</H3> <PRE> public void <B>importPool</B>(<A HREF="../../../../com/icl/saxon/om/NamePool.html">NamePool</A> other) throws javax.xml.transform.TransformerException</PRE> <DL> <DD>Import the names defined in another namepool (typically the one used to create the stylesheet: these names are imported into the namepool used to build the source document). No longer used unless name pools are managed manually</DL> <HR> <A NAME="isSealed()"><!-- --></A><H3> isSealed</H3> <PRE> public boolean <B>isSealed</B>()</PRE> <DL> <DD>Determine whether the namepool is sealed</DL> <HR> <A NAME="allocateNamespaceCode(java.lang.String, java.lang.String)"><!-- --></A><H3> allocateNamespaceCode</H3> <PRE> public int <B>allocateNamespaceCode</B>(java.lang.String prefix, java.lang.String uri)</PRE> <DL> <DD>Allocate the namespace code for a namespace prefix/URI pair. Create it if not already present</DL> <HR> <A NAME="getNamespaceCode(java.lang.String, java.lang.String)"><!-- --></A><H3> getNamespaceCode</H3> <PRE> public int <B>getNamespaceCode</B>(java.lang.String prefix, java.lang.String uri)</PRE> <DL> <DD>Get the existing namespace code for a namespace prefix/URI pair.<DD><DL> <DT><B>Returns:</B><DD>-1 if there is none present</DL> </DD> </DL> <HR> <A NAME="allocateCodeForURI(java.lang.String)"><!-- --></A><H3> allocateCodeForURI</H3> <PRE> public short <B>allocateCodeForURI</B>(java.lang.String uri)</PRE> <DL> <DD>Allocate the uri code for a given URI; create one if not found, unless the namepool is sealed</DL> <HR> <A NAME="getCodeForURI(java.lang.String)"><!-- --></A><H3> getCodeForURI</H3> <PRE> public short <B>getCodeForURI</B>(java.lang.String uri)</PRE> <DL> <DD>Get the uri code for a given URI<DD><DL> <DT><B>Returns:</B><DD>-1 if not present in the name pool</DL> </DD> </DL> <HR> <A NAME="allocateCodeForPrefix(java.lang.String)"><!-- --></A><H3> allocateCodeForPrefix</H3> <PRE> public short <B>allocateCodeForPrefix</B>(java.lang.String prefix)</PRE> <DL> <DD>Allocate the prefix code for a given Prefix; create one if not found</DL> <HR> <A NAME="getCodeForPrefix(java.lang.String)"><!-- --></A><H3> getCodeForPrefix</H3> <PRE> public short <B>getCodeForPrefix</B>(java.lang.String prefix)</PRE> <DL> <DD>Get the prefix code for a given Prefix<DD><DL> <DT><B>Returns:</B><DD>-1 if not found</DL> </DD> </DL> <HR> <A NAME="getPrefixIndex(short, java.lang.String)"><!-- --></A><H3> getPrefixIndex</H3> <PRE> public int <B>getPrefixIndex</B>(short uriCode, java.lang.String prefix)</PRE> <DL> <DD>Get the index of a prefix among all the prefixes used with a given URI<DD><DL> <DT><B>Returns:</B><DD>-1 if not found</DL> </DD> </DL> <HR> <A NAME="getPrefixWithIndex(short, byte)"><!-- --></A><H3> getPrefixWithIndex</H3> <PRE> public java.lang.String <B>getPrefixWithIndex</B>(short uriCode, byte index)</PRE> <DL> <DD>Get a prefix among all the prefixes used with a given URI, given its index<DD><DL> <DT><B>Returns:</B><DD>null if not found</DL> </DD> </DL> <HR> <A NAME="allocate(java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3> allocate</H3> <PRE> public int <B>allocate</B>(java.lang.String prefix, java.lang.String uri, java.lang.String localName)</PRE> <DL> <DD>Allocate a name from the pool, or a new Name if there is not a matching one there<DD><DL> <DT><B>Parameters:</B><DD><CODE>prefix</CODE> - <DD><CODE>uri</CODE> - - the namespace URI<DD><CODE>localName</CODE> - <DT><B>Returns:</B><DD>an integer (the "namecode") identifying the name within the namepool. The Name itself may be retrieved using the getName(int) method</DL> </DD> </DL> <HR> <A NAME="allocate(java.lang.String, short, java.lang.String)"><!-- --></A><H3> allocate</H3> <PRE> public int <B>allocate</B>(java.lang.String prefix, short uriCode, java.lang.String localName)</PRE> <DL> <DD>Allocate a name from the pool, or a new Name if there is not a matching one there<DD><DL> <DT><B>Parameters:</B><DD><CODE>prefix</CODE> - <DD><CODE>uriCode</CODE> - - the code of the URI<DD><CODE>localName</CODE> - <DT><B>Returns:</B><DD>an integer (the "namecode") identifying the name within the namepool.</DL> </DD> </DL> <HR> <A NAME="allocateNamespaceCode(int)"><!-- --></A><H3> allocateNamespaceCode</H3> <PRE> public int <B>allocateNamespaceCode</B>(int namecode)</PRE> <DL> <DD>Allocate a namespace code for the prefix/URI of a given namecode</DL> <HR> <A NAME="getNamespaceCode(int)"><!-- --></A><H3> getNamespaceCode</H3> <PRE> public int <B>getNamespaceCode</B>(int namecode)</PRE> <DL> <DD>Get a namespace code for the prefix/URI of a given namecode</DL> <HR> <A NAME="getURI(int)"><!-- --></A><H3> getURI</H3> <PRE> public java.lang.String <B>getURI</B>(int nameCode)</PRE> <DL> <DD>Get the namespace-URI of a name, given its name code or fingerprint</DL> <HR> <A NAME="getURICode(int)"><!-- --></A><H3> getURICode</H3> <PRE> public short <B>getURICode</B>(int nameCode)</PRE> <DL> <DD>Get the URI code of a name, given its name code or fingerprint</DL> <HR> <A NAME="getLocalName(int)"><!-- --></A><H3> getLocalName</H3> <PRE> public java.lang.String <B>getLocalName</B>(int nameCode)</PRE> <DL> <DD>Get the local part of a name, given its name code or fingerprint</DL> <HR> <A NAME="getPrefix(int)"><!-- --></A><H3> getPrefix</H3> <PRE> public java.lang.String <B>getPrefix</B>(int nameCode)</PRE> <DL> <DD>Get the prefix part of a name, given its name code or fingerprint</DL> <HR> <A NAME="getDisplayName(int)"><!-- --></A><H3> getDisplayName</H3> <PRE> public java.lang.String <B>getDisplayName</B>(int nameCode)</PRE> <DL> <DD>Get the display form of a name (the QName), given its name code or fingerprint</DL> <HR> <A NAME="getFingerprint(int)"><!-- --></A><H3> getFingerprint</H3> <PRE> public int <B>getFingerprint</B>(int nameCode)</PRE> <DL> <DD>Get a fingerprint for the name with a given name code. The signature has the property that if two signatures are the same, the names are the same (ie. same local name and same URI)</DL> <HR> <A NAME="getFingerprint(java.lang.String, java.lang.String)"><!-- --></A><H3> getFingerprint</H3> <PRE> public int <B>getFingerprint</B>(java.lang.String uri, java.lang.String localName)</PRE> <DL> <DD>Get a fingerprint for the name with a given uri and local name. These must be present in the NamePool. The signature has the property that if two signatures are the same, the names are the same (ie. same local name and same URI).<DD><DL> <DT><B>Returns:</B><DD>-1 if not found</DL> </DD> </DL> <HR> <A NAME="getURIFromNamespaceCode(int)"><!-- --></A><H3> getURIFromNamespaceCode</H3> <PRE> public java.lang.String <B>getURIFromNamespaceCode</B>(int code)</PRE> <DL> <DD>Get the namespace URI from a namespace code</DL> <HR> <A NAME="getURIFromURICode(short)"><!-- --></A><H3> getURIFromURICode</H3> <PRE> public java.lang.String <B>getURIFromURICode</B>(short code)</PRE> <DL> <DD>Get the namespace URI from a URI code</DL> <HR> <A NAME="getPrefixFromNamespaceCode(int)"><!-- --></A><H3> getPrefixFromNamespaceCode</H3> <PRE> public java.lang.String <B>getPrefixFromNamespaceCode</B>(int code)</PRE> <DL> <DD>Get the namespace prefix from a namespace code</DL> <HR> <A NAME="diagnosticDump()"><!-- --></A><H3> diagnosticDump</H3> <PRE> public void <B>diagnosticDump</B>()</PRE> <DL> <DD>Diagnostic print of the namepool contents</DL> <HR> <A NAME="generateJavaConstants()"><!-- --></A><H3> generateJavaConstants</H3> <PRE> public void <B>generateJavaConstants</B>()</PRE> <DL> <DD>The following code is used to create a list of Java declarations for the fingerprints of standard names used in a stylesheet. This code is executed while building Saxon, to create the constant definitions appearing in the StandardNames module.</DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_bottom"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </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/icl/saxon/om/Name.html"><B>PREV CLASS</B></A> <A HREF="../../../../com/icl/saxon/om/Namespace.html"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="NamePool.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | <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> <!-- =========== END OF NAVBAR =========== --> <HR> </BODY> </HTML>