Package org.apache.ws.jaxme.xs.xml

Examples of org.apache.ws.jaxme.xs.xml.XsNCName


    /** Creates a new attribute.
     */
    protected void createAttribute(XsGAttrDecls pAttrDecls, DTDAttribute pAttribute)
            throws SAXException {
        XsTAttribute attr = pAttrDecls.createAttribute();
        attr.setName(new XsNCName(getLocalPart(pAttribute.getName())));
        String type = pAttribute.getType();
        XsQName qName;
        if ("CDATA".equals(type)) {
          qName = XSString.getInstance().getName();
        } else if ("ID".equals(type)) {
View Full Code Here


                                               String pModel,
                                               DTDAttribute[] pAttributes,
                                               Locator pLocator)
            throws SAXException {
        XsTTopLevelElement result = pSchema.createElement();
        result.setName(new XsNCName(getLocalPart(pName)));
        XsGAttrDecls attrDecls;
        if ("EMPTY".equals(pModel)) {
          attrDecls = result.createComplexType();
        } else if ("ANY".equals(pModel)) {
            XsQName qName = XSAnyType.getInstance().getName();
View Full Code Here

          }
        }
      }
     
      XsTNamedGroup namedGroup = object.getObjectFactory().newXsTNamedGroup(syntaxSchema);
      namedGroup.setName(new XsNCName(suggestion.getLocalName()));
      XsTSimpleExplicitGroup choice = namedGroup.createChoice();
      XSElement[] members = group.getMembers();
      for (int j = 0;  j < members.length;  j++) {
        XSElement member = members[j];
        XsTLocalElement memberElement = choice.createElement();
View Full Code Here

    super(pParent, pBaseAttribute);
    if (isReference()) {
      this.name = pBaseAttribute.getRef();
      isGlobal = pBaseAttribute.isGlobal();
    } else {
      XsNCName myName = pBaseAttribute.getName();
      if (myName == null) {
        throw new LocSAXException("Invalid attribute: Neither of its 'name' or 'ref' attributes are set.",
                                     pBaseAttribute.getLocator());
      }
      XsESchema schema = pBaseAttribute.getXsESchema();
      XsAnyURI namespace;
      String namespacePrefix;
      boolean qualified = isGlobal = pBaseAttribute.isGlobal();
      if (!qualified) {
        XsFormChoice form = pBaseAttribute.getForm();
        if (form == null) {
          form = schema.getAttributeFormDefault();
        }
        qualified = XsFormChoice.QUALIFIED.equals(form);
      }
      if (qualified) {
        namespace = schema.getTargetNamespace();
        namespacePrefix = schema.getTargetNamespacePrefix();
      } else {
        namespace = null;
        namespacePrefix = null;
      }
      this.name = new XsQName(namespace, myName.toString(), namespacePrefix);
    }

    xsAnnotation = pBaseAttribute.getAnnotation();
  }
View Full Code Here

    super(pParent, pBaseGroup);
    XsQName qName;
    if (isReference()) {
      qName = getXsTAttributeGroup().getRef();
    } else {
      XsNCName myName = pBaseGroup.getName();
      if (myName == null) {
        throw new LocSAXException("Invalid attribute group: Neither of its 'name' or 'ref' attributes are set.",
                                     pBaseGroup.getLocator());
      } else {
        XsESchema schema = pBaseGroup.getXsESchema();
        qName = new XsQName(schema.getTargetNamespace(), myName.toString(), schema.getTargetNamespacePrefix());
      }
    }
    name = qName;
  }
