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

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


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

    exclusion = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
    CMNode form = elementCollection.getNamedItem(CHTMLNamespace.ElementName.FORM);
    if (form != null)
      exclusion.appendChild(form);

    return exclusion;
  }
View Full Code Here


      return;

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

    content = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
    if (content == null)
      return;

    // HEAD
    CMNode edec = collection.getNamedItem(CHTMLNamespace.ElementName.HEAD);
    if (edec != null)
      content.appendChild(edec);

    // ( | )
    CMGroupImpl group = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
View Full Code Here

   */
  public CMNamedNodeMap getDeclarations(String[] names) {
    CMNamedNodeMapImpl map = new CMNamedNodeMapImpl();
    for (int i = 0; i < names.length; i++) {
      String name = names[i];
      CMNode node = getNamedItem(name);
      if (node == null)
        continue;
      map.putNamedItem(name, node);
    }
    return map;
View Full Code Here

  }

  public void getDeclarations(CMGroupImpl group, Iterator names) {
    while (names.hasNext()) {
      String entityName = (String) names.next();
      CMNode dec = getNamedItem(entityName);
      if (dec != null)
        group.appendChild(dec);
    }
  }
View Full Code Here

   *            int
   */
  public CMNode item(int index) {
    if (!isValidID(index))
      return null;
    CMNode decl = fDecls[index];
    if (decl != null)
      return decl; // already exist.

    decl = create(getName(index));
    fDecls[index] = decl;
View Full Code Here

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

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

    return exclusion;
  }
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 (collection == null)
      return;

    // (LI)+
    content = new CMGroupImpl(CMGroup.SEQUENCE, 1, CMContentImpl.UNBOUNDED);
    CMNode li = collection.getNamedItem(CHTMLNamespace.ElementName.LI);
    if (li != null)
      content.appendChild(li);
  }
View Full Code Here

    CMGroupImpl group1 = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
    if (group1 != null){
      content.appendChild(group1);
    }
    // FIGCAPTION, FLOW
    CMNode dec = collection.getNamedItem(HTML50Namespace.ElementName.FIGCAPTION);
    if (dec != null)
      group1.appendChild(dec);
    CMGroupImpl flowgroup = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
    group1.appendChild(flowgroup);
    collection.getFlow(flowgroup);
   
    CMGroupImpl group2 = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
    if (group2 != null){
      content.appendChild(group2);
    }
    // FLOW , FIGCAPTION
    CMGroupImpl flowgroup2 = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
    group2.appendChild(flowgroup2);
    collection.getFlow(flowgroup2);
    CMNode dec1 = collection.getNamedItem(HTML50Namespace.ElementName.FIGCAPTION);
    if (dec1 != null)
      group2.appendChild(dec1);
    //FLOW
    CMGroupImpl group3 = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
    if (group3 != 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.