Package org.dom4j.tree

Examples of org.dom4j.tree.DefaultDocumentType


   * @throws CheckstyleException if there is a problem when trying to configure checkstyle
   * @throws DocumentException   the sub-element with the checkstyle configuration cannot be converted into a new XML document
   */
  private void configureCheckstyle(ConfigurationData config) throws CheckstyleException, DocumentException {
    Document document = DocumentHelper.parseText(config.getSubElement("module").toString());
    document.setDocType(new DefaultDocumentType("module", "-//Puppy Crawl//DTD Check Configuration 1.2//EN", "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"));
    //logger.debug("Configuring checkstyle: " + document.asXML());
    com.puppycrawl.tools.checkstyle.api.Configuration csc = ConfigurationLoader.loadConfiguration(
        new ByteArrayInputStream(document.asXML().getBytes()),
        new PropertiesExpander(new Properties()), true);
    checker = new Checker();
View Full Code Here


        return answer;
    }

    public DocumentType createDocType(String name, String publicId,
            String systemId) {
        return new DefaultDocumentType(name, publicId, systemId);
    }
View Full Code Here

         * accepts only the elementName property. This is used when only an
         * internal DTD subset is being provided via the <!DOCTYPE foo [...]>
         * syntax, in which case there is neither a SYSTEM nor PUBLIC
         * identifier.
         */
        DocumentType expected = new DefaultDocumentType();

        expected.setElementName("greeting");

        expected.setInternalDeclarations(getInternalDeclarations());

        /*
         * Parse the test XML document and compare the expected and actual
         * DOCTYPEs.
         */
 
View Full Code Here

     */
    public void testExternalDTDSubset() {
        /*
         * Setup the expected DocumentType.
         */
        DocumentType expected = new DefaultDocumentType("another-greeting",
                null, DTD_SYSTEM_ID);

        expected.setExternalDeclarations(getExternalDeclarations());

        /*
         * Parse the test XML document and compare the expected and actual
         * DOCTYPEs.
         */
 
View Full Code Here

     */
    public void testMixedDTDSubset() {
        /*
         * Setup the expected DocumentType.
         */
        DocumentType expected = new DefaultDocumentType("another-greeting",
                null, DTD_SYSTEM_ID);

        expected.setInternalDeclarations(getInternalDeclarations());

        expected.setExternalDeclarations(getExternalDeclarations());

        /*
         * Parse the test XML document and compare the expected and actual
         * DOCTYPEs.
         */
 
View Full Code Here

/* 135 */     return answer;
/*     */   }
/*     */
/*     */   public DocumentType createDocType(String name, String publicId, String systemId)
/*     */   {
/* 140 */     return new DefaultDocumentType(name, publicId, systemId);
/*     */   }
View Full Code Here

TOP

Related Classes of org.dom4j.tree.DefaultDocumentType

Copyright © 2018 www.massapicom. 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.