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

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


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

    CMGroupImpl content = null;
    CMNode child = null;

    switch (eid) {
      //case Ids.ID_ACTIONLINK :
       
        //content = new CMGroupImpl(CMGroup.SEQUENCE, 0, CMContentImpl.UNBOUNDED);
View Full Code Here


    if (misc == null)
      return;
    String[] names = {CHTMLNamespace.ElementName.META,};
    collection.getDeclarations(misc, Arrays.asList(names).iterator());
    // 2nd, get a title
    CMNode title = collection.getNamedItem(CHTMLNamespace.ElementName.TITLE);
    // 3rd, get a base
    CMNode base = collection.getNamedItem(CHTMLNamespace.ElementName.BASE);
    if (title == null || base == null)
      return;

    // Top level content is a sequence of %head.misc; and A.
    // 0: (%head.misc;, A)
View Full Code Here

 
        CMDocument doc = null;
        CMNamedNodeMap elements = null;
        while (taglibs.hasNext()) {
          doc = (CMDocument) taglibs.next();
          CMNode node = null;
          if ((elements = doc.getElements()) != null && (node = elements.getNamedItem(tagToAdd)) != null && node.getNodeType() == CMNode.ELEMENT_DECLARATION) {
 
            if (node instanceof CMNodeWrapper) {
              node = ((CMNodeWrapper) node).getOriginNode();
            }
            TLDElementDeclaration tldElementDecl = (TLDElementDeclaration) node;
View Full Code Here

      // support.getCMDocuments(customTag.getStartOffset()).iterator();
      CMDocument doc = null;
      CMNamedNodeMap elements = null;
      while (taglibs.hasNext()) {
        doc = (CMDocument) taglibs.next();
        CMNode node = null;
        if ((elements = doc.getElements()) != null && (node = elements.getNamedItem(tagToAdd)) != null && node.getNodeType() == CMNode.ELEMENT_DECLARATION) {

          if (node instanceof CMNodeWrapper) {
            node = ((CMNodeWrapper) node).getOriginNode();
          }
          TLDElementDeclaration tldElementDecl = (TLDElementDeclaration) node;
View Full Code Here

   *            int
   */
  public CMNode item(int index) {
    Iterator iter = iterator();
    while (iter.hasNext()) {
      CMNode node = (CMNode) iter.next();
      if (--index < 0)
        return node;
    }
    return null;
  }
View Full Code Here

      return;

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

      return;

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

    if (group == null)
      return;
    content.appendChild(group);

    // FRAMESET
    CMNode dec = collection.getNamedItem(HTML40Namespace.ElementName.FRAMESET);
    if (dec != null)
      group.appendChild(dec);
    // FRAME
    dec = collection.getNamedItem(HTML40Namespace.ElementName.FRAME);
    if (dec != null)
View Full Code Here

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

    // HEAD
    CMNode edec = collection.getNamedItem(HTML40Namespace.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

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.