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

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


                                   pInclude.getLocator());
    }
    Locator locator = pInclude.getLocator();
    InputSource schemaSource = getInputSource(locator == null ? null : locator.getSystemId(),
                                              schemaLocation.toString());
    XsESchema includedSchema = parseSyntax(schemaSource);
    XsAnyURI incNamespace = includedSchema.getTargetNamespace();
    if (incNamespace == null) {
      includedSchema.setTargetNamespace(includedSchema.getTargetNamespace());
    } else {
      XsAnyURI myNamespace = includedSchema.getTargetNamespace();
      if (!incNamespace.equals(myNamespace)) {
        throw new LocSAXException("Invalid include: The included schemas target namespace " +
                                     incNamespace + " and the including schemas target namespace " +
                                     myNamespace + " do not match.",
                                     pInclude.getLocator());
View Full Code Here


    if (importedSchemas == null) {
      importedSchemas = new HashSet();
    }
    importedSchemas.add(pSchemaLocation);
    InputSource schemaSource = getInputSource(pLocator == null ? null : pLocator.getSystemId(), pSchemaLocation);
    XsESchema importedSchema = parseSyntax(schemaSource);
    importSchema(pImportingSchema, pNamespace, importedSchema, pLocator);
  }
View Full Code Here

  }

  protected void importSchema(XsESchema pImportingSchema, String pNamespace, Node pNode)
      throws SAXException, IOException, ParserConfigurationException {
    checkValidImportSchema(pImportingSchema, pNamespace, null);
    XsESchema importedSchema = parseSyntax(pNode);
    importSchema(pImportingSchema, pNamespace, importedSchema, null);
  }
View Full Code Here

    // may be used to replace the substitution groups head, if required.
    for (Iterator iter = substitutionGroups.values().iterator();  iter.hasNext()) {
      SubstitutionGroup group = (SubstitutionGroup) iter.next();
      XSElementImpl head = (XSElementImpl) group.getHead();
      XsObject object = head.getXsObject();
      XsESchema syntaxSchema = object.getXsESchema();

      // Find a name for the group
      String namespace = syntaxSchema.getTargetNamespace().toString();
      String localName = head.getName().getLocalName() + "Group";
      XsQName suggestion = new XsQName(namespace, localName);
      if (pSchema.getGroup(suggestion) != null) {
        for (int i = 0;  ;  i++) {
          suggestion = new XsQName(namespace, localName + i);
View Full Code Here

      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);
View Full Code Here

TOP

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

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.