Examples of DTDAttribute


Examples of com.wutka.dtd.DTDAttribute

        if (defaultAttributes == null) return;
        DTDAttlist attList = (DTDAttlist) defaultAttributes.get(elementName);
        if (elementName == null || attList == null) return;
        DTDAttribute[] atts = attList.getAttribute();
        for (int i=0; i < atts.length; i++) {
            DTDAttribute att = atts[i];
            if (att.getDefaultValue() != null) {
                boolean found = false;
                int count = attributeCount;
                for (int j=0; j < count; j++) {
                    if (attributeName[j].equals(att.getName())) {
                        found = true;
                        break;
                    }
                }
                if (!found) {
                    attributeCount++;
                    ensureAttributesCapacity(attributeCount);
                    attributePrefix[attributeCount-1] = "";
                    attributeUri[attributeCount-1]="";
                    attributeName[attributeCount-1] = att.getName();
                    attributeValue[attributeCount-1] = att.getDefaultValue();
                }
            }
        }
    }
View Full Code Here

Examples of com.wutka.dtd.DTDAttribute

            e = v.elements();
            while(e.hasMoreElements()) {
                DTDAttlist list = (DTDAttlist) e.nextElement();
                DTDAttribute[] atts = list.getAttribute();
                for (int i=0; i < atts.length; i++) {
                    DTDAttribute att = atts[i];
                    if (att.getDefaultValue() != null) {
                        if (defaultAttributes == null)
                            defaultAttributes = new HashMap();
                        defaultAttributes.put(list.getName(), list);
                    }
                }
View Full Code Here

Examples of com.wutka.dtd.DTDAttribute

            // #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;
            }
           
            AttributeInfo attrInfo = new AttributeInfo(attrName,true,AttributeInfo.NONE,required);
            tagInfo.addAttributeInfo(attrInfo);
           
            Object attrType = attr.getType();
            if(attrType instanceof DTDEnumeration){
              DTDEnumeration dtdEnum = (DTDEnumeration)attrType;
              String[] items = dtdEnum.getItems();
              for(int j=0;j<items.length;j++){
                attrInfo.addValue(items[j]);
View Full Code Here

Examples of com.wutka.dtd.DTDAttribute

      final Hashtable attributes = element.attributes;
      AttributesImpl attrs = new AttributesImpl(attributes.size());

      for(Iterator attrIter = attributes.values().iterator(); attrIter.hasNext();)
      {
         DTDAttribute attr = (DTDAttribute)attrIter.next();
         final Object attrValue = provider.getAttributeValue(container, null, systemId, attr.getName());

         if(attrValue != null)
         {
            attrs.add(systemId,
               attr.getName(),
               attr.getName(),
               attr.getType().toString(),
               attrValue.toString()
            );
         }
      }
View Full Code Here

Examples of com.wutka.dtd.DTDAttribute

      final Hashtable attributes = element.attributes;
      AttributesImpl attrs = new AttributesImpl(attributes.size());

      for(Iterator attrIter = attributes.values().iterator(); attrIter.hasNext();)
      {
         DTDAttribute attr = (DTDAttribute)attrIter.next();
         final Object attrValue = provider.getAttributeValue(container, systemId, attr.getName());

         if(attrValue != null)
         {
            attrs.add(systemId,
               attr.getName(),
               attr.getName(),
               attr.getType().toString(),
               attrValue.toString()
            );
         }
      }
View Full Code Here

Examples of com.wutka.dtd.DTDAttribute

            // #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;
            }

            AttributeInfo attrInfo = new AttributeInfo(attrName, true, AttributeInfo.NONE, required);
            tagInfo.addAttributeInfo(attrInfo);

            Object attrType = attr.getType();
            if (attrType instanceof DTDEnumeration) {
              DTDEnumeration dtdEnum = (DTDEnumeration) attrType;
              String[] items = dtdEnum.getItems();
              for (int j = 0; j < items.length; j++) {
                attrInfo.addValue(items[j]);
View Full Code Here

Examples of com.wutka.dtd.DTDAttribute

      final Hashtable attributes = element.attributes;
      AttributesImpl attrs = new AttributesImpl(attributes.size());

      for(Iterator attrIter = attributes.values().iterator(); attrIter.hasNext();)
      {
         DTDAttribute attr = (DTDAttribute)attrIter.next();
         final Object attrValue = provider.getAttributeValue(container, null, systemId, attr.getName());

         if(attrValue != null)
         {
            attrs.add(systemId,
               attr.getName(),
               attr.getName(),
               attr.getType().toString(),
               attrValue.toString()
            );
         }
      }
View Full Code Here

Examples of com.wutka.dtd.DTDAttribute

/* 430 */     Hashtable attributes = element.attributes;
/* 431 */     AttributesImpl attrs = new AttributesImpl(attributes.size());
/*     */
/* 433 */     for (Iterator attrIter = attributes.values().iterator(); attrIter.hasNext(); )
/*     */     {
/* 435 */       DTDAttribute attr = (DTDAttribute)attrIter.next();
/* 436 */       Object attrValue = this.provider.getAttributeValue(container, null, this.systemId, attr.getName());
/*     */
/* 438 */       if (attrValue != null)
/*     */       {
/* 440 */         attrs.add(this.systemId, attr.getName(), attr.getName(), attr.getType().toString(), attrValue.toString());
/*     */       }
/*     */
/*     */     }
/*     */
/* 449 */     return attrs;
View Full Code Here

Examples of com.wutka.dtd.DTDAttribute

      final Hashtable<?, ?> attributes = element.attributes;
      AttributesImpl attrs = new AttributesImpl(attributes.size());

      for(Iterator<?> attrIter = attributes.values().iterator(); attrIter.hasNext();)
      {
         DTDAttribute attr = (DTDAttribute)attrIter.next();
         final Object attrValue = provider.getAttributeValue(container, null, systemId, attr.getName());

         if(attrValue != null)
         {
            attrs.add(systemId,
               attr.getName(),
               attr.getName(),
               attr.getType().toString(),
               attrValue.toString()
            );
         }
      }
View Full Code Here

Examples of com.wutka.dtd.DTDAttribute

        if (defaultAttributes == null) return;
        DTDAttlist attList = (DTDAttlist) defaultAttributes.get(elementName);
        if (elementName == null || attList == null) return;
        DTDAttribute[] atts = attList.getAttribute();
        for (int i=0; i < atts.length; i++) {
            DTDAttribute att = atts[i];
            if (att.getDefaultValue() != null) {
                boolean found = false;
                int count = attributeCount;
                for (int j=0; j < count; j++) {
                    if (attributeName[j].equals(att.getName())) {
                        found = true;
                        break;
                    }
                }
                if (!found) {
                    attributeCount++;
                    ensureAttributesCapacity(attributeCount);
                    attributePrefix[attributeCount-1] = null;
                    attributeUri[attributeCount-1] = NO_NAMESPACE;
                    attributeName[attributeCount-1] = att.getName();
                    attributeValue[attributeCount-1] = att.getDefaultValue();
                }
            }
        }
    }
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.