Examples of XSAttributeUse


Examples of org.apache.xerces.xs.XSAttributeUse

            sendElementEvent("psv:attributeUses");
        }
        else {
            sendIndentedElement("psv:attributeUses");
            for (int i = 0; i < uses.getLength(); i++) {
                XSAttributeUse use = (XSAttributeUse)uses.item(i);
                sendIndentedElement("psv:attributeUse");
                sendElementEvent("psv:required", String.valueOf(use.getRequired()));
                processPSVIAttributeDeclarationOrRef(use.getAttrDeclaration());
                processPSVIValueConstraint(use.getConstraintType(), use.getConstraintValue());
                sendUnIndentedElement("psv:attributeUse");
            }
            sendUnIndentedElement("psv:attributeUses");
        }
    }
View Full Code Here

Examples of org.apache.xerces.xs.XSAttributeUse

        XSObjectList attrUseS = fromAttrGrp.getAttributeUses();
        XSAttributeUseImpl  duplicateAttrUse =  null, oneAttrUse = null;
        int attrCount = attrUseS.getLength();
        for (int i=0; i<attrCount; i++) {
            oneAttrUse = (XSAttributeUseImpl)attrUseS.item(i);
            XSAttributeUse existingAttrUse = toAttrGrp.getAttributeUse(oneAttrUse.fAttrDecl.getNamespace(),
                    oneAttrUse.fAttrDecl.getName());
            if (existingAttrUse == null) {
               
                String idName = toAttrGrp.addAttributeUse(oneAttrUse);
                if (idName != null) {
View Full Code Here

Examples of org.apache.xerces.xs.XSAttributeUse

            sendElementEvent("psv:attributeUses");
        }
        else {
            sendIndentedElement("psv:attributeUses");
            for (int i = 0; i < uses.getLength(); i++) {
                XSAttributeUse use = (XSAttributeUse)uses.item(i);
                sendIndentedElement("psv:attributeUse");
                sendElementEvent("psv:required", String.valueOf(use.getRequired()));
                processPSVIAttributeDeclarationOrRef(use.getAttrDeclaration());
                processPSVIValueConstraint(use.getConstraintType(), use.getConstraintValue());
                sendUnIndentedElement("psv:attributeUse");
            }
            sendUnIndentedElement("psv:attributeUses");
        }
    }
View Full Code Here

Examples of org.apache.xerces.xs.XSAttributeUse

         binding.setSchemaBinding(doc);

         XSObjectList attrs = type.getAttributeUses();
         for(int i = 0; i < attrs.getLength(); ++i)
         {
            XSAttributeUse attr = (XSAttributeUse)attrs.item(i);
            bindAttributes(doc, binding, attr);
         }

         // customize binding with xsd annotations
         XSObjectList annotations = type.getAnnotations();
View Full Code Here

Examples of org.apache.xerces.xs.XSAttributeUse

         declareNs(attrs);
      }

      for(int i = 0; i < attributeUses.getLength(); ++i)
      {
         XSAttributeUse attrUse = (XSAttributeUse)attributeUses.item(i);
         XSAttributeDeclaration attrDec = attrUse.getAttrDeclaration();
         Object attrValue = provider.getAttributeValue(stack.peek(), null, attrDec.getNamespace(), attrDec.getName());
         if(attrValue != null)
         {
            attrs.add(attrDec.getNamespace(),
               attrDec.getName(),
View Full Code Here

Examples of org.apache.xerces.xs.XSAttributeUse

      XSObjectList attributeUses = type.getAttributeUses();
      AttributesImpl attrs = attributeUses.getLength() > 0 ? new AttributesImpl(attributeUses.getLength()) : null;
      for (int i = 0; i < attributeUses.getLength(); ++i)
      {
         XSAttributeUse attrUse = (XSAttributeUse)attributeUses.item(i);
         XSAttributeDeclaration attrDec = attrUse.getAttrDeclaration();
         Object attrValue = provider.getAttributeValue(stack.peek(), attrDec.getNamespace(), attrDec.getName());
         if (attrValue != null)
         {
            attrs.add(attrDec.getNamespace(),
               attrDec.getName(),
View Full Code Here

Examples of org.apache.xerces.xs.XSAttributeUse

        nodeTypeDef.setPrimaryItemName(null);

        // Convert attribute uses (<xs:attribute>) to property definitions
        XSObjectList list = ctdef.getAttributeUses();
        for (int i = 0; i < list.getLength(); i++) {
            XSAttributeUse attribUse = (XSAttributeUse) list.item(i);
            PropDef propDef = attributeUseToPropDef(attribUse);
            propDefList.add(propDef);
        }

        // Convert attribute wildcard (<xs:anyattribute>)to residual property
View Full Code Here

Examples of org.apache.xerces.xs.XSAttributeUse

   private void addAttributeMappings(XSObjectList attributes, JavaXmlTypeMapping jxtm)
   {
      for (int i = 0; i < attributes.getLength(); i++)
      {
         XSAttributeUse obj = (XSAttributeUse)attributes.item(i);
         XSAttributeDeclaration att = obj.getAttrDeclaration();
         XSSimpleTypeDefinition simple = att.getTypeDefinition();
         addJavaXMLTypeMap(simple, "none", "", "", jxtm.getJavaWsdlMapping(), true);
         VariableMapping vm = new VariableMapping(jxtm);
         String name = att.getName();
         vm.setXmlAttributeName(name);
View Full Code Here

Examples of org.apache.xerces.xs.XSAttributeUse

        if (attrsPresentMemberRequired) {
            privateImplSourceFile.print("0, ");
        }

        for (int i = 0; i < attributeUses.size(); i++) {
            XSAttributeUse attributeUse = attributeUses.get(i);
            XSSimpleTypeDefinition simpleTypeDefinition = Util.getType(attributeUse);
            Variety variety = Util.findVariety(simpleTypeDefinition);
            if (variety == Variety.ATOMIC) {
                if (Util.hasDefaultValue(attributeUse)) {
                    if (Util.hasFacetEnum(simpleTypeDefinition)) {
                        String constraintValueString = attributeUse.getConstraintValue();
                        List<String> enumValues = Util.stringListToList(simpleTypeDefinition.getLexicalEnumeration());
                        int j = 0;
                        while (j < enumValues.size()) {
                            if (enumValues.get(j).equals(constraintValueString)) {
                                break;
                            }
                            j++;
                        }
                        privateImplSourceFile.print(Util.createEnumValueName(cppEnumOrUnionNameCreator
                                .createEnumTypeName(simpleTypeDefinition, getElementStack()), enumValues, j,
                                simpleTypeDefinition, config));
                    } else {
                        String cppAtomicType = Util.findXSDSimpleTypeString(simpleTypeDefinition, getConfig());
                        String initialize = getConfig().getTypeMapping().get(cppAtomicType).getInitialize();
                        if (initialize != null) {
                            privateImplSourceFile.print(TemplateEngine.fillInInitializationTemplate(initialize,
                                    attributeUse.getConstraintValue()));
                        } else {
                            boolean cppTypeIsString = Util.isStringType(Util.getType(attributeUse), config);
                            if (cppTypeIsString) {
                                privateImplSourceFile.print("(");
                                privateImplSourceFile.print(getConfig().getTypeMapping().get("string")
                                        .getAttrAtomicType());
                                privateImplSourceFile.print(")\"");
                            }
                            privateImplSourceFile.print(attributeUse.getConstraintValue());
                            if (cppTypeIsString)
                                privateImplSourceFile.print("\"");
                        }
                    }

                } else {
                    if (!attributeUse.getRequired()) {
                        System.err.println("optional attribute without default value: " + cppElementName + ", "
                                + Util.getAttributeName(attributeUse, config));
                    }
                    if (Util.hasFacetEnum(simpleTypeDefinition)) {
                        privateImplSourceFile.print(Util.createEnumNotPresentName(cppEnumOrUnionNameCreator
View Full Code Here

Examples of org.apache.xerces.xs.XSAttributeUse

            XSObjectList attributeUses = complexType.getAttributeUses();

            for (int i = 0; i < attributeUses.getLength(); i++) {
                XSObject item = attributeUses.item(i);
                if (item instanceof XSAttributeUse) {
                    XSAttributeUse attrUse = (XSAttributeUse) item;
                    XSSimpleTypeDefinition simpleType = Util.getType(attrUse);
                    createSimpleValidationFunctionName(element2ElementName.get(element).cppElementName, element,
                            simpleType);
                }
            }
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.