Sophie

Sophie

distrib > Momonga > development > i686 > media > os > by-pkgid > 8094ac79f986f14af880f5f612391693 > files > 267

xml-commons-apis-manual-1.4.01-4m.mo8.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 Sun Jun 12 19:55:30 JST 2011 -->
<TITLE>
NamespaceContext (JAXP 1.4, DOM3, SAX2.0.2(sax2r3), StAX 1.0, SAC 1.3)
</TITLE>

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

<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="NamespaceContext (JAXP 1.4, DOM3, SAX2.0.2(sax2r3), StAX 1.0, SAC 1.3)";
    }
}
</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;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../javax/xml/namespace/QName.html" title="class in javax.xml.namespace"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html?javax/xml/namespace/NamespaceContext.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="NamespaceContext.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;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&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">
javax.xml.namespace</FONT>
<BR>
Interface NamespaceContext</H2>
<HR>
<DL>
<DT><PRE>public interface <B>NamespaceContext</B></DL>
</PRE>

<P>
<p>Interface for read only XML Namespace context processing.</p>

 <p>An XML Namespace has the properties:</p>
 <ul>
   <li>Namespace URI:
       Namespace name expressed as a URI to which the prefix is bound</li>
   <li>prefix: syntactically, this is the part of the attribute name
       following the <code>XMLConstants.XMLNS_ATTRIBUTE</code>
       ("xmlns") in the Namespace declaration</li>
 </ul>
 <p> example: <code>&lt;element xmlns:prefix="http://Namespace-name-URI"&gt;</code></p>

 <p>All <code>get*(*)</code> methods operate in the current scope
 for Namespace URI and prefix resolution.</p>

 <p>Note that a Namespace URI can be bound to
 <strong>multiple</strong> prefixes in the current scope.  This can
 occur when multiple <code>XMLConstants.XMLNS_ATTRIBUTE</code>
 ("xmlns") Namespace declarations occur in the same Start-Tag and
 refer to the same Namespace URI. e.g.<br />
 <pre>
 &lt;element xmlns:prefix1="http://Namespace-name-URI"
          xmlns:prefix2="http://Namespace-name-URI"&gt;
 </pre>
 This can also occur when the same Namespace URI is used in multiple
 <code>XMLConstants.XMLNS_ATTRIBUTE</code> ("xmlns") Namespace
 declarations in the logical parent element hierarchy.  e.g.<br />
 <pre>
 &lt;parent xmlns:prefix1="http://Namespace-name-URI">
   &lt;child xmlns:prefix2="http://Namespace-name-URI"&gt;
     ...
   &lt;/child&gt;
 &lt;/parent&gt;
 </pre></p>

 <p>A prefix can only be bound to a <strong>single</strong>
 Namespace URI in the current scope.</p>
<P>

<P>
<DL>
<DT><B>Since:</B></DT>
  <DD>1.5</DD>
<DT><B>Version:</B></DT>
  <DD>$Revision: 446598 $, $Date: 2006-09-15 15:55:40 +0300 (Fri, 15 Sep 2006) $</DD>
<DT><B>Author:</B></DT>
  <DD><a href="mailto:Jeff.Suttor@Sun.com">Jeff Suttor</a></DD>
<DT><B>See Also:</B><DD><A HREF="../../../javax/xml/XMLConstants.html" title="class in javax.xml"><CODE>javax.XMLConstants for declarations of common XML values</CODE></A>, 
<a href="http://www.w3.org/TR/xmlschema-2/#QName">XML Schema Part2: Datatypes</a>, 
<a href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">Namespaces in XML</a>, 
<a href="http://www.w3.org/XML/xml-names-19990114-errata">Namespaces in XML Errata</a></DL>
<HR>

<P>

