Home | History | Annotate | Download | only in utils

Lines Matching refs:prefix

63      * to the "xml" prefix.</p>
113 * already in force: in this context, only the "xml" prefix is
142 * XML element. After popping the context, all Namespace prefix
168 * Declare a Namespace prefix.
170 * <p>This method declares a prefix in the current Namespace
171 * context; the prefix will remain in force until this context
175 * prefix must not be "xml" or "xmlns".</p>
177 * <p>Note that you must <em>not</em> declare a prefix after
181 * #getPrefix getPrefix} will not return the default "" prefix,
182 * even if you have declared one; to check for a default prefix,
185 * for attribute names, where the default prefix is not allowed.</p>
187 * @param prefix The prefix to declare, or null for the empty
189 * @param uri The Namespace URI to associate with the prefix.
190 * @return true if the prefix was legal, false otherwise
195 public boolean declarePrefix (String prefix, String uri)
197 if (prefix.equals("xml") || prefix.equals("xmlns")) {
200 currentContext.declarePrefix(prefix, uri);
210 * context by removing the prefix and looking it up among the
219 * <dd>The local name (without prefix).</dd>
225 * the raw name has a prefix that has not been declared, then
241 * is an undeclared prefix.
259 * Look up a prefix and get the currently-mapped Namespace URI.
261 * <p>This method looks up the prefix in the current context.
264 * @param prefix The prefix to look up.
265 * @return The associated Namespace URI, or null if the prefix
270 public String getURI (String prefix)
272 return currentContext.getURI(prefix);
279 * <p><strong>Note:</strong> if there is a default prefix, it will not be
280 * returned in this enumeration; check for the default prefix
285 * prefix.
298 * <p>If more than one prefix is currently mapped to the same
304 * (default) prefix; to check for a default prefix, use the {@link
323 * URI. The xml: prefix will be included. If you want only one
324 * prefix that's mapped to the Namespace URI, and you don't care
328 * <p><strong>Note:</strong> the empty (default) prefix is
358 * <p>The empty (default) prefix will be included in this
411 String prefix=(String)allPrefixes.nextElement();
412 if(uri.equals(nsup.getURI(prefix)))
414 lookahead=prefix;
529 * Declare a Namespace prefix for this context.
531 * @param prefix The prefix to declare.
535 void declarePrefix (String prefix, String uri)
545 prefix = prefix.intern();
547 if ("".equals(prefix)) {
554 prefixTable.put(prefix, uri);
555 uriTable.put(uri, prefix); // may wipe out another prefix
557 declarations.addElement(prefix);
569 * if there is an undeclared prefix.
602 // No prefix.
613 // Prefix
615 String prefix = qName.substring(0, index);
618 if ("".equals(prefix)) {
621 uri = (String)prefixTable.get(prefix);
639 * Look up the URI associated with a prefix in this context.
641 * @param prefix The prefix to look up.
646 String getURI (String prefix)
648 if ("".equals(prefix)) {
653 return (String)prefixTable.get(prefix);
665 * @return The associated prefix, or null if none is declared.
697 * <p>The default prefix, if in force, is <em>not</em>