Package org.jdom2

Examples of org.jdom2.DocType


        outputString(ftfw,     content));
  }
 
  @Test
  public void testDocTypeSystemIDISS() {
    DocType content = new DocType("root", "sysid");
    content.setInternalSubset("internal");
    assertEquals("<!DOCTYPE root SYSTEM \"sysid\" [\ninternal]>",
        outputString(fraw,     content));
    assertEquals("<!DOCTYPE root SYSTEM \"sysid\" [\ninternal]>",
        outputString(fcompact, content));
    assertEquals("<!DOCTYPE root SYSTEM \"sysid\" [\ninternal]>",
View Full Code Here


        outputString(ftfw,     content));
  }
 
  @Test
  public void testDocTypePublicSystemID() {
    DocType content = new DocType("root", "pubid", "sysid");
    assertEquals("<!DOCTYPE root PUBLIC \"pubid\" \"sysid\">",
        outputString(fraw,     content));
    assertEquals("<!DOCTYPE root PUBLIC \"pubid\" \"sysid\">",
        outputString(fcompact, content));
    assertEquals("<!DOCTYPE root PUBLIC \"pubid\" \"sysid\">",
View Full Code Here

        outputString(ftfw,     content));
  }
 
  @Test
  public void testDocTypePublicSystemIDISS() {
    DocType content = new DocType("root", "pubid", "sysid");
    content.setInternalSubset("internal");
    assertEquals("<!DOCTYPE root PUBLIC \"pubid\" \"sysid\" [\ninternal]>",
        outputString(fraw,     content));
    assertEquals("<!DOCTYPE root PUBLIC \"pubid\" \"sysid\" [\ninternal]>",
        outputString(fcompact, content));
    assertEquals("<!DOCTYPE root PUBLIC \"pubid\" \"sysid\" [\ninternal]>",
View Full Code Here

  }
 
  @Test
  public void testDocumentDocType() {
    Document content = new Document();
    content.setDocType(new DocType("root"));
    assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE root>\n",
        outputString(fraw,     content));
    assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE root>\n",
        outputString(fcompact, content));
    assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE root>\n",
View Full Code Here

        txt, txt,txt, txt, txt);
  }

  @Test
  public void testOutputDocTypeSimple() {
    checkOutput(new DocType("root"), "<!DOCTYPE root>", "<!DOCTYPE root>", "<!DOCTYPE root>",
        "<!DOCTYPE root>", "<!DOCTYPE root>");
  }
View Full Code Here

  }

  @Test
  public void testOutputDocTypeInternalSubset() {
    String dec = "<!DOCTYPE root [\ninternal]>";
    DocType dt = new DocType("root");
    dt.setInternalSubset("internal");
    checkOutput(dt, dec, dec, dec, dec, dec);
  }
View Full Code Here

  }

  @Test
  public void testOutputDocTypeSystem() {
    String dec = "<!DOCTYPE root SYSTEM \"systemID\">";
    checkOutput(new DocType("root", "systemID"), dec, dec, dec, dec, dec);
  }
View Full Code Here

  }

  @Test
  public void testOutputDocTypePublic() {
    String dec = "<!DOCTYPE root PUBLIC \"publicID\">";
    checkOutput(new DocType("root", "publicID", null), dec, dec, dec, dec, dec);
  }
View Full Code Here

  }

  @Test
  public void testOutputDocTypePublicSystem() {
    String dec = "<!DOCTYPE root PUBLIC \"publicID\" \"systemID\">";
    checkOutput(new DocType("root", "publicID", "systemID"), dec, dec, dec, dec, dec);
  }
View Full Code Here

        rtdec + "\n");
  }

  @Test
  public void testOutputDocumentFull() {
    DocType dt = new DocType("root");
    Comment comment = new Comment("comment");
    ProcessingInstruction pi = new ProcessingInstruction("jdomtest", "");
    Element root = new Element("root");
    Document doc = new Document();
    doc.addContent(dt);
View Full Code Here

TOP

Related Classes of org.jdom2.DocType

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.