blob: 674bb4564d4332ada28b60062cb58984df049a8f [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Thu Nov 22 17:12:53 EST 2007 -->
<TITLE>
Xalan-Java 2.7.1: Interface NamespaceContext
</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>&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="class-use/NamespaceContext.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&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;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="NamespaceContext.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: &nbsp;INNER&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>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.xml.namespace</FONT>
<BR>
Interface NamespaceContext</H2>
<DL>
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../org/apache/xalan/extensions/ExtensionNamespaceContext.html">ExtensionNamespaceContext</A></DD>
</DL>
<HR>
<DL>
<DT>public interface <B>NamespaceContext</B></DL>
<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>
<DL>
<DT><B>Since: </B><DD>1.5</DD>
<DT><B>See Also: </B><DD><A HREF="../../../javax/xml/XMLConstants.html">javax.XMLConstants for declarations of common XML values</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>
<!-- ======== INNER CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<!-- ========== 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>&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>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<!-- ============ 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="getNamespaceURI(java.lang.String)"><!-- --></A><H3>
getNamespaceURI</H3>
<PRE>
public 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">XMLConstants.NULL_NS_URI("")</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">XMLConstants.NULL_NS_URI("")</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><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>
public 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><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>
public 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><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 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>&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="class-use/NamespaceContext.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&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;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="NamespaceContext.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: &nbsp;INNER&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>
<!-- =========== END OF NAVBAR =========== -->
<HR>
Copyright © 2006 Apache XML Project. All Rights Reserved.
</BODY>
</HTML>