Java Code Examples for com.sun.org.apache.xerces.internal.xni.XMLAttributes#removeAttributeAt()

The following examples show how to use com.sun.org.apache.xerces.internal.xni.XMLAttributes#removeAttributeAt() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DOMParserImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * The start of an element. If the document specifies the start element
 * by using an empty tag, then the startElement method will immediately
 * be followed by the endElement method, with no intervening methods.
 * Overriding the parent to handle DOM_NAMESPACE_DECLARATIONS=false.
 *
 * @param element    The name of the element.
 * @param attributes The element attributes.
 * @param augs     Additional information that may include infoset augmentations
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void startElement (QName element, XMLAttributes attributes, Augmentations augs) {
    // namespace declarations parameter has no effect if namespaces is false.
    if (!fNamespaceDeclarations && fNamespaceAware) {
        int len = attributes.getLength();
        for (int i = len - 1; i >= 0; --i) {
            if (XMLSymbols.PREFIX_XMLNS == attributes.getPrefix(i) ||
                XMLSymbols.PREFIX_XMLNS == attributes.getQName(i)) {
                attributes.removeAttributeAt(i);
            }
        }
    }
    super.startElement(element, attributes, augs);
}
 
Example 2
Source File: DOMParserImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * The start of an element. If the document specifies the start element
 * by using an empty tag, then the startElement method will immediately
 * be followed by the endElement method, with no intervening methods.
 * Overriding the parent to handle DOM_NAMESPACE_DECLARATIONS=false.
 *
 * @param element    The name of the element.
 * @param attributes The element attributes.
 * @param augs     Additional information that may include infoset augmentations
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void startElement (QName element, XMLAttributes attributes, Augmentations augs) {
    // namespace declarations parameter has no effect if namespaces is false.
    if (!fNamespaceDeclarations && fNamespaceAware) {
        int len = attributes.getLength();
        for (int i = len - 1; i >= 0; --i) {
            if (XMLSymbols.PREFIX_XMLNS == attributes.getPrefix(i) ||
                XMLSymbols.PREFIX_XMLNS == attributes.getQName(i)) {
                attributes.removeAttributeAt(i);
            }
        }
    }
    super.startElement(element, attributes, augs);
}
 
Example 3
Source File: DOMParserImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * The start of an element. If the document specifies the start element
 * by using an empty tag, then the startElement method will immediately
 * be followed by the endElement method, with no intervening methods.
 * Overriding the parent to handle DOM_NAMESPACE_DECLARATIONS=false.
 *
 * @param element    The name of the element.
 * @param attributes The element attributes.
 * @param augs     Additional information that may include infoset augmentations
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void startElement (QName element, XMLAttributes attributes, Augmentations augs) {
    // namespace declarations parameter has no effect if namespaces is false.
    if (!fNamespaceDeclarations && fNamespaceAware) {
        int len = attributes.getLength();
        for (int i = len - 1; i >= 0; --i) {
            if (XMLSymbols.PREFIX_XMLNS == attributes.getPrefix(i) ||
                XMLSymbols.PREFIX_XMLNS == attributes.getQName(i)) {
                attributes.removeAttributeAt(i);
            }
        }
    }
    super.startElement(element, attributes, augs);
}
 
Example 4
Source File: DOMParserImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * The start of an element. If the document specifies the start element
 * by using an empty tag, then the startElement method will immediately
 * be followed by the endElement method, with no intervening methods.
 * Overriding the parent to handle DOM_NAMESPACE_DECLARATIONS=false.
 *
 * @param element    The name of the element.
 * @param attributes The element attributes.
 * @param augs     Additional information that may include infoset augmentations
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void startElement (QName element, XMLAttributes attributes, Augmentations augs) {
    // namespace declarations parameter has no effect if namespaces is false.
    if (!fNamespaceDeclarations && fNamespaceAware) {
        int len = attributes.getLength();
        for (int i = len - 1; i >= 0; --i) {
            if (XMLSymbols.PREFIX_XMLNS == attributes.getPrefix(i) ||
                XMLSymbols.PREFIX_XMLNS == attributes.getQName(i)) {
                attributes.removeAttributeAt(i);
            }
        }
    }
    super.startElement(element, attributes, augs);
}
 
Example 5
Source File: DOMParserImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * The start of an element. If the document specifies the start element
 * by using an empty tag, then the startElement method will immediately
 * be followed by the endElement method, with no intervening methods.
 * Overriding the parent to handle DOM_NAMESPACE_DECLARATIONS=false.
 *
 * @param element    The name of the element.
 * @param attributes The element attributes.
 * @param augs     Additional information that may include infoset augmentations
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void startElement (QName element, XMLAttributes attributes, Augmentations augs) {
    // namespace declarations parameter has no effect if namespaces is false.
    if (!fNamespaceDeclarations && fNamespaceAware) {
        int len = attributes.getLength();
        for (int i = len - 1; i >= 0; --i) {
            if (XMLSymbols.PREFIX_XMLNS == attributes.getPrefix(i) ||
                XMLSymbols.PREFIX_XMLNS == attributes.getQName(i)) {
                attributes.removeAttributeAt(i);
            }
        }
    }
    super.startElement(element, attributes, augs);
}
 
