Package org.apache.xerces.xs

Examples of org.apache.xerces.xs.XSLoader.load()


      log.debug("loading xsd from InputStream");
      LSInputAdaptor input = new LSInputAdaptor(is, encoding, baseURI);

      XSImplementation impl = getXSImplementation();
      XSLoader schemaLoader = impl.createXSLoader(null);
      XSModel model = schemaLoader.load(input);
      return model;
   }

   private static XSModel loadSchema(Reader reader, String encoding, String baseURI)
   {
View Full Code Here


      log.debug("loading xsd from Reader");
      LSInputAdaptor input = new LSInputAdaptor(reader, encoding, baseURI);

      XSImplementation impl = getXSImplementation();
      XSLoader schemaLoader = impl.createXSLoader(null);
      XSModel model = schemaLoader.load(input);
      return model;
   }

   private static XSModel loadSchema(String data, String encoding)
   {
View Full Code Here

      log.debug("loading xsd from string");
      LSInputAdaptor input = new LSInputAdaptor(data, encoding);

      XSImplementation impl = getXSImplementation();
      XSLoader schemaLoader = impl.createXSLoader(null);
      XSModel model = schemaLoader.load(input);
      return model;
   }

   private static XSImplementation getXSImplementation()
   {
View Full Code Here

   public static XSModel loadSchema(final Reader xsdReader)
   {
      XSImplementation impl = getXSImplementation();
      XSLoader schemaLoader = impl.createXSLoader(null);

      XSModel model = schemaLoader.load(new LSInput()
      {
         public Reader getCharacterStream()
         {
            return xsdReader;
         }
View Full Code Here

   private XSModel loadSchema(Reader xsdReader)
   {
      XSImplementation impl = getXSImplementation();
      XSLoader schemaLoader = impl.createXSLoader(null);
      // [TODO] load from reader
      XSModel model = schemaLoader.load(null);
      if (model == null)
      {
         throw new IllegalArgumentException("Cannot load schema");
      }
View Full Code Here

    }

    public static XSModel createXsModel(final String data) {
        XSLoader schemaLoader = createXsLoader();

        XSModel xsmodel = schemaLoader.load(new LSInput() {

            @Override
            public String getBaseURI() {
                return ".";
            }
View Full Code Here

        // Get XS Implementation
        XSImplementation impl = (XSImplementation) registry.getDOMImplementation( "XS-Loader" );
        // Load XMLSchema
        XSLoader schemaLoader = impl.createXSLoader( null );
        XSModel schema = schemaLoader.load( input );
        // Get simple type definitions
        XSNamedMap map = schema.getComponents( XSTypeDefinition.SIMPLE_TYPE );

        return map;
    }
View Full Code Here

      if(schemaResolver != null)
      {
         setResourceResolver(schemaLoader, schemaResolver);
      }

      return schemaLoader.load(input);
   }

   public static XSModel loadSchema(Reader reader, String encoding, SchemaBindingResolver schemaResolver)
   {
      if(log.isTraceEnabled())
View Full Code Here

      if(schemaResolver != null)
      {
         setResourceResolver(schemaLoader, schemaResolver);
      }

      return schemaLoader.load(input);
   }

   public static XSModel loadSchema(String data, String encoding)
   {
      if(log.isTraceEnabled())
View Full Code Here

      LSInputAdaptor input = new LSInputAdaptor(data, encoding);

      XSImplementation impl = getXSImplementation();
      XSLoader schemaLoader = impl.createXSLoader(null);
      setDOMErrorHandler(schemaLoader);
      return schemaLoader.load(input);
   }

   // Private

   /**
 
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.