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

Examples of org.eclipse.wst.xml.core.internal.contentmodel.CMNode


    content = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
    // #PCDATA
    // ...??

    // LEGEND
    CMNode dec = collection.getNamedItem(HTML40Namespace.ElementName.LEGEND);
    if (dec != null)
      content.appendChild(dec);
    // (%flow;)*
    CMGroupImpl flows = new CMGroupImpl(CMGroup.CHOICE, 0, CMContentImpl.UNBOUNDED);
    if (flows == null)
View Full Code Here


      return;

    // ( | )+
    content = new CMGroupImpl(CMGroup.CHOICE, 1, CMContentImpl.UNBOUNDED);
    // DT
    CMNode dec = collection.getNamedItem(CHTMLNamespace.ElementName.DT);
    if (dec != null)
      content.appendChild(dec);
    // DD
    dec = collection.getNamedItem(CHTMLNamespace.ElementName.DD);
    if (dec != null)
View Full Code Here

      return exclusion; // already created.
    if (elementCollection == null)
      return null;

    exclusion = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
    CMNode label = elementCollection.getNamedItem(HTML40Namespace.ElementName.LABEL);
    if (label != null)
      exclusion.appendChild(label);

    return exclusion;
  }
View Full Code Here

      return exclusion;
    if (elementCollection == null)
      return null;

    exclusion = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
    CMNode progress = elementCollection.getNamedItem(HTML50Namespace.ElementName.PROGRESS);
    if (progress != null) {
      exclusion.appendChild(progress);
    }
    return exclusion;
  }
View Full Code Here

          CMNamedNodeMap cmAttributes = null;

          CMNamedNodeMapImpl allAttributes = new CMNamedNodeMapImpl();
          List nodes = query.getAvailableContent(element, cmElement, ModelQuery.INCLUDE_ATTRIBUTES);
          for (int k = 0; k < nodes.size(); k++) {
            CMNode cmnode = (CMNode) nodes.get(k);
            if (cmnode.getNodeType() == CMNode.ATTRIBUTE_DECLARATION) {
              allAttributes.put(cmnode);
            }
          }
          cmAttributes = allAttributes;
View Full Code Here

   *
   * @param attrName
   *            java.lang.String
   */
  public HTMLAttributeDeclaration getDeclaration(String attrName) {
    CMNode cmnode = getNamedItem(attrName);
    if (cmnode != null)
      return (HTMLAttributeDeclaration) cmnode; // already exists.

    HTMLAttrDeclImpl dec = create(attrName);
    if (dec != null)
View Full Code Here

  /**
   * @param element
   * @return the TLDElementDeclaration for element or null if not found
   */
  public static TLDElementDeclaration getTLDElementDeclaration(Element element) {
    CMNode decl = getElementDeclaration(element);
    if (decl instanceof CMNodeWrapper) {
      decl = ((CMNodeWrapper) decl).getOriginNode();
    }
    if (decl instanceof TLDElementDeclaration) {
      return (TLDElementDeclaration) decl;
View Full Code Here

      return;

    // ( )
    content = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
    // BODY
    CMNode dec = collection.getNamedItem(HTML40Namespace.ElementName.BODY);
    if (dec != null)
      content.appendChild(dec);
  }
View Full Code Here

   * elements in doc @param doc
   */
  protected void addBlockMarkers(CMDocument doc) {
    if (doc.getElements().getLength() > 0) {
      Iterator elements = doc.getElements().iterator();
      CMNode node = null;
      while (elements.hasNext()) {
        node = (CMNode) elements.next();
        getBlockMarkers().add(new BlockMarker(node.getNodeName(), null, DOMJSPRegionContexts.JSP_CONTENT, true));
      }
    }
  }
View Full Code Here

   * elements in doc @param doc
   */
  protected void addBlockMarkers(String prefix, CMDocument doc) {
    if (doc.getElements().getLength() > 0) {
      Iterator elements = doc.getElements().iterator();
      CMNode node = null;
      while (elements.hasNext()) {
        node = (CMNode) elements.next();
        if (node instanceof TLDElementDeclaration && ((TLDElementDeclaration) node).getBodycontent().equals(JSP12TLDNames.CONTENT_TAGDEPENDENT))
          getBlockMarkers().add(new BlockMarker(prefix + node.getNodeName(), null, DOMRegionContext.BLOCK_TEXT, true));
        else
          getBlockMarkers().add(new BlockMarker(prefix + node.getNodeName(), null, DOMJSPRegionContexts.JSP_CONTENT, true));
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.wst.xml.core.internal.contentmodel.CMNode

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.