<!-- ========== 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;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/namespace/NamespaceContext.html#getNamespaceURI(java.lang.String)">getNamespaceURI</A></B>(java.lang.String&nbsp;prefix)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get Namespace URI bound to a prefix in the current scope.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/namespace/NamespaceContext.html#getPrefix(java.lang.String)">getPrefix</A></B>(java.lang.String&nbsp;namespaceURI)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get prefix bound to Namespace URI in the current scope.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Iterator</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/namespace/NamespaceContext.html#getPrefixes(java.lang.String)">getPrefixes</A></B>(java.lang.String&nbsp;namespaceURI)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get all prefixes bound to a Namespace URI in the current
 scope.</TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ 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="getNamespaceURI(java.lang.String)"><!-- --></A><H3>
getNamespaceURI</H3>
<PRE>
java.lang.String <B>getNamespaceURI</B>(java.lang.String&nbsp;prefix)</PRE>
<DL>
<DD><p>Get Namespace URI bound to a prefix in the current scope.</p>

 <p>When requesting a Namespace URI by prefix, the following
 table describes the returned Namespace URI value for all
 possible prefix values:</p>

 <table border="2" rules="all" cellpadding="4"> 
   <thead>
     <tr>
       <td align="center" colspan="2">
         <code>getNamespaceURI(prefix)</code>
         return value for specified prefixes
       </td>
     </tr>
     <tr>
       <td>prefix parameter</td>
       <td>Namespace URI return value</td>
     </tr>
   </thead>
   <tbody>
     <tr>
       <td><code>DEFAULT_NS_PREFIX</code> ("")</td>
       <td>default Namespace URI in the current scope or
         <code><A HREF="../../../javax/xml/XMLConstants.html#NULL_NS_URI"><CODE>XMLConstants.NULL_NS_URI("")</CODE></A></code>   
         when there is no default Namespace URI in the current scope</td>
     </tr>
     <tr>
       <td>bound prefix</td>
       <td>Namespace URI bound to prefix in current scope</td>
     </tr>
     <tr>
       <td>unbound prefix</td>
       <td><code><A HREF="../../../javax/xml/XMLConstants.html#NULL_NS_URI"><CODE>XMLConstants.NULL_NS_URI("")</CODE></A></code> </td>
     </tr>
     <tr>
       <td><code>XMLConstants.XML_NS_PREFIX</code> ("xml")</td>
       <td><code>XMLConstants.XML_NS_URI</code>
           ("http://www.w3.org/XML/1998/namespace")</td>
     </tr>
     <tr>
       <td><code>XMLConstants.XMLNS_ATTRIBUTE</code> ("xmlns")</td>
       <td><code>XMLConstants.XMLNS_ATTRIBUTE_NS_URI</code>
         ("http://www.w3.org/2000/xmlns/")</td>
     </tr>
     <tr>
       <td><code>null</code></td>
       <td><code>IllegalArgumentException</code> is thrown</td>
     </tr>
    </tbody>
 </table>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>prefix</CODE> - prefix to look up
<DT><B>Returns:</B><DD>Namespace URI bound to prefix in the current scope</DL>
</DD>
</DL>
<HR>

<A NAME="getPrefix(java.lang.String)"><!-- --></A><H3>
getPrefix</H3>
<PRE>
java.lang.String <B>getPrefix</B>(java.lang.String&nbsp;namespaceURI)</PRE>
<DL>
<DD><p>Get prefix bound to Namespace URI in the current scope.</p>

 <p>To get all prefixes bound to a Namespace URI in the current
 scope, use <A HREF="../../../javax/xml/namespace/NamespaceContext.html#getPrefixes(java.lang.String)"><CODE>getPrefixes(String namespaceURI)</CODE></A>.</p>

 <p>When requesting a prefix by Namespace URI, the following
 table describes the returned prefix value for all Namespace URI
 values:</p>

 <table border="2" rules="all" cellpadding="4">
   <thead>
     <tr>
       <td align="center" colspan="2">
         <code>getPrefix(namespaceURI)</code> return value for
         specified Namespace URIs
       </td>
     </tr>
     <tr>
       <td>Namespace URI parameter</td>
       <td>prefix value returned</td>
     </tr>
   </thead>
   <tbody>
     <tr>
       <td>&lt;default Namespace URI&gt;</td>
       <td><code>XMLConstants.DEFAULT_NS_PREFIX</code> ("")
       </td>
     </tr>
     <tr>
       <td>bound Namespace URI</td>
       <td>prefix bound to Namespace URI in the current scope,
           if multiple prefixes are bound to the Namespace URI in
           the current scope, a single arbitrary prefix, whose
           choice is implementation dependent, is returned</td>
     </tr>
     <tr>
       <td>unbound Namespace URI</td>
       <td><code>null</code></td>
     </tr>
     <tr>
       <td><code>XMLConstants.XML_NS_URI</code>
           ("http://www.w3.org/XML/1998/namespace")</td>
       <td><code>XMLConstants.XML_NS_PREFIX</code> ("xml")</td>
     </tr>
     <tr>
       <td><code>XMLConstants.XMLNS_ATTRIBUTE_NS_URI</code>
           ("http://www.w3.org/2000/xmlns/")</td>
       <td><code>XMLConstants.XMLNS_ATTRIBUTE</code> ("xmlns")</td>
     </tr>
     <tr>
       <td><code>null</code></td>
       <td><code>IllegalArgumentException</code> is thrown</td>
     </tr>
   </tbody>
 </table>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>namespaceURI</CODE> - URI of Namespace to lookup
