Package org.jdom

Examples of org.jdom.Element.addNamespaceDeclaration()


            e.setAttribute(new Attribute(WSDLConstants.ATTR_TNS, entry.getKey()));
           
            if (null != namespaceMap) { // did application hand us some additional namespaces?
                for (Map.Entry<String, String> mapping : namespaceMap.entrySet()) {
                    // user gives us namespace->prefix mapping.
                    e.addNamespaceDeclaration(Namespace.getNamespace(mapping.getValue(),
                                                                     mapping.getKey()));
                }
            }

            // if the user didn't pick something else, assign 'tns' as the prefix.
View Full Code Here


            }

            // if the user didn't pick something else, assign 'tns' as the prefix.
            if (namespaceMap == null || !namespaceMap.containsKey(entry.getKey())) {
                // Schemas are more readable if there is a specific prefix for the TNS.
                e.addNamespaceDeclaration(Namespace.getNamespace(WSDLConstants.CONVENTIONAL_TNS_PREFIX,
                                                                 entry.getKey()));
            }
            e.setAttribute(new Attribute("elementFormDefault", "qualified"));
            e.setAttribute(new Attribute("attributeFormDefault", "qualified"));
View Full Code Here

                    if(additionalNamespaces != null ){
                     for( Iterator iter = additionalNamespaces .keySet().iterator();iter.hasNext();){
                        String prefix = (String) iter.next();
                        String uri = (String) additionalNamespaces .get(prefix);

                        newElem.addNamespaceDeclaration(Namespace.getNamespace(prefix,uri));
                     }
                    }
                }
                else
                {
View Full Code Here

    {
        this.service = service;

        Element root = new Element("types", "wsdl", WSDL11_NS);
        setSchemaTypes(root);
        root.addNamespaceDeclaration(Namespace.getNamespace(SoapConstants.XSD_PREFIX, SoapConstants.XSD));
    }


    protected void initialize()
    {
View Full Code Here

      Element rootElement = document.getRootElement();
      if (is12()) {
        rootElement.setNamespace(Namespace.getNamespace("http://java.sun.com/xml/ns/javaee"));
        Namespace xsi = Namespace.getNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance");
        rootElement.addNamespaceDeclaration(Namespace.getNamespace("xi", "http://www.w3.org/2001/XInclude"));
        rootElement.setAttribute(new Attribute("schemaLocation",
            "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd", xsi));
        rootElement.setAttribute("version", "1.2");
      } else if (is20()) {
        rootElement.setNamespace(Namespace.getNamespace("http://java.sun.com/xml/ns/javaee"));
View Full Code Here

            "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd", xsi));
        rootElement.setAttribute("version", "1.2");
      } else if (is20()) {
        rootElement.setNamespace(Namespace.getNamespace("http://java.sun.com/xml/ns/javaee"));
        Namespace xsi = Namespace.getNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance");
        rootElement.addNamespaceDeclaration(Namespace.getNamespace("xi", "http://www.w3.org/2001/XInclude"));
        rootElement.setAttribute(new Attribute("schemaLocation",
            "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd", xsi));
        rootElement.setAttribute("version", "2.0");
      }
      Namespace namespace = rootElement.getNamespace();
View Full Code Here

        if ( releaseDescriptor.isAddSchema() )
        {
            Namespace pomNamespace = Namespace.getNamespace( "", "http://maven.apache.org/POM/" + modelVersion );
            rootElement.setNamespace( pomNamespace );
            Namespace xsiNamespace = Namespace.getNamespace( "xsi", "http://www.w3.org/2001/XMLSchema-instance" );
            rootElement.addNamespaceDeclaration( xsiNamespace );

            if ( rootElement.getAttribute( "schemaLocation", xsiNamespace ) == null )
            {
                rootElement.setAttribute( "schemaLocation", "http://maven.apache.org/POM/" + modelVersion
                    + " http://maven.apache.org/maven-v" + modelVersion.replace( '.', '_' ) + ".xsd", xsiNamespace );
View Full Code Here

      Element rootElement = document.getRootElement();
      if (is12()) {
        rootElement.setNamespace(Namespace.getNamespace("http://java.sun.com/xml/ns/javaee"));
        Namespace xsi = Namespace.getNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance");
        rootElement.addNamespaceDeclaration(Namespace.getNamespace("xi", "http://www.w3.org/2001/XInclude"));
        rootElement.setAttribute(new Attribute("schemaLocation",
            "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd", xsi));
        rootElement.setAttribute("version", "1.2");
      } else if (is20()) {
        rootElement.setNamespace(Namespace.getNamespace("http://java.sun.com/xml/ns/javaee"));
View Full Code Here

            "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd", xsi));
        rootElement.setAttribute("version", "1.2");
      } else if (is20()) {
        rootElement.setNamespace(Namespace.getNamespace("http://java.sun.com/xml/ns/javaee"));
        Namespace xsi = Namespace.getNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance");
        rootElement.addNamespaceDeclaration(Namespace.getNamespace("xi", "http://www.w3.org/2001/XInclude"));
        rootElement.setAttribute(new Attribute("schemaLocation",
            "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd", xsi));
        rootElement.setAttribute("version", "2.0");
      }
      Namespace namespace = rootElement.getNamespace();
View Full Code Here

       
      String uriA = oaiUrl + "/metadata/handle/" + item.getHandle() + "/ore.xml";
     
        // Top level atom feed element
        Element aggregation = new Element("entry",ATOM_NS);
        aggregation.addNamespaceDeclaration(ATOM_NS);
        aggregation.addNamespaceDeclaration(ORE_NS);
        aggregation.addNamespaceDeclaration(ORE_ATOM);
        aggregation.addNamespaceDeclaration(DCTERMS_NS);

        // Atom-entry specific info
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.