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

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


    if (collection == null)
      return;

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


    if (blocks == null)
      return;
    collection.getBlock(blocks);
    content.appendChild(blocks);
    // AREA
    CMNode area = collection.getNamedItem(HTML40Namespace.ElementName.AREA);
    if (area != null)
      content.appendChild(area);
  }
View Full Code Here

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

    exclusion = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
    CMNode node = elementCollection.getNamedItem(HTML50Namespace.ElementName.HEADER);
    if (node != null)
      exclusion.appendChild(node);
    node = elementCollection.getNamedItem(HTML50Namespace.ElementName.FOOTER);
    if (node != null)
      exclusion.appendChild(node);
View Full Code Here

      return;

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

    if (rtrpgroup == null)
      return;
    content.appendChild(rtrpgroup);
   
    //RT
    CMNode dec = collection.getNamedItem(HTML50Namespace.ElementName.RT);
    if (dec != null)
      rtrpgroup.appendChild(dec);
   
    CMGroupImpl rpgroup = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
    if (rpgroup == null)
View Full Code Here

      if (fDefaultValueLookups == null)
        fDefaultValueLookups = new Stack();
      fDefaultValueLookups.push(name);
      CMNamedNodeMap map = ((DocumentImpl) getOwnerDocument()).getCMAttributes(this);
      if (map != null) {
        CMNode attribute = map.getNamedItem(name);
        if (attribute instanceof CMAttributeDeclaration)
          return ((CMAttributeDeclaration) attribute).getAttrType().getImpliedValue();
      }
      return unknownDefault;
    }
View Full Code Here

              (Element) node, elementDecl, ModelQuery.INCLUDE_ALL);
          Iterator nodeIterator = additionalElements.iterator();
         
          //check each suggestion
          while (nodeIterator.hasNext()) {
            CMNode additionalElementDecl = (CMNode) nodeIterator.next();
            if (additionalElementDecl != null && additionalElementDecl instanceof CMElementDeclaration &&
                validModelQueryNode(additionalElementDecl)) {
              CMElementDeclaration ed = (CMElementDeclaration) additionalElementDecl;
              // https://bugs.eclipse.org/bugs/show_bug.cgi?id=89811
              StringBuffer sb = new StringBuffer();
View Full Code Here

    {
        final Map<String, TLDTagAttribute> attributes = new HashMap<String, TLDTagAttribute>();
       
        for (int i = 0; i < _tldElement.getAttributes().getLength(); i++)
        {
            CMNode item = _tldElement.getAttributes().item(i);
            if (item instanceof TLDAttributeDeclaration)
            {
                TLDTagAttribute attr = new TLDTagAttribute((TLDAttributeDeclaration) item);
                attributes.put(attr.getName(), attr);
            }
View Full Code Here

    if (node instanceof Element) {
      Element xmlElement = (Element) node;
      ModelQuery mq = ModelQueryUtil.getModelQuery(xmlElement.getOwnerDocument());
      CMElementDeclaration decl = mq.getCMElementDeclaration(xmlElement);
      if (decl instanceof CMNodeWrapper) {
        CMNode cmNode = ((CMNodeWrapper) decl).getOriginNode();
        return cmNode instanceof TLDElementDeclaration;
      }
    }
    return false;
  }
View Full Code Here

      boolean isSimpleChoice = isSimpleChoiceGroupContentModel(ed);
    
      for (Iterator i = availableChildNodeList.iterator(); i.hasNext(); )
      {
        CMNode cmNode = (CMNode)i.next();     
        if (isSimpleChoice || modelQuery.canInsert(parent, ed, cmNode, index, validityChecking, contentSpecificationList))
        {
          Action action = new Action(ModelQueryAction.INSERT, parent, cmNode, index, index);
          actionList.add(action);
        }
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.