<DT><B>Returns:</B><DD>prefix bound to Namespace URI in current context</DL>
</DD>
</DL>
<HR>

<A NAME="getPrefixes(java.lang.String)"><!-- --></A><H3>
getPrefixes</H3>
<PRE>
java.util.Iterator <B>getPrefixes</B>(java.lang.String&nbsp;namespaceURI)</PRE>
<DL>
<DD><p>Get all prefixes bound to a Namespace URI in the current
 scope.</p>

 <p>An Iterator over String elements is returned in an arbitrary, <strong>implementation dependent</strong>, order.</p>

 <p><strong>The <code>Iterator</code> is
 <em>not</em> modifiable.  e.g. the
 <code>remove()</code> method will throw
 <code>UnsupportedOperationException</code>.</strong></p>

 <p>When requesting prefixes by Namespace URI, the following
 table describes the returned prefixes value for all Namespace
 URI values:</p>

 <table border="2" rules="all" cellpadding="4">
   <thead>
     <tr>
       <td align="center" colspan="2"><code>
         getPrefixes(namespaceURI)</code> return value for
         specified Namespace URIs</td>
     </tr>
     <tr>
       <td>Namespace URI parameter</td>
       <td>prefixes value returned</td>
     </tr>
   </thead>
   <tbody>
     <tr>
       <td>bound Namespace URI,
         including the &lt;default Namespace URI&gt;</td>
       <td><code>Iterator</code> over prefixes bound to Namespace URI in
         the current scope in an arbitrary, <strong>implementation dependent</strong>,
         order</td>
     </tr>
     <tr>
       <td>unbound Namespace URI</td>
       <td>empty <code>Iterator</code></td>
     </tr>
     <tr>
       <td><code>XMLConstants.XML_NS_URI</code>
           ("http://www.w3.org/XML/1998/namespace")</td>
       <td><code>Iterator</code> with one element set to
         <code>XMLConstants.XML_NS_PREFIX</code> ("xml")</td>
     </tr>
     <tr>
       <td><code>XMLConstants.XMLNS_ATTRIBUTE_NS_URI</code>
           ("http://www.w3.org/2000/xmlns/")</td>
       <td><code>Iterator</code> with one element set to
         <code>XMLConstants.XMLNS_ATTRIBUTE</code> ("xmlns")</td>
     </tr>
     <tr>
       <td><code>null</code></td>
       <td><code>IllegalArgumentException</code> is thrown</td>
     </tr>
   </tbody>
 </table>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>namespaceURI</CODE> - URI of Namespace to lookup
<DT><B>Returns:</B><DD><code>Iterator</code> for all prefixes bound to the
 Namespace URI in the current scope</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;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../javax/xml/namespace/QName.html" title="class in javax.xml.namespace"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html?javax/xml/namespace/NamespaceContext.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="NamespaceContext.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;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

</BODY>
</HTML>