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

    //start building the FITS xml document
    Document mergedDoc = new Document();
    Element fits = new Element("fits",fitsNS);

    Namespace xsiNS = Namespace.getNamespace("xsi","http://www.w3.org/2001/XMLSchema-instance");   
    fits.addNamespaceDeclaration(xsiNS);
    fits.setAttribute(new Attribute("schemaLocation",Fits.XML_NAMESPACE+" "+Fits.externalOutputSchema, xsiNS));
   
    fits.setAttribute("version", FitsOutput.VERSION);
    DateFormat dateFormat = new SimpleDateFormat();
    Date date = new Date();
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

            // added namespaces
            Namespace pomNamespace = Namespace.getNamespace( "", "http://maven.apache.org/POM/4.0.0" );
            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/4.0.0 "
                    + ( isPom ? POM_XSD_URL : SETTINGS_XSD_URL ), xsiNamespace );
            }
View Full Code Here

    processElm.setNamespace(xmlns);
    // namespace declaration
    if (addNamespace) {

      Namespace xsi = Namespace.getNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance");
      processElm.addNamespaceDeclaration(xsi);
      Attribute attSchema = new Attribute("schemaLocation", "http://www.goobi.org/logfile" + " XML-logfile.xsd", xsi);
      processElm.setAttribute(attSchema);
    }
    // process information
View Full Code Here

    Element root = new Element("processes");
    answer.setRootElement(root);
    Namespace xmlns = Namespace.getNamespace("http://www.goobi.org/logfile");

    Namespace xsi = Namespace.getNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance");
    root.addNamespaceDeclaration(xsi);
    root.setNamespace(xmlns);
    Attribute attSchema = new Attribute("schemaLocation", "http://www.goobi.org/logfile" + " XML-logfile.xsd", xsi);
    root.setAttribute(attSchema);
    for (Prozess p : processList) {
      Document doc = createDocument(p, false);
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

    }

    private Document buildPagedSitemap(String layername, FeatureTypeInfo fti, int page){
        final Document d = new Document();
        Element urlSet = new Element("urlset", SITEMAP);
        urlSet.addNamespaceDeclaration(GEOSITEMAP);
        d.setRootElement(urlSet);

        try {
            DefaultQuery q = new DefaultQuery();
            if (fti.getFeatureSource(null, null).getQueryCapabilities().isOffsetSupported()){
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.