예제 #1
0
 /** Declare a Namespace prefix. */
 public boolean declarePrefix(String prefix, String uri) {
   if (XMLConstants.XML_NS_PREFIX.equals(prefix) || XMLConstants.XMLNS_ATTRIBUTE.equals(prefix)) {
     return false;
   } else {
     currentContext.declarePrefix(prefix, uri);
     return true;
   }
 }
예제 #2
0
 /** Reset this Namespace support object for reuse. */
 public final void reset() {
   contexts = new Context[DEFAULT_CONTEXT_SIZE];
   contextPos = 0;
   contexts[contextPos] = currentContext = new Context();
   currentContext.declarePrefix(XMLConstants.XML_NS_PREFIX, XMLConstants.XML_NS_URI);
 }