Examples of DTDElement


Examples of com.wutka.dtd.DTDElement

            processContainer(dtd, (DTDContainer)item);
         }
         else if(item instanceof DTDName)
         {
            DTDName name = (DTDName)item;
            DTDElement element = (DTDElement)dtd.elements.get(name.value);
            handleChildren(dtd, element, name.getCardinal());
         }
      }
   }
View Full Code Here

Examples of com.wutka.dtd.DTDElement

         ++firstNotStarted;

         while(firstNotStarted < elementStack.size())
         {
            el = (Element)elementStack.get(firstNotStarted++);
            DTDElement notStarted = el.element;

            if(log.isTraceEnabled())
            {
               log.trace("starting skipped> " + notStarted.getName());
            }

            content.startElement("", notStarted.getName(), notStarted.getName(), null);
            el.started = true;
         }
      }
   }
View Full Code Here

Examples of com.wutka.dtd.DTDElement

      DTDParser parser = new DTDParser(in);
      DTD dtd = parser.parse();
      Object[] obj = dtd.getItems();
      for (int i = 0; i < obj.length; i++) {
        if (obj[i] instanceof DTDElement) {
          DTDElement element = (DTDElement) obj[i];
          String name = element.getName();
          DTDItem item = element.getContent();
          boolean hasBody = true;
          if (item instanceof DTDEmpty) {
            hasBody = false;
          }
          TagInfo tagInfo = new TagInfo(name, hasBody);
          Iterator ite = element.attributes.keySet().iterator();

          // set child tags
          if (item instanceof DTDSequence) {
            DTDSequence seq = (DTDSequence) item;
            setChildTagName(tagInfo, seq.getItem());
          }
          else if (item instanceof DTDMixed) {
            // #PCDATA
          }

          while (ite.hasNext()) {
            String attrName = (String) ite.next();
            DTDAttribute attr = element.getAttribute(attrName);

            DTDDecl decl = attr.getDecl();
            boolean required = false;
            if (decl == DTDDecl.REQUIRED) {
              required = true;
View Full Code Here

Examples of com.wutka.dtd.DTDElement

              DTDParser parser = new DTDParser(reader);
              DTD dtd = parser.parse();
              Object[] obj = dtd.getItems();
              for(int i=0;i<obj.length;i++){
                if(obj[i] instanceof DTDElement){
                  DTDElement element = (DTDElement)obj[i];
                  String name = element.getName();
                  comboDocumentRoot.add(name);
                }
              }
              comboDocumentRoot.select(0);
            }
          }
          if(getUseXSD()){
            // Load elements from XML Schema
            comboDocumentRoot.removeAll();
            DTDResolver resolver = new DTDResolver(new IDTDResolver[0],
                page1.getFile().getLocation().makeAbsolute().toFile().getParentFile());
            InputStream in = resolver.getInputStream(getSchemaURI());
            if(in!=null){
              SchemaGrammar grammer = (SchemaGrammar)new XMLSchemaLoader().loadGrammar(
                  new XMLInputSource(null,null,null,in,null));
              XSNamedMap map = grammer.getComponents(XSConstants.ELEMENT_DECLARATION);
              for(int i=0;i<map.getLength();i++){
                XSElementDeclaration element = (XSElementDeclaration)map.item(i);
                comboDocumentRoot.add(element.getName());
              }
            }
          }
        } catch(Exception ex){
          HTMLPlugin.openAlertDialog(ex.toString());
View Full Code Here

Examples of com.wutka.dtd.DTDElement

   
    @SuppressWarnings("unchecked")
    Enumeration<DTDElement> elements = dtd.elements.elements();
   
    while(elements.hasMoreElements()) {
      DTDElement element = elements.nextElement();
     
      definition.addElement(fromWutka(element));
    }
   
    return definition;
View Full Code Here

Examples of com.wutka.dtd.DTDElement

         if(removeLast)
         {
            Element el = (Element)elementStack.remove(elementStack.size() - 1);
            if(el.started)
            {
               DTDElement started = el.element;
               content.endElement("", started.getName(), started.getName());
            }
         }
      }
   }
View Full Code Here

Examples of com.wutka.dtd.DTDElement

            processContainer(dtd, (DTDContainer)item);
         }
         else if(item instanceof DTDName)
         {
            DTDName name = (DTDName)item;
            DTDElement element = (DTDElement)dtd.elements.get(name.value);
            handleChildren(dtd, element, name.getCardinal());
         }
      }
   }
View Full Code Here

Examples of com.wutka.dtd.DTDElement

         ++firstNotStarted;

         while(firstNotStarted < elementStack.size())
         {
            el = (Element)elementStack.get(firstNotStarted++);
            DTDElement notStarted = el.element;

            if(log.isTraceEnabled())
            {
               log.trace("starting skipped> " + notStarted.getName());
            }

            content.startElement("", notStarted.getName(), notStarted.getName(), null);
            el.started = true;
         }
      }
   }
View Full Code Here

Examples of com.wutka.dtd.DTDElement

   {
      Hashtable roots = new Hashtable();
      Enumeration e = dtd.elements.elements();
      while(e.hasMoreElements())
      {
         DTDElement element = (DTDElement)e.nextElement();
         roots.put(element.name, element);
      }

      e = dtd.elements.elements();
      while(e.hasMoreElements())
      {
         DTDElement element = (DTDElement)e.nextElement();
         if(!(element.content instanceof DTDContainer))
         {
            continue;
         }
View Full Code Here

Examples of com.wutka.dtd.DTDElement

/* 367 */       if (removeLast)
/*     */       {
/* 369 */         Element el = (Element)this.elementStack.remove(this.elementStack.size() - 1);
/* 370 */         if (el.started)
/*     */         {
/* 372 */           DTDElement started = el.element;
/* 373 */           this.content.endElement("", started.getName(), started.getName());
/*     */         }
/*     */       }
/*     */     }
/*     */   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.