Package org.eclipse.wst.xml.core.internal.contentmodel

Examples of org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration.supports()


        return true;
      CMElementDeclaration decl = getElementDeclaration((Element) node);
      if (decl != null) {
        if (decl.getContentType() == CMElementDeclaration.CDATA)
          return false;
        if (decl.supports(HTMLCMProperties.SHOULD_KEEP_SPACE)) {
          boolean shouldKeepSpace = ((Boolean) decl.getProperty(HTMLCMProperties.SHOULD_KEEP_SPACE)).booleanValue();
          if (shouldKeepSpace)
            return false;
        }
      }
View Full Code Here


          if (HTML_NAME.equalsIgnoreCase(localName) || HEAD_NAME.equalsIgnoreCase(localName))
            break;
        }

        CMElementDeclaration decl = getElementDeclaration(element);
        if (decl != null && decl.supports(HTMLCMProperties.SHOULD_INDENT_CHILD_SOURCE)) {
          boolean shouldIndent = isIdentable(node, parent);
          if (shouldIndent)
            buffer.append(indent);
        }
View Full Code Here

    CMElementDeclaration dec = CMUtil.getDeclaration(target);
    if (dec == null)
      return; // cannot validate.
    if (!CMUtil.isHTML(dec))
      return; // no need to validate
    if (!dec.supports(HTMLCMProperties.PROHIBITED_ANCESTORS))
      return; // cannot validate.
    CMNamedNodeMap prohibited = (CMNamedNodeMap) dec.getProperty(HTMLCMProperties.PROHIBITED_ANCESTORS);
    if (prohibited.getLength() <= 0)
      return; // no prohibited ancestors.
View Full Code Here

  private static Collection gatherInclusions(Collection ancestors) {
    Vector inclusions = new Vector();
    Iterator iter = ancestors.iterator();
    while (iter.hasNext()) {
      CMElementDeclaration decl = (CMElementDeclaration) iter.next();
      if (decl.supports(HTMLCMProperties.INCLUSION)) {
        CMContent inclusion = (CMContent) decl.getProperty(HTMLCMProperties.INCLUSION);
        if (inclusion != null)
          inclusions.add(inclusion);
      }
    }
View Full Code Here

    Node parent = node.getParentNode();
    if (parent == null || parent.getNodeType() != Node.ELEMENT_NODE)
      return false;

    CMElementDeclaration decl = getElementDeclaration((Element) parent);
    if (decl == null || (!decl.supports(HTMLCMProperties.LINE_BREAK_HINT)))
      return false;
    String hint = (String) decl.getProperty(HTMLCMProperties.LINE_BREAK_HINT);
    return hint.equals(HTMLCMProperties.Values.BREAK_BEFORE_START_AND_AFTER_END);
  }
View Full Code Here

    Node parent = node.getParentNode();
    if (parent == null || parent.getNodeType() != Node.ELEMENT_NODE)
      return false;

    CMElementDeclaration decl = getElementDeclaration((Element) parent);
    if (decl == null || (!decl.supports(HTMLCMProperties.LINE_BREAK_HINT)))
      return false;
    String hint = (String) decl.getProperty(HTMLCMProperties.LINE_BREAK_HINT);
    return hint.equals(HTMLCMProperties.Values.BREAK_BEFORE_START_AND_AFTER_END);
  }
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.