Example 6
Source File: DOMParserImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * The start of an element. If the document specifies the start element
 * by using an empty tag, then the startElement method will immediately
 * be followed by the endElement method, with no intervening methods.
 * Overriding the parent to handle DOM_NAMESPACE_DECLARATIONS=false.
 *
 * @param element    The name of the element.
 * @param attributes The element attributes.
 * @param augs     Additional information that may include infoset augmentations
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void startElement (QName element, XMLAttributes attributes, Augmentations augs) {
    // namespace declarations parameter has no effect if namespaces is false.
    if (!fNamespaceDeclarations && fNamespaceAware) {
        int len = attributes.getLength();
        for (int i = len - 1; i >= 0; --i) {
            if (XMLSymbols.PREFIX_XMLNS == attributes.getPrefix(i) ||
                XMLSymbols.PREFIX_XMLNS == attributes.getQName(i)) {
                attributes.removeAttributeAt(i);
            }
        }
    }
    super.startElement(element, attributes, augs);
}
 
Example 7
Source File: DOMParserImpl.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * The start of an element. If the document specifies the start element
 * by using an empty tag, then the startElement method will immediately
 * be followed by the endElement method, with no intervening methods.
 * Overriding the parent to handle DOM_NAMESPACE_DECLARATIONS=false.
 *
 * @param element    The name of the element.
 * @param attributes The element attributes.
 * @param augs     Additional information that may include infoset augmentations
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void startElement (QName element, XMLAttributes attributes, Augmentations augs) {
    // namespace declarations parameter has no effect if namespaces is false.
    if (!fNamespaceDeclarations && fNamespaceAware) {
        int len = attributes.getLength();
        for (int i = len - 1; i >= 0; --i) {
            if (XMLSymbols.PREFIX_XMLNS == attributes.getPrefix(i) ||
                XMLSymbols.PREFIX_XMLNS == attributes.getQName(i)) {
                attributes.removeAttributeAt(i);
            }
        }
    }
    super.startElement(element, attributes, augs);
}
 
Example 8
Source File: DOMParserImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * The start of an element. If the document specifies the start element
 * by using an empty tag, then the startElement method will immediately
 * be followed by the endElement method, with no intervening methods.
 * Overriding the parent to handle DOM_NAMESPACE_DECLARATIONS=false.
 *
 * @param element    The name of the element.
 * @param attributes The element attributes.
 * @param augs     Additional information that may include infoset augmentations
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void startElement (QName element, XMLAttributes attributes, Augmentations augs) {
    // namespace declarations parameter has no effect if namespaces is false.
    if (!fNamespaceDeclarations && fNamespaceAware) {
        int len = attributes.getLength();
        for (int i = len - 1; i >= 0; --i) {
            if (XMLSymbols.PREFIX_XMLNS == attributes.getPrefix(i) ||
                XMLSymbols.PREFIX_XMLNS == attributes.getQName(i)) {
                attributes.removeAttributeAt(i);
            }
        }
    }
    super.startElement(element, attributes, augs);
}
 
Example 9
Source File: DOMParserImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * The start of an element. If the document specifies the start element
 * by using an empty tag, then the startElement method will immediately
 * be followed by the endElement method, with no intervening methods.
 * Overriding the parent to handle DOM_NAMESPACE_DECLARATIONS=false.
 *
 * @param element    The name of the element.
 * @param attributes The element attributes.
 * @param augs     Additional information that may include infoset augmentations
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void startElement (QName element, XMLAttributes attributes, Augmentations augs) {
    // namespace declarations parameter has no effect if namespaces is false.
    if (!fNamespaceDeclarations && fNamespaceAware) {
        int len = attributes.getLength();
        for (int i = len - 1; i >= 0; --i) {
            if (XMLSymbols.PREFIX_XMLNS == attributes.getPrefix(i) ||
                XMLSymbols.PREFIX_XMLNS == attributes.getQName(i)) {
                attributes.removeAttributeAt(i);
            }
        }
    }
    super.startElement(element, attributes, augs);
}
 
Example 10
Source File: DOMParserImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * The start of an element. If the document specifies the start element
 * by using an empty tag, then the startElement method will immediately
 * be followed by the endElement method, with no intervening methods.
 * Overriding the parent to handle DOM_NAMESPACE_DECLARATIONS=false.
 *
 * @param element    The name of the element.
 * @param attributes The element attributes.
 * @param augs     Additional information that may include infoset augmentations
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void startElement (QName element, XMLAttributes attributes, Augmentations augs) {
    // namespace declarations parameter has no effect if namespaces is false.
    if (!fNamespaceDeclarations && fNamespaceAware) {
        int len = attributes.getLength();
        for (int i = len - 1; i >= 0; --i) {
            if (XMLSymbols.PREFIX_XMLNS == attributes.getPrefix(i) ||
                XMLSymbols.PREFIX_XMLNS == attributes.getQName(i)) {
                attributes.removeAttributeAt(i);
            }
        }
    }
    super.startElement(element, attributes, augs);
}
 
Example 11
Source File: DOMParserImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * The start of an element. If the document specifies the start element
 * by using an empty tag, then the startElement method will immediately
 * be followed by the endElement method, with no intervening methods.
 * Overriding the parent to handle DOM_NAMESPACE_DECLARATIONS=false.
 *
 * @param element    The name of the element.
 * @param attributes The element attributes.
 * @param augs     Additional information that may include infoset augmentations
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void startElement (QName element, XMLAttributes attributes, Augmentations augs) {
    // namespace declarations parameter has no effect if namespaces is false.
    if (!fNamespaceDeclarations && fNamespaceAware) {
        int len = attributes.getLength();
        for (int i = len - 1; i >= 0; --i) {
            if (XMLSymbols.PREFIX_XMLNS == attributes.getPrefix(i) ||
                XMLSymbols.PREFIX_XMLNS == attributes.getQName(i)) {
                attributes.removeAttributeAt(i);
            }
        }
    }
    super.startElement(element, attributes, augs);
}