Examples of XSAnyURI


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

      for (int i = 0;  i < childs.length;  i++) {
        Object o = childs[i];
        if (o instanceof XsEInclude) {
          XsEInclude xsEInclude = (XsEInclude) o;
          XsAnyURI schemaLocation = xsEInclude.getSchemaLocation();
          includeSchema(pSyntaxSchema, xsEInclude,
              getImportLocator(xsEInclude, pSchemaLocation),
              schemaLocation == null ? null : schemaLocation.toString());
        } else if (o instanceof XsERedefine) {
          redefineSchema(pSyntaxSchema, (XsERedefine) o);
        } else if (o instanceof XsEImport) {
          XsEImport xsEImport = (XsEImport) o;
          XsAnyURI namespace = xsEImport.getNamespace();
          XsAnyURI schemaLocation = xsEImport.getSchemaLocation();
          importSchema(pSyntaxSchema, namespace == null ? null : namespace.toString(),
              schemaLocation == null ? null : schemaLocation.toString(),
                  getImportLocator(xsEImport, pSchemaLocation));
        } else {
          add(pSyntaxSchema, childs[i]);
        }
      }
View Full Code Here

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

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

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

  /** <p>Handles xs:include.</p>
   */
  protected void includeSchema(XsESchema pIncludingSchema,
                                 XsEInclude pInclude)
      throws SAXException, IOException, ParserConfigurationException {
    XsAnyURI schemaLocation = pInclude.getSchemaLocation();
    if (schemaLocation == null) {
      throw new LocSAXException("Invalid include: Missing 'schemaLocation' attribute.",
                                   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

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

      if ("".equals(pNamespace)) {
        throw new LocSAXException("Invalid import: Empty 'namespace' attribute, which is forbidden." +
                                   " Perhaps you want to omit the attribute to indicate the absence of a namespace?",
                                   pLocator);
      }
      XsAnyURI targetNamespace = pImportingSchema.getTargetNamespace();
      if (targetNamespace != null  &&
          pNamespace.equals(targetNamespace.toString())) {
        throw new LocSAXException("The importing schema and the imported schema have the same namespace, which is forbidden. Perhaps you want to use include?",
                                   pLocator);
      }
    }
  }
View Full Code Here

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

  }

  private void importSchema(XsESchema pImportingSchema, String pNamespace,
                            XsESchema pImportedSchema, Locator pLocator)
      throws SAXException, ParserConfigurationException, IOException {
    XsAnyURI impNamespace = pImportedSchema.getTargetNamespace();
    if (pNamespace == null) {
      if (impNamespace != null) {
        throw new LocSAXException("The 'import' element does not have a 'namespace' attribute, but the imported schema has target namespace " +
                                     impNamespace + ", it ought to match and have none.",
                                     pLocator);
      }
    } else {
      if (impNamespace == null) {
        throw new LocSAXException("The 'import' element has a 'namespace' attribute (" + pNamespace +
                                   "), but the imported schema has no 'targetNamespace' attribute.",
                                   pLocator);
      } else if (!pNamespace.equals(impNamespace.toString())) {
        throw new LocSAXException("The 'import' elements 'namespace' attribute (" + pNamespace +
                                     ") and the imported schemas 'targetNamespace' attribute (" +
                                     impNamespace + ") do not match.",
                                     pLocator);
      }
View Full Code Here

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

          includeSchema(pSyntaxSchema, (XsEInclude) o);
        } else if (o instanceof XsERedefine) {
          redefineSchema(pSyntaxSchema, (XsERedefine) o);
        } else if (o instanceof XsEImport) {
          XsEImport xsEImport = (XsEImport) o;
          XsAnyURI namespace = xsEImport.getNamespace();
          XsAnyURI schemaLocation = xsEImport.getSchemaLocation();
          importSchema(pSyntaxSchema, namespace == null ? null : namespace.toString(),
                       schemaLocation == null ? null : schemaLocation.toString(),
                       xsEImport.getLocator());
        } else {
          add(pSyntaxSchema, childs[i]);
        }
      }
View Full Code Here

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

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

Examples of org.eclipse.wst.xml.xpath2.processor.internal.types.XSAnyURI

    protected Object getPsychoPathTypeForXSDType(String xsdTypeName,
                                                 String value) {
        Object psychoPathType = null;
       
        if ("anyURI".equals(xsdTypeName)) {
           psychoPathType = new XSAnyURI(value);
        }
        else if ("boolean".equals(xsdTypeName)) {
           psychoPathType = new XSBoolean(Boolean.valueOf(value).
                                                  booleanValue());
        }
View Full Code Here

Examples of org.exolab.castor.builder.types.XSAnyURI

                xsNMToken.setFacets(simpleType);
                return xsNMToken;
            case SimpleTypesFactory.NMTOKENS_TYPE:       //-- NMTOKENS
                return new XSNMTokens(SourceGeneratorConstants.FIELD_INFO_VECTOR, useJava50);
            case SimpleTypesFactory.ANYURI_TYPE:         //--AnyURI
                return new XSAnyURI();
            case SimpleTypesFactory.BASE64BINARY_TYPE:   //-- base64Bbinary
                return new XSBase64Binary(useJava50);
            case SimpleTypesFactory.HEXBINARY_TYPE:      //-- hexBinary
                return new XSHexBinary(useJava50);
            case SimpleTypesFactory.BOOLEAN_TYPE:        //-- boolean
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.