View Full Code Here

    super(pParent, pBaseElement);
    XsQName qName;
    if (isReference()) {
      qName = pBaseElement.getRef();
    } else {
      XsNCName myName = pBaseElement.getName();
      if (myName == null) {
        throw new LocSAXException("Invalid element: Must have either of its 'ref' or 'name' attributes set.",
                                     getLocator());
      }
      XsESchema schema = pBaseElement.getXsESchema();

      XsAnyURI namespace;
      String namespacePrefix;
      boolean qualified = pBaseElement.isGlobal();
      if (!qualified) {
        XsFormChoice form = pBaseElement.getForm();
        if (form == null) {
          form = schema.getElementFormDefault();
        }
        qualified = XsFormChoice.QUALIFIED.equals(form);
      }
      if (qualified) {
        namespace = schema.getTargetNamespace();
        namespacePrefix = schema.getTargetNamespacePrefix();
      } else {
        namespace = null;
        namespacePrefix = null;
      }
      qName = new XsQName(namespace, myName.toString(), namespacePrefix);
    }
    name = qName;
    xsAnnotation = pBaseElement.getAnnotation();
    isGlobal = pBaseElement instanceof XsTTopLevelElement;
  }
View Full Code Here

          }
        }
      }

      XsTNamedGroup namedGroup = object.getObjectFactory().newXsTNamedGroup(syntaxSchema);
      namedGroup.setName(new XsNCName(suggestion.getLocalName()));
      XsTSimpleExplicitGroup choice = namedGroup.createChoice();
      XSElement[] members = group.getMembers();
      for (int j = 0;  j < members.length;  j++) {
        XSElement member = members[j];
        XsTLocalElement memberElement = choice.createElement();
View Full Code Here

          }
        }
      }

      XsTNamedGroup namedGroup = object.getObjectFactory().newXsTNamedGroup(syntaxSchema);
      namedGroup.setName(new XsNCName(suggestion.getLocalName()));
      XsTSimpleExplicitGroup choice = namedGroup.createChoice();
      XSElement[] members = group.getMembers();
      for (int j = 0;  j < members.length;  j++) {
        XSElement member = members[j];
        XsTLocalElement memberElement = choice.createElement();
View Full Code Here

    super(pParent, pBaseAttribute);
    if (isReference()) {
      this.name = pBaseAttribute.getRef();
      isGlobal = pBaseAttribute.isGlobal();
    } else {
      XsNCName myName = pBaseAttribute.getName();
      if (myName == null) {
        throw new LocSAXException("Invalid attribute: Neither of its 'name' or 'ref' attributes are set.",
                                     pBaseAttribute.getLocator());
      }
      XsESchema schema = pBaseAttribute.getXsESchema();
      XsAnyURI namespace;
      String namespacePrefix;
      boolean qualified = isGlobal = pBaseAttribute.isGlobal();
      if (!qualified) {
        XsFormChoice form = pBaseAttribute.getForm();
        if (form == null) {
          form = schema.getAttributeFormDefault();
        }
        qualified = XsFormChoice.QUALIFIED.equals(form);
      }
      if (qualified) {
        namespace = schema.getTargetNamespace();
        namespacePrefix = schema.getTargetNamespacePrefix();
      } else {
        namespace = null;
        namespacePrefix = null;
      }
      this.name = new XsQName(namespace, myName.toString(), namespacePrefix);
    }

    xsAnnotation = pBaseAttribute.getAnnotation();
  }
View Full Code Here

    super(pParent, pBaseGroup);
    XsQName qName;
    if (isReference()) {
      qName = getXsTAttributeGroup().getRef();
    } else {
      XsNCName myName = pBaseGroup.getName();
      if (myName == null) {
        throw new LocSAXException("Invalid attribute group: Neither of its 'name' or 'ref' attributes are set.",
                                     pBaseGroup.getLocator());
      } else {
        XsESchema schema = pBaseGroup.getXsESchema();
        qName = new XsQName(schema.getTargetNamespace(), myName.toString(), schema.getTargetNamespacePrefix());
      }
    }
    name = qName;
  }
View Full Code Here

TOP

Related Classes of org.apache.ws.jaxme.xs.xml.XsNCName

Copyright © 2018 www.massapicom. 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.