XmlSchemaAttribute attr = new XmlSchemaAttribute();
XmlSchemaAttribute attr = new XmlSchemaAttribute();
XmlSchemaAttribute attr = new XmlSchemaAttribute();
/** * Adds the given parameter to the complex type. * @param complexType The complex type which the attribute will be added to * @param name The name of the attribute * @param xsdType The type of the attribute */ @SuppressWarnings("unchecked") private static void addAttributeToComplexType(XmlSchemaComplexType complexType, String name, QName xsdType) { XmlSchemaAttribute attr = new XmlSchemaAttribute(); attr.setName(name); attr.setSchemaTypeName(xsdType); attr.setUse(new XmlSchemaUse("optional")); XmlSchemaAttribute tmpAttr; for (Iterator<XmlSchemaAttribute> itr = complexType.getAttributes().getIterator(); itr.hasNext();) { tmpAttr = itr.next(); if (tmpAttr.getName().equals(attr.getName())) { /* current attribute is already set, nothing more to do */ return; } } complexType.getAttributes().add(attr); }
if (asBoolean(xmlFacets.getAttribute(), false)) final XmlSchemaAttribute xmlSchemaAttribute = new XmlSchemaAttribute(schema, false); xmlSchemaAttribute.setName(name); final XmlSchemaType visit = valueResolvedType.visit(this);
if (asBoolean(xmlFacets.getAttribute(), false)) final XmlSchemaAttribute xmlSchemaAttribute = new XmlSchemaAttribute(schema, false); xmlSchemaAttribute.setName(name); final XmlSchemaType visit = valueResolvedType.visit(this);
XmlSchemaAttribute attribute = new XmlSchemaAttribute(root, false); complex.getAttributes().add(attribute); attribute.setName(name.getLocalPart());
XmlSchemaAttribute attribute = new XmlSchemaAttribute(root, false); complex.getAttributes().add(attribute); attribute.setName(name.getLocalPart());