Lines Matching refs:prefix

60  * prefix/URI mapping is repeated for each context (for example), this
88 * to the "xml" prefix.</p>
193 * already in force: in this context, only the "xml" prefix is
231 * XML element. After popping the context, all Namespace prefix
259 * Declare a Namespace prefix. All prefixes must be declared
266 * <p>This method declares a prefix in the current Namespace
267 * context; the prefix will remain in force until this context
271 * the prefix.</p>
273 * <p>Note that you must <em>not</em> declare a prefix after
279 * #getPrefix getPrefix} will not return the "" prefix,
284 * for attribute names, where the default prefix is not allowed.</p>
286 * @param prefix The prefix to declare, or the empty string to
289 * @param uri The Namespace URI to associate with the prefix.
290 * @return true if the prefix was legal, false otherwise
296 public boolean declarePrefix (String prefix, String uri)
298 if (prefix.equals("xml") || prefix.equals("xmlns")) {
301 currentContext.declarePrefix(prefix, uri);
313 * current context by removing the prefix and looking it up among
322 * <dd>The local name (without prefix).</dd>
328 * the raw name has a prefix that has not been declared, then
344 * is an undeclared prefix.
363 * Look up a prefix and get the currently-mapped Namespace URI.
365 * <p>This method looks up the prefix in the current context.
368 * @param prefix The prefix to look up.
369 * @return The associated Namespace URI, or null if the prefix
374 public String getURI (String prefix)
376 return currentContext.getURI(prefix);
386 * <p><strong>Note:</strong> if there is a default prefix, it will not be
387 * returned in this enumeration; check for the default prefix
403 * <p>If more than one prefix is currently mapped to the same
408 * <p><strong>Note:</strong> this will never return the empty (default) prefix;
409 * to check for a default prefix, use the {@link #getURI getURI}
432 * URI. The xml: prefix will be included. If you want only one
433 * prefix that's mapped to the Namespace URI, and you don't care
437 * <p><strong>Note:</strong> the empty (default) prefix is <em>never</em> included
452 String prefix = (String) allPrefixes.nextElement();
453 if (uri.equals(getURI(prefix))) {
454 prefixes.add(prefix);
464 * <p>The empty (default) prefix will be included in this
597 * Declare a Namespace prefix for this context.
599 * @param prefix The prefix to declare.
603 void declarePrefix(String prefix, String uri) {
615 prefix = prefix.intern();
617 if ("".equals(prefix)) {
624 prefixTable.put(prefix, uri);
625 uriTable.put(uri, prefix); // may wipe out another prefix
627 declarations.add(prefix);
639 * if there is an undeclared prefix.
667 // context, but we can't assume prefix
674 // No prefix.
691 String prefix = qName.substring(0, index);
694 if ("".equals(prefix)) {
697 uri = (String)prefixTable.get(prefix);
700 || (!isAttribute && "xmlns".equals (prefix))) {
715 * Look up the URI associated with a prefix in this context.
717 * @param prefix The prefix to look up.
722 String getURI (String prefix)
724 if ("".equals(prefix)) {
729 return (String)prefixTable.get(prefix);
741 * @return The associated prefix, or null if none is declared.
768 * <p>The default prefix, if in force, is <em>not</em>