Example usage for org.dom4j QName getNamespaceURI

List of usage examples for org.dom4j QName getNamespaceURI

Introduction

In this page you can find the example usage for org.dom4j QName getNamespaceURI.

Prototype

public String getNamespaceURI() 

Source Link

Document

DOCUMENT ME!

Usage

From source file:org.orbeon.oxf.xml.XMLUtils.java

License:Open Source License

public static String buildExplodedQName(QName qName) {
    return buildExplodedQName(qName.getNamespaceURI(), qName.getName());
}

From source file:org.orbeon.saxon.dom4j.TypedNodeWrapper.java

License:Open Source License

@Override
public int getTypeAnnotation() {

    final QName nodeType = InstanceData.getType((Node) node);
    if (nodeType == null) {
        return getUntypedType();
    } else {//from   w ww. ja  va 2s.  co m
        // Extract QName
        String uri = nodeType.getNamespaceURI();
        final String localname = nodeType.getName();

        // For type annotation purposes, xforms:integer is translated into xs:integer. This is because XPath has no
        // knowledge of the XForms union types.
        if (uri.equals(XFormsConstants.XFORMS_NAMESPACE_URI)
                && Model.jXFormsVariationTypeNames().contains(localname))
            uri = XMLConstants.XSD_URI;

        final int requestedTypeFingerprint = StandardNames.getFingerprint(uri, localname);
        if (requestedTypeFingerprint == -1) {
            // Back to default case
            return getUntypedType();
        } else {
            // Return identified type
            return requestedTypeFingerprint;
        }
    }
}

From source file:org.sipfoundry.sipxconfig.test.XmlUnitHelper.java

License:Contributor Agreement License

/**
 * Asserts that the element in expected namespace URI
 *
 * @param element dom4jj element//from ww  w.  j a  va  2  s  . c o m
 * @param expectedNamespaceUri URI of the namespace
 */
public static void assertElementInNamespace(Element element, String expectedNamespaceUri) {
    QName name = element.getQName();
    String namespaceURI = name.getNamespaceURI();
    Assert.assertEquals(expectedNamespaceUri, namespaceURI);
}