public Iterable<String> getPrefixes() { return _nsSupport.getPrefixes(); }
public String getNamespaceURI(String prefix) { return _nsSupport.getURI(prefix); }
public void pop() { _nsSupport.popContext(); }
/** * Return an enumeration of all prefixes currently declared for a URI. * * <p>This method returns prefixes mapped to a specific Namespace * URI. The xml: prefix will be included. If you want only one * prefix that's mapped to the Namespace URI, and you don't care * which one you get, use the {@link #getPrefix getPrefix} * method instead.</p> * * <p><strong>Note:</strong> the empty (default) prefix is <em>never</em> included * in this enumeration; to check for the presence of a default * Namespace, use the {@link #getURI getURI} method with an * argument of "".</p> * * @param uri The Namespace URI. * @return An enumeration of all prefixes declared in the * current context. * @see #getPrefix * @see #getDeclaredPrefixes * @see #getURI */ public Iterator getPrefixes(String uri) { List prefixes = new ArrayList(); for (String prefix: getPrefixes()) { if (uri.equals(getURI(prefix))) { prefixes.add(prefix); } } return prefixes.iterator(); }
public TWSDLParserContextImpl(DOMForest forest, AbstractDocument doc, ArrayList<ParserListener> listeners, ErrorReceiver errReceiver) { this._document = doc; this._listeners = listeners; this._nsSupport = new NamespaceSupport(); this._wsdlLocation = new WSDLLocation(); this.forest = forest; this.errorReceiver = errReceiver; }
public void push() { _nsSupport.pushContext(); }
public void registerNamespaces(Element e) { for (Iterator iter = XmlUtil.getAllAttributes(e); iter.hasNext();) { Attr a = (Attr) iter.next(); if (a.getName().equals(PREFIX_XMLNS)) { // default namespace declaration _nsSupport.declarePrefix("", a.getValue()); } else { String prefix = XmlUtil.getPrefix(a.getName()); if (prefix != null && prefix.equals(PREFIX_XMLNS)) { String nsPrefix = XmlUtil.getLocalPart(a.getName()); String uri = a.getValue(); _nsSupport.declarePrefix(nsPrefix, uri); } } } }
/** * Create a new Namespace support object. */ public NamespaceSupport() { reset(); }
/** * Return an enumeration of all prefixes currently declared for a URI. * * <p>This method returns prefixes mapped to a specific Namespace * URI. The xml: prefix will be included. If you want only one * prefix that's mapped to the Namespace URI, and you don't care * which one you get, use the {@link #getPrefix getPrefix} * method instead.</p> * * <p><strong>Note:</strong> the empty (default) prefix is <em>never</em> included * in this enumeration; to check for the presence of a default * Namespace, use the {@link #getURI getURI} method with an * argument of "".</p> * * @param uri The Namespace URI. * @return An enumeration of all prefixes declared in the * current context. * @see #getPrefix * @see #getDeclaredPrefixes * @see #getURI */ public Iterator getPrefixes(String uri) { List prefixes = new ArrayList(); for (String prefix: getPrefixes()) { if (uri.equals(getURI(prefix))) { prefixes.add(prefix); } } return prefixes.iterator(); }
public TWSDLParserContextImpl(DOMForest forest, AbstractDocument doc, ArrayList<ParserListener> listeners, ErrorReceiver errReceiver) { this._document = doc; this._listeners = listeners; this._nsSupport = new NamespaceSupport(); this._wsdlLocation = new WSDLLocation(); this.forest = forest; this.errorReceiver = errReceiver; }
public void push() { _nsSupport.pushContext(); }
public void registerNamespaces(Element e) { for (Iterator iter = XmlUtil.getAllAttributes(e); iter.hasNext();) { Attr a = (Attr) iter.next(); if (a.getName().equals(PREFIX_XMLNS)) { // default namespace declaration _nsSupport.declarePrefix("", a.getValue()); } else { String prefix = XmlUtil.getPrefix(a.getName()); if (prefix != null && prefix.equals(PREFIX_XMLNS)) { String nsPrefix = XmlUtil.getLocalPart(a.getName()); String uri = a.getValue(); _nsSupport.declarePrefix(nsPrefix, uri); } } } }
/** * Create a new Namespace support object. */ public NamespaceSupport() { reset(); }
/** * Return an enumeration of all prefixes currently declared for a URI. * * <p>This method returns prefixes mapped to a specific Namespace * URI. The xml: prefix will be included. If you want only one * prefix that's mapped to the Namespace URI, and you don't care * which one you get, use the {@link #getPrefix getPrefix} * method instead.</p> * * <p><strong>Note:</strong> the empty (default) prefix is <em>never</em> included * in this enumeration; to check for the presence of a default * Namespace, use the {@link #getURI getURI} method with an * argument of "".</p> * * @param uri The Namespace URI. * @return An enumeration of all prefixes declared in the * current context. * @see #getPrefix * @see #getDeclaredPrefixes * @see #getURI */ public Iterator getPrefixes(String uri) { List prefixes = new ArrayList(); for (String prefix: getPrefixes()) { if (uri.equals(getURI(prefix))) { prefixes.add(prefix); } } return prefixes.iterator(); }
public Iterable<String> getPrefixes() { return _nsSupport.getPrefixes(); }
public String getNamespaceURI(String prefix) { return _nsSupport.getURI(prefix); }
public TWSDLParserContextImpl(DOMForest forest, AbstractDocument doc, ArrayList<ParserListener> listeners, ErrorReceiver errReceiver) { this._document = doc; this._listeners = listeners; this._nsSupport = new NamespaceSupport(); this._wsdlLocation = new WSDLLocation(); this.forest = forest; this.errorReceiver = errReceiver; }
public void push() { _nsSupport.pushContext(); }
public void pop() { _nsSupport.popContext(); }
public void registerNamespaces(Element e) { for (Iterator iter = XmlUtil.getAllAttributes(e); iter.hasNext();) { Attr a = (Attr) iter.next(); if (a.getName().equals(PREFIX_XMLNS)) { // default namespace declaration _nsSupport.declarePrefix("", a.getValue()); } else { String prefix = XmlUtil.getPrefix(a.getName()); if (prefix != null && prefix.equals(PREFIX_XMLNS)) { String nsPrefix = XmlUtil.getLocalPart(a.getName()); String uri = a.getValue(); _nsSupport.declarePrefix(nsPrefix, uri); } } } }