Package org.eclipse.wst.html.core.internal.document

Examples of org.eclipse.wst.html.core.internal.document.HTMLDocumentTypeEntry


    if (!(doc instanceof IDOMDocument))
      return;
    String typeid = ((IDOMDocument) doc).getDocumentTypeId();
    if (typeid != null) {
      if (typeid.trim().length()!= 0){
        HTMLDocumentTypeEntry entry = HTMLDocumentTypeRegistry.getInstance().getEntry(typeid);
        info.isXHTML = (entry != null && entry.isXMLType());
      }
      else {
        info.isXHTML = getXMLTarget(doc);
        info.isXHTML5 = info.isXHTML;
      }
View Full Code Here


    // no PID, always return the currently-supported HTML version
    if (pid == null || "".equals(pid)){
      return staticHTML5;
    }

    HTMLDocumentTypeEntry entry = doctypeRegistry.getEntry(pid);
    if (entry == null)
      return staticHTML;
   
    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=151000 - use internal content model
    if (entry.useInternalModel()) {
      if (pid != null && pid.equals(HTMLDocumentTypeRegistry.CHTML_PUBLIC_ID)) {
        return staticCHTML;
      }
      return staticHTML;
    }

    pid = entry.getPublicId();
    String sid = entry.getSystemId();

    CMDocument dtdcm = xhtmlassoc.getXHTMLCMDocument(pid, sid);
    if (dtdcm == null) {
      if (pid != null && pid.equals(HTMLDocumentTypeRegistry.CHTML_PUBLIC_ID)) {
        return staticCHTML;
      }
      return staticHTML;
    }

    String grammarURI = xhtmlassoc.getCachedGrammerURI();
    CMDocument buddycm = (CMDocument) buddyCache.get(grammarURI);
    if (buddycm != null)
      return buddycm;

    buddycm = new CMDocumentForBuddySystem(dtdcm, entry.isXMLType());
    buddyCache.put(grammarURI, buddycm);
    return buddycm;
  }
View Full Code Here

    if (!(doc instanceof IDOMDocument))
      return;
    String typeid = ((IDOMDocument) doc).getDocumentTypeId();
    if (typeid != null) {
      if (typeid.trim().length()!= 0){
        HTMLDocumentTypeEntry entry = HTMLDocumentTypeRegistry.getInstance().getEntry(typeid);
        info.isXHTML = (entry != null && entry.isXMLType());
      }
      else {
        info.isXHTML = getXMLTarget(doc);
        info.isXHTML5 = info.isXHTML;
      }
View Full Code Here

TOP

Related Classes of org.eclipse.wst.html.core.internal.document.HTMLDocumentTypeEntry

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.