| <!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 NamespaceMappings
|
| </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/NamespaceMappings.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/serializer/Method.html"><B>PREV CLASS</B></A>
|
| <A HREF="../../../../org/apache/xml/serializer/OutputPropertiesFactory.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="NamespaceMappings.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">
|
| org.apache.xml.serializer</FONT>
|
| <BR>
|
| Class NamespaceMappings</H2>
|
| <PRE>
|
| java.lang.Object
|
| |
|
| +--<B>org.apache.xml.serializer.NamespaceMappings</B>
|
| </PRE>
|
| <HR>
|
| <DL>
|
| <DT>public class <B>NamespaceMappings</B><DT>extends java.lang.Object</DL>
|
|
|
| <P>
|
| This class keeps track of the currently defined namespaces. Conceptually the |
| prefix/uri/depth triplets are pushed on a stack pushed on a stack. The depth |
| indicates the nesting depth of the element for which the mapping was made. |
| |
| <p>For example: |
| <pre> |
| <chapter xmlns:p1="def"> |
| <paragraph xmlns:p2="ghi"> |
| <sentance xmlns:p3="jkl"> |
| </sentance> |
| </paragraph> |
| <paragraph xlmns:p4="mno"> |
| </paragraph> |
| </chapter> |
| </pre> |
| |
| When the <chapter> element is encounted the prefix "p1" associated with uri |
| "def" is pushed on the stack with depth 1. |
| When the first <paragraph> is encountered "p2" and "ghi" are pushed with |
| depth 2. |
| When the <sentance> is encountered "p3" and "jkl" are pushed with depth 3. |
| When </sentance> occurs the popNamespaces(3) will pop "p3"/"jkl" off the |
| stack. Of course popNamespaces(2) would pop anything with depth 2 or |
| greater. |
| |
| So prefix/uri pairs are pushed and poped off the stack as elements are |
| processed. At any given moment of processing the currently visible prefixes |
| are on the stack and a prefix can be found given a uri, or a uri can be found |
| given a prefix. |
| |
| This class is intended for internal use only. However, it is made public because |
| other packages require it.
|
| <P>
|
| <DL>
|
| <DT><B>Usage:</B><DD><i><font size="-1" color="#FF0000"> **For internal use only**</font></i></DD> |
| </DD>
|
| </DL>
|
| <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="../../../../org/apache/xml/serializer/NamespaceMappings.html#NamespaceMappings()">NamespaceMappings</A></B>()</CODE>
|
|
|
| <BR>
|
| Default constructor</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> java.lang.Object</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/NamespaceMappings.html#clone()">clone</A></B>()</CODE>
|
|
|
| <BR>
|
| This method makes a clone of this object.</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/serializer/NamespaceMappings.html#generateNextPrefix()">generateNextPrefix</A></B>()</CODE>
|
|
|
| <BR>
|
| Generate a new namespace prefix ( ns0, ns1 ...) not used before</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/serializer/NamespaceMappings.html#lookupAllPrefixes(java.lang.String)">lookupAllPrefixes</A></B>(java.lang.String uri)</CODE>
|
|
|
| <BR>
|
| Given a namespace uri, get all prefixes bound to the Namespace URI in the current scope.</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/serializer/NamespaceMappings.html#lookupNamespace(java.lang.String)">lookupNamespace</A></B>(java.lang.String prefix)</CODE>
|
|
|
| <BR>
|
| Use a namespace prefix to lookup a namespace 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/serializer/NamespaceMappings.html#lookupPrefix(java.lang.String)">lookupPrefix</A></B>(java.lang.String uri)</CODE>
|
|
|
| <BR>
|
| Given a namespace uri, and the namespaces mappings for the |
| current element, return the current prefix for that uri.</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/serializer/NamespaceMappings.html#pushNamespace(java.lang.String, java.lang.String, int)">pushNamespace</A></B>(java.lang.String prefix, |
| java.lang.String uri, |
| int elemDepth)</CODE>
|
|
|
| <BR>
|
| Declare a mapping of a prefix to namespace URI at the given element depth.</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 =========== -->
|
|
|
|
|
| <!-- ========= 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="NamespaceMappings()"><!-- --></A><H3>
|
| NamespaceMappings</H3>
|
| <PRE>
|
| public <B>NamespaceMappings</B>()</PRE>
|
| <DL>
|
| <DD>Default constructor<DD><DL>
|
| <DT><B>See Also: </B><DD><CODE>Object.Object()</CODE></DL>
|
| </DD>
|
| </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="lookupNamespace(java.lang.String)"><!-- --></A><H3>
|
| lookupNamespace</H3>
|
| <PRE>
|
| public java.lang.String <B>lookupNamespace</B>(java.lang.String prefix)</PRE>
|
| <DL>
|
| <DD>Use a namespace prefix to lookup a namespace URI.<DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>prefix</CODE> - String the prefix of the namespace<DT><B>Returns:</B><DD>the URI corresponding to the prefix, returns "" |
| if there is no visible mapping.</DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="lookupPrefix(java.lang.String)"><!-- --></A><H3>
|
| lookupPrefix</H3>
|
| <PRE>
|
| public java.lang.String <B>lookupPrefix</B>(java.lang.String uri)</PRE>
|
| <DL>
|
| <DD>Given a namespace uri, and the namespaces mappings for the |
| current element, return the current prefix for that uri.<DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>uri</CODE> - the namespace URI to be search for<DT><B>Returns:</B><DD>an existing prefix that maps to the given URI, null if no prefix |
| maps to the given namespace URI.</DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="pushNamespace(java.lang.String, java.lang.String, int)"><!-- --></A><H3>
|
| pushNamespace</H3>
|
| <PRE>
|
| public boolean <B>pushNamespace</B>(java.lang.String prefix, |
| java.lang.String uri, |
| int elemDepth)</PRE>
|
| <DL>
|
| <DD>Declare a mapping of a prefix to namespace URI at the given element depth.<DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>prefix</CODE> - a String with the prefix for a qualified name<DD><CODE>uri</CODE> - a String with the uri to which the prefix is to map<DD><CODE>elemDepth</CODE> - the depth of current declaration</DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="generateNextPrefix()"><!-- --></A><H3>
|
| generateNextPrefix</H3>
|
| <PRE>
|
| public java.lang.String <B>generateNextPrefix</B>()</PRE>
|
| <DL>
|
| <DD>Generate a new namespace prefix ( ns0, ns1 ...) not used before<DD><DL>
|
| <DT><B>Returns:</B><DD>String a new namespace prefix ( ns0, ns1, ns2 ...)</DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="clone()"><!-- --></A><H3>
|
| clone</H3>
|
| <PRE>
|
| public java.lang.Object <B>clone</B>() |
| throws java.lang.CloneNotSupportedException</PRE>
|
| <DL>
|
| <DD>This method makes a clone of this object.</DL>
|
| <HR>
|
|
|
| <A NAME="lookupAllPrefixes(java.lang.String)"><!-- --></A><H3>
|
| lookupAllPrefixes</H3>
|
| <PRE>
|
| public java.lang.String[] <B>lookupAllPrefixes</B>(java.lang.String uri)</PRE>
|
| <DL>
|
| <DD>Given a namespace uri, get all prefixes bound to the Namespace URI in the current scope.<DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>uri</CODE> - the namespace URI to be search for<DT><B>Returns:</B><DD>An array of Strings which are |
| all prefixes bound to the namespace URI in the current scope. |
| An array of zero elements is returned if no prefixes map to the given |
| namespace URI.</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/NamespaceMappings.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/serializer/Method.html"><B>PREV CLASS</B></A>
|
| <A HREF="../../../../org/apache/xml/serializer/OutputPropertiesFactory.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="NamespaceMappings.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>
|
| Copyright © 2006 Apache XML Project. All Rights Reserved.
|
| </BODY>
|
| </HTML>
|