Source Code Cross Referenced for NamespaceContext.java in  » XML » xerces-2_9_1 » org » apache » xerces » xni » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » XML » xerces 2_9_1 » org.apache.xerces.xni 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         * 
009:         *      http://www.apache.org/licenses/LICENSE-2.0
010:         * 
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         */
017:
018:        package org.apache.xerces.xni;
019:
020:        import java.util.Enumeration;
021:
022:        /**
023:         * Represents an interface to query namespace information.
024:         * <p>
025:         * The prefix and namespace must be identical references for equal strings, thus
026:         * each string should be internalized (@see String.intern()) 
027:         * or added to the <code>SymbolTable</code>
028:         *
029:         * @see <a href="../../../../../xerces2/org/apache/xerces/util/SymbolTable.html">
030:         * org.apache.xerces.util.SymbolTable</a>
031:         *
032:         * @author Andy Clark, IBM
033:         *
034:         * @version $Id: NamespaceContext.java 447247 2006-09-18 05:23:52Z mrglavas $
035:         */
036:        public interface NamespaceContext {
037:
038:            //
039:            // Constants
040:            //
041:
042:            /**
043:             * The XML Namespace ("http://www.w3.org/XML/1998/namespace"). This is
044:             * the Namespace URI that is automatically mapped to the "xml" prefix.
045:             */
046:            public final static String XML_URI = "http://www.w3.org/XML/1998/namespace"
047:                    .intern();
048:
049:            /**
050:             * XML Information Set REC
051:             * all namespace attributes (including those named xmlns, 
052:             * whose [prefix] property has no value) have a namespace URI of http://www.w3.org/2000/xmlns/
053:             */
054:            public final static String XMLNS_URI = "http://www.w3.org/2000/xmlns/"
055:                    .intern();
056:
057:            //
058:            // NamespaceContext methods
059:            //
060:
061:            /**
062:             * Start a new Namespace context.
063:             * <p>
064:             * A new context should be pushed at the beginning
065:             * of each XML element: the new context will automatically inherit
066:             * the declarations of its parent context, but it will also keep
067:             * track of which declarations were made within this context.
068:             * <p>
069:             *
070:             * @see #popContext
071:             */
072:            public void pushContext();
073:
074:            /**
075:             * Revert to the previous Namespace context.
076:             * <p>
077:             * The context should be popped at the end of each
078:             * XML element.  After popping the context, all Namespace prefix
079:             * mappings that were previously in force are restored.
080:             * <p>
081:             * Users must not attempt to declare additional Namespace
082:             * prefixes after popping a context, unless you push another
083:             * context first.
084:             *
085:             * @see #pushContext
086:             */
087:            public void popContext();
088:
089:            /**
090:             * Declare a Namespace prefix.
091:             * <p>
092:             * This method declares a prefix in the current Namespace
093:             * context; the prefix will remain in force until this context
094:             * is popped, unless it is shadowed in a descendant context.
095:             * <p>
096:             * Note that to declare a default Namespace, use the empty string.  
097:             * The prefixes "xml" and "xmlns" can't be rebound.
098:             * <p>
099:             * Note that you must <em>not</em> declare a prefix after
100:             * you've pushed and popped another Namespace.
101:             *
102:             * @param prefix The prefix to declare, or null for the empty
103:             *        string. 
104:             * @param uri The Namespace URI to associate with the prefix.
105:             *
106:             * @return true if the prefix was legal, false otherwise
107:             *
108:             * @see #getURI
109:             * @see #getDeclaredPrefixAt
110:             */
111:            public boolean declarePrefix(String prefix, String uri);
112:
113:            /**
114:             * Look up a prefix and get the currently-mapped Namespace URI.
115:             * <p>
116:             * This method looks up the prefix in the current context. If no mapping 
117:             * is found, this methods will continue lookup in the parent context(s).
118:             * Use the empty string ("") for the default Namespace.
119:             *
120:             * @param prefix The prefix to look up. 
121:             *
122:             * @return The associated Namespace URI, or null if the prefix
123:             *         is undeclared in this context.
124:             */
125:            public String getURI(String prefix);
126:
127:            /**
128:             * Look up a namespace URI and get one of the mapped prefix.
129:             * <p>
130:             * This method looks up the namespace URI in the current context.
131:             * If more than one prefix is currently mapped to the same URI, 
132:             * this method will make an arbitrary selection
133:             * If no mapping is found, this methods will continue lookup in the 
134:             * parent context(s).
135:             *
136:             * @param uri The namespace URI to look up.
137:             *
138:             * @return One of the associated prefixes, or null if the uri
139:             *         does not map to any prefix.
140:             *
141:             * @see #getPrefix
142:             */
143:            public String getPrefix(String uri);
144:
145:            /**
146:             * Return a count of locally declared prefixes, including
147:             * the default prefix if bound.
148:             */
149:            public int getDeclaredPrefixCount();
150:
151:            /** 
152:             * Returns the prefix at the specified index in the current context.
153:             */
154:            public String getDeclaredPrefixAt(int index);
155:
156:            /**
157:             * Return an enumeration of all prefixes whose declarations are active 
158:             * in the current context. This includes declarations from parent contexts 
159:             * that have not been overridden.
160:             * @return Enumeration
161:             */
162:            public Enumeration getAllPrefixes();
163:
164:            /**
165:             * Reset this Namespace support object for reuse.
166:             *
167:             * <p>It is necessary to invoke this method before reusing the
168:             * Namespace support object for a new session.</p>
169:             * 
170:             * <p>Note that implementations of this method need to ensure that
171:             * the declaration of the prefixes "xmlns" and "xml" are available.</p>
172:             */
173:            public void reset();
174:
175:        } // interface NamespaceContext
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.