Package com.skaringa.javaxml.handler

Examples of com.skaringa.javaxml.handler.AttrImpl.addAttribute()


    output.startDocument();
    output.startElement("xsd:schema");

    AttrImpl attr = new AttrImpl();
    attr.addAttribute("name", ser.getXMLTypeName());
    attr.addAttribute("type", ser.getXMLTypeName());
    attr.addAttribute("nillable", "true");
    output.startElement("xsd:element", attr);
    output.endElement("xsd:element");
View Full Code Here


    output.startDocument();
    output.startElement("xsd:schema");

    AttrImpl attr = new AttrImpl();
    attr.addAttribute("name", ser.getXMLTypeName());
    attr.addAttribute("type", ser.getXMLTypeName());
    attr.addAttribute("nillable", "true");
    output.startElement("xsd:element", attr);
    output.endElement("xsd:element");

    // get and document all used classes
View Full Code Here

    output.startElement("xsd:schema");

    AttrImpl attr = new AttrImpl();
    attr.addAttribute("name", ser.getXMLTypeName());
    attr.addAttribute("type", ser.getXMLTypeName());
    attr.addAttribute("nillable", "true");
    output.startElement("xsd:element", attr);
    output.endElement("xsd:element");

    // get and document all used classes
    _dependendClasses.add(type);
View Full Code Here

          id = new Integer(objectIdMap.size());
          objectIdMap.put(obj, id);
          obj = writeReplaceObject(obj);
        }

        attrs.addAttribute(isIdRef ? "reference" : "id", new StringBuffer("i")
            .append(id).toString());
      }
    }
    if (!omitXsi) {
      attrs.addAttribute(NSConstants.SCHEMA_INSTANCE_NS_NAME,
View Full Code Here

        attrs.addAttribute(isIdRef ? "reference" : "id", new StringBuffer("i")
            .append(id).toString());
      }
    }
    if (!omitXsi) {
      attrs.addAttribute(NSConstants.SCHEMA_INSTANCE_NS_NAME,
          NSConstants.SCHEMA_INSTANCE_NS_PREFIX, "type", _xmlTypeName);
    }
    if (obj == null && !omitNil) {
      attrs.addAttribute(NSConstants.SCHEMA_INSTANCE_NS_NAME,
          NSConstants.SCHEMA_INSTANCE_NS_PREFIX, "nil", "true");
View Full Code Here

    if (!omitXsi) {
      attrs.addAttribute(NSConstants.SCHEMA_INSTANCE_NS_NAME,
          NSConstants.SCHEMA_INSTANCE_NS_PREFIX, "type", _xmlTypeName);
    }
    if (obj == null && !omitNil) {
      attrs.addAttribute(NSConstants.SCHEMA_INSTANCE_NS_NAME,
          NSConstants.SCHEMA_INSTANCE_NS_PREFIX, "nil", "true");
    }

    output.startElement(name, attrs);
View Full Code Here

   */
  public void writeXMLTypeDefinition(Class type, Map propertyMap,
      DocumentOutputHandlerInterface output) throws SerializerException {

    AttrImpl attrs = new AttrImpl();
    attrs.addAttribute("name", _xmlTypeName);
    output.startElement("xsd:complexType", attrs);
    processExtensionType(type, propertyMap, output);
    output.endElement("xsd:complexType");
  }

View Full Code Here

      ComponentSerializer ser = SerializerRegistry.getInstance().getSerializer(
          superclass);

      AttrImpl attrs = new AttrImpl();
      attrs.addAttribute("base", ser.getXMLTypeName());
      output.startElement("xsd:extension", attrs);

      processFieldTypes(type, propertyMap, output);

      output.endElement("xsd:extension");
View Full Code Here

      output.endElement("xsd:complexContent");
    } else {
      // it must be java.lang.Object!
      // provide the attributes id and reference
      AttrImpl attrs = new AttrImpl();
      attrs.addAttribute("name", "id");
      attrs.addAttribute("type", "xsd:ID");
      output.startElement("xsd:attribute", attrs);
      output.endElement("xsd:attribute");

      attrs = new AttrImpl();
View Full Code Here

    } else {
      // it must be java.lang.Object!
      // provide the attributes id and reference
      AttrImpl attrs = new AttrImpl();
      attrs.addAttribute("name", "id");
      attrs.addAttribute("type", "xsd:ID");
      output.startElement("xsd:attribute", attrs);
      output.endElement("xsd:attribute");

      attrs = new AttrImpl();
      attrs.addAttribute("name", "reference");
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.