Examples of CDom2HTMLDocument


Examples of org.allcolor.xml.parser.dom.CDom2HTMLDocument

  throws Exception {
    CDocType transitional = CDTDParser
      .parse(
        "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">",
        "http://www.w3.org/TRxhtml1/DTD/xhtml1-transitional.dtd",
        new CDom2HTMLDocument());
    CDocType frameset = CDTDParser
      .parse(
          "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\">",
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd",
          new CDom2HTMLDocument());
    File dtd_tr_ser = new File("src/dtd-tr.ser");
    System.out.println(dtd_tr_ser.getAbsolutePath());
    ObjectOutputStream oout = new ObjectOutputStream(new FileOutputStream(dtd_tr_ser));
    oout.writeObject(transitional);
    oout.close();
View Full Code Here

Examples of org.allcolor.xml.parser.dom.CDom2HTMLDocument

      ADocument doc = null;
      if ((hasRequestedFeature("HTML", "1.0")) ||
         (hasRequestedFeature("HTML", null))) {
        doc = new CDom1HTMLDocument(true, null);
      } else {
        doc = new CDom2HTMLDocument(true, null);
      }
      doc.setImplementation(this);
      if (doctype != null) {
        doc.appendChild(doctype);
      }
      return doc;
    } // end if

    ADocument doc = null;
    if ((hasRequestedFeature("HTML", "1.0")) ||
       (hasRequestedFeature("HTML", null))) {
      doc = new CDom1HTMLDocument(true, null);
    } else {
      doc = new CDom2HTMLDocument();
    }
    doc.setImplementation(this);
    if (doctype != null) {
      doc.appendChild(doctype);
    }
View Full Code Here

Examples of org.allcolor.xml.parser.dom.CDom2HTMLDocument

        if (u != null) {
          return CDTDParser
              .parse(
                  "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">",
                  u.toString(), new CDom2HTMLDocument());
        } // end if
        else {
          return CDTDParser
              .parse(
                  "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">",
                  "http://www.w3.org/TRxhtml1/DTD/xhtml1-transitional.dtd",
                  new CDom2HTMLDocument());
        } // end else
      } // end if
      else if ("/dtd-fr.ser".equals(name)) {
        final URL u = CXmlParser.class.getResource("/dtd-fr.dtd");

        if (u != null) {
          return CDTDParser
              .parse(
                  "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\">",
                  u.toString(), new CDom2HTMLDocument());
        } // end if
        else {
          return CDTDParser
              .parse(
                  "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\">",
                  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd",
                  new CDom2HTMLDocument());
        } // end else
      } // end else if

      return null;
    } // end catch
View Full Code Here

Examples of org.allcolor.xml.parser.dom.CDom2HTMLDocument

    // here should call the dtdhandler after calling the dtdparser and get
    // a dtd "tree".
    try {
      if (isIgnoreDTD()) return;
      this.docType = CDTDParser.parseDoctype(content, this.documentURI,
          new CDom2HTMLDocument());

      Map entities = this.docType.getKnownEntities();
      this.codec = new CEntityCoDec(entities);

      if ((this.cHandler != null)
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.