| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
| <!--NewPage-->
|
| <HTML>
|
| <HEAD>
|
| <!-- Generated by javadoc on Thu Nov 22 17:12:57 EST 2007 -->
|
| <TITLE>
|
| Xalan-Java 2.7.1: Class NamespaceSupport2
|
| </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="class-use/NamespaceSupport2.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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="../../../../org/apache/xml/utils/NameSpace.html"><B>PREV CLASS</B></A>
|
| <A HREF="../../../../org/apache/xml/utils/NodeVector.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="NamespaceSupport2.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
| </TR>
|
| <TR>
|
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
| SUMMARY: INNER | <A HREF="#field_summary">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: <A HREF="#field_detail">FIELD</A> | <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">
|
| org.apache.xml.utils</FONT>
|
| <BR>
|
| Class NamespaceSupport2</H2>
|
| <PRE>
|
| java.lang.Object
|
| |
|
| +--<A HREF="../../../../org/xml/sax/helpers/NamespaceSupport.html">org.xml.sax.helpers.NamespaceSupport</A>
|
| |
|
| +--<B>org.apache.xml.utils.NamespaceSupport2</B>
|
| </PRE>
|
| <HR>
|
| <DL>
|
| <DT>public class <B>NamespaceSupport2</B><DT>extends <A HREF="../../../../org/xml/sax/helpers/NamespaceSupport.html">NamespaceSupport</A></DL>
|
|
|
| <P>
|
| Encapsulate Namespace tracking logic for use by SAX drivers. |
| |
| <p>This class is an attempt to rewrite the SAX NamespaceSupport |
| "helper" class for improved efficiency. It can be used to track the |
| namespace declarations currently in scope, providing lookup |
| routines to map prefixes to URIs and vice versa.</p> |
| |
| <p>ISSUE: For testing purposes, I've extended NamespaceSupport even |
| though I'm completely reasserting all behaviors and fields. |
| Wasteful.... But SAX did not put an interface under that object and |
| we seem to have written that SAX class into our APIs... and I don't |
| want to argue with it right now. </p>
|
| <P>
|
| <DL>
|
| <DT><B>See Also: </B><DD><A HREF="../../../../org/xml/sax/helpers/NamespaceSupport.html"><CODE>NamespaceSupport</CODE></A></DL>
|
| <HR>
|
|
|
| <P>
|
| <!-- ======== INNER CLASS SUMMARY ======== -->
|
|
|
|
|
| <!-- =========== FIELD SUMMARY =========== -->
|
|
|
| <A NAME="field_summary"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
| <TD COLSPAN=2><FONT SIZE="+2">
|
| <B>Field Summary</B></FONT></TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE>static java.lang.String</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#XMLNS">XMLNS</A></B></CODE>
|
|
|
| <BR>
|
| The XML Namespace as a constant.</TD>
|
| </TR>
|
| </TABLE>
|
| <A NAME="fields_inherited_from_class_org.xml.sax.helpers.NamespaceSupport"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
| <TD><B>Fields inherited from class org.xml.sax.helpers.<A HREF="../../../../org/xml/sax/helpers/NamespaceSupport.html">NamespaceSupport</A></B></TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD><CODE><A HREF="../../../../org/xml/sax/helpers/NamespaceSupport.html#NSDECL">NSDECL</A>,
|
| <A HREF="../../../../org/xml/sax/helpers/NamespaceSupport.html#XMLNS">XMLNS</A></CODE></TD>
|
| </TR>
|
| </TABLE>
|
|
|
| <!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
|
| <A NAME="constructor_summary"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
| <TD COLSPAN=2><FONT SIZE="+2">
|
| <B>Constructor Summary</B></FONT></TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD><CODE><B><A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#NamespaceSupport2()">NamespaceSupport2</A></B>()</CODE>
|
|
|
| <BR>
|
| Create a new Namespace support object.</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> boolean</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#declarePrefix(java.lang.String, java.lang.String)">declarePrefix</A></B>(java.lang.String prefix, |
| java.lang.String uri)</CODE>
|
|
|
| <BR>
|
| Declare a Namespace prefix.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> java.util.Enumeration</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#getDeclaredPrefixes()">getDeclaredPrefixes</A></B>()</CODE>
|
|
|
| <BR>
|
| Return an enumeration of all prefixes declared in this context.</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="../../../../org/apache/xml/utils/NamespaceSupport2.html#getPrefix(java.lang.String)">getPrefix</A></B>(java.lang.String uri)</CODE>
|
|
|
| <BR>
|
| Return one of the prefixes mapped to a Namespace URI.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> java.util.Enumeration</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#getPrefixes()">getPrefixes</A></B>()</CODE>
|
|
|
| <BR>
|
| Return an enumeration of all prefixes currently declared.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> java.util.Enumeration</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#getPrefixes(java.lang.String)">getPrefixes</A></B>(java.lang.String uri)</CODE>
|
|
|
| <BR>
|
| Return an enumeration of all prefixes currently declared for a 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="../../../../org/apache/xml/utils/NamespaceSupport2.html#getURI(java.lang.String)">getURI</A></B>(java.lang.String prefix)</CODE>
|
|
|
| <BR>
|
| Look up a prefix and get the currently-mapped Namespace URI.</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="../../../../org/apache/xml/utils/NamespaceSupport2.html#popContext()">popContext</A></B>()</CODE>
|
|
|
| <BR>
|
| Revert to the previous Namespace context.</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="../../../../org/apache/xml/utils/NamespaceSupport2.html#processName(java.lang.String, java.lang.String[], boolean)">processName</A></B>(java.lang.String qName, |
| java.lang.String[] parts, |
| boolean isAttribute)</CODE>
|
|
|
| <BR>
|
| Process a raw XML 1.0 name.</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="../../../../org/apache/xml/utils/NamespaceSupport2.html#pushContext()">pushContext</A></B>()</CODE>
|
|
|
| <BR>
|
| Start a new Namespace context.</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="../../../../org/apache/xml/utils/NamespaceSupport2.html#reset()">reset</A></B>()</CODE>
|
|
|
| <BR>
|
| Reset this Namespace support object for reuse.</TD>
|
| </TR>
|
| </TABLE>
|
| <A NAME="methods_inherited_from_class_org.xml.sax.helpers.NamespaceSupport"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
| <TD><B>Methods inherited from class org.xml.sax.helpers.<A HREF="../../../../org/xml/sax/helpers/NamespaceSupport.html">NamespaceSupport</A></B></TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD><CODE><A HREF="../../../../org/xml/sax/helpers/NamespaceSupport.html#isNamespaceDeclUris()">isNamespaceDeclUris</A>,
|
| <A HREF="../../../../org/xml/sax/helpers/NamespaceSupport.html#setNamespaceDeclUris(boolean)">setNamespaceDeclUris</A></CODE></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>equals,
|
| getClass,
|
| hashCode,
|
| notify,
|
| notifyAll,
|
| toString,
|
| wait,
|
| wait,
|
| wait</CODE></TD>
|
| </TR>
|
| </TABLE>
|
|
|
| <P>
|
|
|
| <!-- ============ FIELD DETAIL =========== -->
|
|
|
| <A NAME="field_detail"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
| <TD COLSPAN=1><FONT SIZE="+2">
|
| <B>Field Detail</B></FONT></TD>
|
| </TR>
|
| </TABLE>
|
|
|
| <A NAME="XMLNS"><!-- --></A><H3>
|
| XMLNS</H3>
|
| <PRE>
|
| public static final java.lang.String <B>XMLNS</B></PRE>
|
| <DL>
|
| <DD>The XML Namespace as a constant. |
| |
| <p>This is the Namespace URI that is automatically mapped |
| to the "xml" prefix.</p></DL>
|
|
|
| <!-- ========= 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="NamespaceSupport2()"><!-- --></A><H3>
|
| NamespaceSupport2</H3>
|
| <PRE>
|
| public <B>NamespaceSupport2</B>()</PRE>
|
| <DL>
|
| <DD>Create a new Namespace support object.</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="reset()"><!-- --></A><H3>
|
| reset</H3>
|
| <PRE>
|
| public void <B>reset</B>()</PRE>
|
| <DL>
|
| <DD>Reset this Namespace support object for reuse. |
| |
| <p>It is necessary to invoke this method before reusing the |
| Namespace support object for a new session.</p><DD><DL>
|
| <DT><B>Overrides:</B><DD><A HREF="../../../../org/xml/sax/helpers/NamespaceSupport.html#reset()">reset</A> in class <A HREF="../../../../org/xml/sax/helpers/NamespaceSupport.html">NamespaceSupport</A></DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="pushContext()"><!-- --></A><H3>
|
| pushContext</H3>
|
| <PRE>
|
| public void <B>pushContext</B>()</PRE>
|
| <DL>
|
| <DD>Start a new Namespace context. |
| |
| <p>Normally, you should push a new context at the beginning |
| of each XML element: the new context will automatically inherit |
| the declarations of its parent context, but it will also keep |
| track of which declarations were made within this context.</p> |
| |
| <p>The Namespace support object always starts with a base context |
| already in force: in this context, only the "xml" prefix is |
| declared.</p><DD><DL>
|
| <DT><B>Overrides:</B><DD><A HREF="../../../../org/xml/sax/helpers/NamespaceSupport.html#pushContext()">pushContext</A> in class <A HREF="../../../../org/xml/sax/helpers/NamespaceSupport.html">NamespaceSupport</A><DT><B>See Also: </B><DD><A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#popContext()"><CODE>popContext()</CODE></A></DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="popContext()"><!-- --></A><H3>
|
| popContext</H3>
|
| <PRE>
|
| public void <B>popContext</B>()</PRE>
|
| <DL>
|
| <DD>Revert to the previous Namespace context. |
| |
| <p>Normally, you should pop the context at the end of each |
| XML element. After popping the context, all Namespace prefix |
| mappings that were previously in force are restored.</p> |
| |
| <p>You must not attempt to declare additional Namespace |
| prefixes after popping a context, unless you push another |
| context first.</p><DD><DL>
|
| <DT><B>Overrides:</B><DD><A HREF="../../../../org/xml/sax/helpers/NamespaceSupport.html#popContext()">popContext</A> in class <A HREF="../../../../org/xml/sax/helpers/NamespaceSupport.html">NamespaceSupport</A><DT><B>See Also: </B><DD><A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#pushContext()"><CODE>pushContext()</CODE></A></DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="declarePrefix(java.lang.String, java.lang.String)"><!-- --></A><H3>
|
| declarePrefix</H3>
|
| <PRE>
|
| public boolean <B>declarePrefix</B>(java.lang.String prefix, |
| java.lang.String uri)</PRE>
|
| <DL>
|
| <DD>Declare a Namespace prefix. |
| |
| <p>This method declares a prefix in the current Namespace |
| context; the prefix will remain in force until this context |
| is popped, unless it is shadowed in a descendant context.</p> |
| |
| <p>To declare a default Namespace, use the empty string. The |
| prefix must not be "xml" or "xmlns".</p> |
| |
| <p>Note that you must <em>not</em> declare a prefix after |
| you've pushed and popped another Namespace.</p> |
| |
| <p>Note that there is an asymmetry in this library: while <A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#getPrefix(java.lang.String)">getPrefix</A> will not return the default "" prefix, |
| even if you have declared one; to check for a default prefix, |
| you have to look it up explicitly using <A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#getURI(java.lang.String)">getURI</A>. |
| This asymmetry exists to make it easier to look up prefixes |
| for attribute names, where the default prefix is not allowed.</p><DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>prefix</CODE> - The prefix to declare, or null for the empty |
| string.<DD><CODE>uri</CODE> - The Namespace URI to associate with the prefix.<DT><B>Returns:</B><DD>true if the prefix was legal, false otherwise<DT><B>Overrides:</B><DD><A HREF="../../../../org/xml/sax/helpers/NamespaceSupport.html#declarePrefix(java.lang.String, java.lang.String)">declarePrefix</A> in class <A HREF="../../../../org/xml/sax/helpers/NamespaceSupport.html">NamespaceSupport</A><DT><B>See Also: </B><DD><A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#processName(java.lang.String, java.lang.String[], boolean)"><CODE>processName(java.lang.String, java.lang.String[], boolean)</CODE></A>,
|
| <A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#getURI(java.lang.String)"><CODE>getURI(java.lang.String)</CODE></A>,
|
| <A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#getPrefix(java.lang.String)"><CODE>getPrefix(java.lang.String)</CODE></A></DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="processName(java.lang.String, java.lang.String[], boolean)"><!-- --></A><H3>
|
| processName</H3>
|
| <PRE>
|
| public java.lang.String[] <B>processName</B>(java.lang.String qName, |
| java.lang.String[] parts, |
| boolean isAttribute)</PRE>
|
| <DL>
|
| <DD>Process a raw XML 1.0 name. |
| |
| <p>This method processes a raw XML 1.0 name in the current |
| context by removing the prefix and looking it up among the |
| prefixes currently declared. The return value will be the |
| array supplied by the caller, filled in as follows:</p> |
| |
| <dl> |
| <dt>parts[0]</dt> |
| <dd>The Namespace URI, or an empty string if none is |
| in use.</dd> |
| <dt>parts[1]</dt> |
| <dd>The local name (without prefix).</dd> |
| <dt>parts[2]</dt> |
| <dd>The original raw name.</dd> |
| </dl> |
| |
| <p>All of the strings in the array will be internalized. If |
| the raw name has a prefix that has not been declared, then |
| the return value will be null.</p> |
| |
| <p>Note that attribute names are processed differently than |
| element names: an unprefixed element name will received the |
| default Namespace (if any), while an unprefixed element name |
| will not.</p><DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>qName</CODE> - The raw XML 1.0 name to be processed.<DD><CODE>parts</CODE> - A string array supplied by the caller, capable of |
| holding at least three members.<DD><CODE>isAttribute</CODE> - A flag indicating whether this is an |
| attribute name (true) or an element name (false).<DT><B>Returns:</B><DD>The supplied array holding three internalized strings |
| representing the Namespace URI (or empty string), the |
| local name, and the raw XML 1.0 name; or null if there |
| is an undeclared prefix.<DT><B>Overrides:</B><DD><A HREF="../../../../org/xml/sax/helpers/NamespaceSupport.html#processName(java.lang.String, java.lang.String[], boolean)">processName</A> in class <A HREF="../../../../org/xml/sax/helpers/NamespaceSupport.html">NamespaceSupport</A><DT><B>See Also: </B><DD><A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#declarePrefix(java.lang.String, java.lang.String)"><CODE>declarePrefix(java.lang.String, java.lang.String)</CODE></A>,
|
| <CODE>String.intern()</CODE></DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="getURI(java.lang.String)"><!-- --></A><H3>
|
| getURI</H3>
|
| <PRE>
|
| public java.lang.String <B>getURI</B>(java.lang.String prefix)</PRE>
|
| <DL>
|
| <DD>Look up a prefix and get the currently-mapped Namespace URI. |
| |
| <p>This method looks up the prefix in the current context. |
| Use the empty string ("") for the default Namespace.</p><DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>prefix</CODE> - The prefix to look up.<DT><B>Returns:</B><DD>The associated Namespace URI, or null if the prefix |
| is undeclared in this context.<DT><B>Overrides:</B><DD><A HREF="../../../../org/xml/sax/helpers/NamespaceSupport.html#getURI(java.lang.String)">getURI</A> in class <A HREF="../../../../org/xml/sax/helpers/NamespaceSupport.html">NamespaceSupport</A><DT><B>See Also: </B><DD><A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#getPrefix(java.lang.String)"><CODE>getPrefix(java.lang.String)</CODE></A>,
|
| <A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#getPrefixes()"><CODE>getPrefixes()</CODE></A></DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="getPrefixes()"><!-- --></A><H3>
|
| getPrefixes</H3>
|
| <PRE>
|
| public java.util.Enumeration <B>getPrefixes</B>()</PRE>
|
| <DL>
|
| <DD>Return an enumeration of all prefixes currently declared. |
| |
| <p><strong>Note:</strong> if there is a default prefix, it will not be |
| returned in this enumeration; check for the default prefix |
| using the <A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#getURI(java.lang.String)">getURI</A> with an argument of "".</p><DD><DL>
|
| <DT><B>Returns:</B><DD>An enumeration of all prefixes declared in the |
| current context except for the empty (default) |
| prefix.<DT><B>Overrides:</B><DD><A HREF="../../../../org/xml/sax/helpers/NamespaceSupport.html#getPrefixes()">getPrefixes</A> in class <A HREF="../../../../org/xml/sax/helpers/NamespaceSupport.html">NamespaceSupport</A><DT><B>See Also: </B><DD><A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#getDeclaredPrefixes()"><CODE>getDeclaredPrefixes()</CODE></A>,
|
| <A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#getURI(java.lang.String)"><CODE>getURI(java.lang.String)</CODE></A></DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="getPrefix(java.lang.String)"><!-- --></A><H3>
|
| getPrefix</H3>
|
| <PRE>
|
| public java.lang.String <B>getPrefix</B>(java.lang.String uri)</PRE>
|
| <DL>
|
| <DD>Return one of the prefixes mapped to a Namespace URI. |
| |
| <p>If more than one prefix is currently mapped to the same |
| URI, this method will make an arbitrary selection; if you |
| want all of the prefixes, use the <A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#getPrefixes()"><CODE>getPrefixes()</CODE></A> |
| method instead.</p> |
| |
| <p><strong>Note:</strong> this will never return the empty |
| (default) prefix; to check for a default prefix, use the <A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#getURI(java.lang.String)">getURI</A> method with an argument of "".</p><DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>uri</CODE> - The Namespace URI.<DT><B>Returns:</B><DD>One of the prefixes currently mapped to the URI supplied, |
| or null if none is mapped or if the URI is assigned to |
| the default Namespace.<DT><B>Overrides:</B><DD><A HREF="../../../../org/xml/sax/helpers/NamespaceSupport.html#getPrefix(java.lang.String)">getPrefix</A> in class <A HREF="../../../../org/xml/sax/helpers/NamespaceSupport.html">NamespaceSupport</A><DT><B>See Also: </B><DD><A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#getPrefixes(java.lang.String)"><CODE>getPrefixes(java.lang.String)</CODE></A>,
|
| <A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#getURI(java.lang.String)"><CODE>getURI(java.lang.String)</CODE></A></DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="getPrefixes(java.lang.String)"><!-- --></A><H3>
|
| getPrefixes</H3>
|
| <PRE>
|
| public java.util.Enumeration <B>getPrefixes</B>(java.lang.String uri)</PRE>
|
| <DL>
|
| <DD>Return an enumeration of all prefixes currently declared for a URI. |
| |
| <p>This method returns prefixes mapped to a specific Namespace |
| URI. The xml: prefix will be included. If you want only one |
| prefix that's mapped to the Namespace URI, and you don't care |
| which one you get, use the <A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#getPrefix(java.lang.String)">getPrefix</A> |
| method instead.</p> |
| |
| <p><strong>Note:</strong> the empty (default) prefix is |
| <em>never</em> included in this enumeration; to check for the |
| presence of a default Namespace, use the <A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#getURI(java.lang.String)">getURI</A> |
| method with an argument of "".</p><DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>uri</CODE> - The Namespace URI.<DT><B>Returns:</B><DD>An enumeration of all prefixes declared in the |
| current context.<DT><B>Overrides:</B><DD><A HREF="../../../../org/xml/sax/helpers/NamespaceSupport.html#getPrefixes(java.lang.String)">getPrefixes</A> in class <A HREF="../../../../org/xml/sax/helpers/NamespaceSupport.html">NamespaceSupport</A><DT><B>See Also: </B><DD><A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#getPrefix(java.lang.String)"><CODE>getPrefix(java.lang.String)</CODE></A>,
|
| <A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#getDeclaredPrefixes()"><CODE>getDeclaredPrefixes()</CODE></A>,
|
| <A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#getURI(java.lang.String)"><CODE>getURI(java.lang.String)</CODE></A></DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="getDeclaredPrefixes()"><!-- --></A><H3>
|
| getDeclaredPrefixes</H3>
|
| <PRE>
|
| public java.util.Enumeration <B>getDeclaredPrefixes</B>()</PRE>
|
| <DL>
|
| <DD>Return an enumeration of all prefixes declared in this context. |
| |
| <p>The empty (default) prefix will be included in this |
| enumeration; note that this behaviour differs from that of |
| <A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#getPrefix(java.lang.String)"><CODE>getPrefix(java.lang.String)</CODE></A> and <A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#getPrefixes()"><CODE>getPrefixes()</CODE></A>.</p><DD><DL>
|
| <DT><B>Returns:</B><DD>An enumeration of all prefixes declared in this |
| context.<DT><B>Overrides:</B><DD><A HREF="../../../../org/xml/sax/helpers/NamespaceSupport.html#getDeclaredPrefixes()">getDeclaredPrefixes</A> in class <A HREF="../../../../org/xml/sax/helpers/NamespaceSupport.html">NamespaceSupport</A><DT><B>See Also: </B><DD><A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#getPrefixes()"><CODE>getPrefixes()</CODE></A>,
|
| <A HREF="../../../../org/apache/xml/utils/NamespaceSupport2.html#getURI(java.lang.String)"><CODE>getURI(java.lang.String)</CODE></A></DL>
|
| </DD>
|
| </DL>
|
| <!-- ========= END OF CLASS DATA ========= -->
|
| <HR>
|
|
|
| <!-- ========== START OF NAVBAR ========== -->
|
| <A NAME="navbar_bottom"><!-- --></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
| <TR>
|
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
| <A NAME="navbar_bottom_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
| <TR ALIGN="center" VALIGN="top">
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </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="class-use/NamespaceSupport2.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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="../../../../org/apache/xml/utils/NameSpace.html"><B>PREV CLASS</B></A>
|
| <A HREF="../../../../org/apache/xml/utils/NodeVector.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="NamespaceSupport2.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
| </TR>
|
| <TR>
|
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
| SUMMARY: INNER | <A HREF="#field_summary">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: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
| </TR>
|
| </TABLE>
|
| <!-- =========== END OF NAVBAR =========== -->
|
|
|
| <HR>
|
| Copyright © 2006 Apache XML Project. All Rights Reserved.
|
| </BODY>
|
| </HTML>
|