Examples of DOMOutputter


Examples of org.jdom.output.DOMOutputter

        Element root = new Element("root");
        org.jdom.Document wsdl = new org.jdom.Document(root);
        type.writeSchema(root);

        Document doc = new DOMOutputter().output(wsdl);
        addNamespace("xsd", XmlConstants.XSD);
        assertValid("//xsd:simpleType[@name='test']/xsd:restriction[@base='xsd:string']", doc);
        assertValid("//xsd:restriction[@base='xsd:string']/xsd:enumeration[@value='VALUE1']", doc);
        assertValid("//xsd:restriction[@base='xsd:string']/xsd:enumeration[@value='VALUE2']", doc);
    }
View Full Code Here

Examples of org.jdom.output.DOMOutputter

        assertValid("/b:root/b:bleh[text()='bleh']", element);
        assertValid("/b:root/b:howdy[text()='howdy']", element);
    }

    private void assertValid(String xpath, Element element) throws Exception {
        org.w3c.dom.Document doc = new DOMOutputter().output(element.getDocument());
       
        assertValid(xpath, doc);
    }
View Full Code Here

Examples of org.jdom.output.DOMOutputter

       
        assertValid(xpath, doc);
    }

    private void assertInvalid(String xpath, Element element) throws Exception {
        org.w3c.dom.Document doc = new DOMOutputter().output(element.getDocument());
       
        assertInvalid(xpath, doc);
    }
View Full Code Here

Examples of org.jdom.output.DOMOutputter

                    nsMap.add(n.getPrefix(), n.getURI());
                }
               
                col.setNamespaceContext(nsMap);

                org.w3c.dom.Document schema = new DOMOutputter().output(new Document(e));

                for (ServiceInfo si : s.getServiceInfos()) {
                    SchemaInfo info = new SchemaInfo(si, entry.getKey());

                    info.setElement(schema.getDocumentElement());
View Full Code Here

Examples of org.jdom.output.DOMOutputter

        assertValid("/b:root/b:bleh[text()='bleh']", element);
        assertValid("/b:root/b:howdy[text()='howdy']", element);
    }

    private void assertValid(String xpath, Element element) throws Exception {
        org.w3c.dom.Document doc = new DOMOutputter().output(element.getDocument());
       
        assertValid(xpath, doc);
    }
View Full Code Here

Examples of org.jdom.output.DOMOutputter

       
        assertValid(xpath, doc);
    }

    private void assertInvalid(String xpath, Element element) throws Exception {
        org.w3c.dom.Document doc = new DOMOutputter().output(element.getDocument());
       
        assertInvalid(xpath, doc);
    }
View Full Code Here

Examples of org.jdom.output.DOMOutputter

                               // add metadata

                               //fragment[i] = new DOMTree("geonetwork", "geonetwork", null,   getRecord(md),rec_spec );
                               //fragment[i].setHitNo(startingFragment+i);
                              
                               DOMOutputter outputter = new DOMOutputter();
                               Document doc = new Document(md);
                               org.w3c.dom.Document doc2 = outputter.output(doc);
                              
                               fragment[i] = new InformationFragmentImpl(startingFragment+i,"geonetwork","geonetwork",null,doc2,rec_spec);
                               //fragment[i] = new InformationFragmentImpl(startingFragment+i,"geonetwork","geonetwork",null,doc,rec_spec);

                              
View Full Code Here

Examples of org.jdom.output.DOMOutputter

     * @return W3C Document object
     * @throws IOException
     */
    private static Document jDomToW3(org.jdom.Document jdomDoc) throws IOException
    {
        DOMOutputter domOut = new DOMOutputter();
        try
        {
          return domOut.output(jdomDoc);
        }
        catch(JDOMException jde)
        {
          throw new IOException("JDOM output exception");
        }
View Full Code Here

Examples of org.jdom.output.DOMOutputter

                    if (!nsMap.containsValue(n.getURI())) {
                        nsMap.add(n.getPrefix(), n.getURI());
                    }
                }

                org.w3c.dom.Document schema = new DOMOutputter().output(new Document(e));

                for (ServiceInfo si : s.getServiceInfos()) {
                    SchemaCollection col = si.getXmlSchemaCollection();
                    col.setNamespaceContext(nsMap);
                    XmlSchema xmlSchema = addSchemaDocument(si, col, schema, entry.getKey());
View Full Code Here

Examples of org.jdom.output.DOMOutputter

        Element root = new Element("root");
        org.jdom.Document wsdl = new org.jdom.Document(root);
        type.writeSchema(root);

        Document doc = new DOMOutputter().output(wsdl);
        addNamespace("xsd", XmlConstants.XSD);
        assertValid("//xsd:simpleType[@name='test']/xsd:restriction[@base='xsd:string']", doc);
        assertValid("//xsd:restriction[@base='xsd:string']/xsd:enumeration[@value='VALUE1']", doc);
        assertValid("//xsd:restriction[@base='xsd:string']/xsd:enumeration[@value='VALUE2']", doc);
    }
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.