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

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


      return;

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


  CMGroupImpl createContent(int eid) {
    if (eid == ID_UNKNOWN)
      return null;

    CMGroupImpl content = null;
    CMNode child = null;

    switch (eid) {
      case Ids.ID_ROOT :
        content = new CMGroupImpl(CMGroup.CHOICE, 0, CMContentImpl.UNBOUNDED);
        int validChildren[] = {
View Full Code Here

        if (modelQueryNodes == null)
          modelQueryNodes = ModelQueryUtil.getModelQuery(target.getOwnerDocument()).getAvailableContent((Element) node, edec, ModelQuery.INCLUDE_ATTRIBUTES);
       
       
        for (int k = 0; k < modelQueryNodes.size(); k++) {
          CMNode cmnode = (CMNode) modelQueryNodes.get(k);
          if (cmnode.getNodeType() == CMNode.ATTRIBUTE_DECLARATION && cmnode.getNodeName().toLowerCase(Locale.US).equals(attrName)) {
            adec = (CMAttributeDeclaration) cmnode;
            break;
          }
        }
      }
View Full Code Here

      return;

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

      case CMNode.ELEMENT_DECLARATION :
        return isSameDeclaration((CMElementDeclaration) content, target);
      case CMNode.GROUP :
        CMNodeList children = ((CMGroup) content).getChildNodes();
        for (int i = 0; i < children.getLength(); i++) {
          CMNode child = children.item(i);
          switch (child.getNodeType()) {
            case CMNode.ELEMENT_DECLARATION :
              if (isSameDeclaration((CMElementDeclaration) child, target))
                return true;
              continue; // Go next child.
            case CMNode.GROUP :
View Full Code Here

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

    exclusion = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
    CMNode time = elementCollection.getNamedItem(HTML50Namespace.ElementName.TIME);
    if (time != null)
      exclusion.appendChild(time);

    return exclusion;
  }
View Full Code Here

    attributes = new CMNamedNodeMapImpl();

    // %attrs;
    attributeCollection.getAttrs(attributes);

    CMNode node = attributeCollection.getDeclaration(HTML50Namespace.ATTR_NAME_OPEN);
    if (node != null)
      attributes.putNamedItem(HTML50Namespace.ATTR_NAME_OPEN, node);
  }
View Full Code Here

      return;

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

    CMGroupImpl wrap = new CMGroupImpl(CMGroup.SEQUENCE, 0, 1);
    if (wrap == null)
      return;
    content.appendChild(wrap);
    //     CAPTION
    CMNode dec = collection.getNamedItem(HTML40Namespace.ElementName.CAPTION);
    if (dec != null)
      wrap.appendChild(dec);

    // ((COL)* | (COLGROUP)*)
    //     ( | )
View Full Code Here

  /**
   * Get a global attribute declaration.
   * @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

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.