private static SchemaWrapper wrapPattern2 ( Pattern start , SchemaPatternBuilder spb , PropertyMap properties ) throws SAXException , IncorrectSchemaException { if ( properties . contains ( RngProperty . FEASIBLE ) ) { //Use a feasible transform start = FeasibleTransform . transform ( spb , start ) ; } //Get properties for supported IDs properties = AbstractSchema . filterProperties ( properties , supportedPropertyIds ) ; Schema schema = new PatternSchema ( spb , start , properties ) ; IdTypeMap idTypeMap = null ; if ( spb . hasIdTypes ( ) && properties . contains ( RngProperty . CHECK_ID_IDREF ) ) { //Check ID/IDREF ErrorHandler eh = properties . get ( ValidateProperty . ERROR_HANDLER ) ; idTypeMap = new IdTypeMapBuilder ( eh , start ) . getIdTypeMap ( ) ; if ( idTypeMap == null ) { throw new IncorrectSchemaException ( ) ; } Schema idSchema ; if ( properties . contains ( RngProperty . FEASIBLE ) ) { idSchema = new FeasibleIdTypeMapSchema ( idTypeMap , properties ) ; } else { idSchema = new IdTypeMapSchema ( idTypeMap , properties ) ; } schema = new CombineSchema ( schema , idSchema , properties ) ; } //Wrap the schema SchemaWrapper sw = new SchemaWrapper ( schema ) ; sw . setStart ( start ) ; sw . setIdTypeMap ( idTypeMap ) ; return sw ; }
Make a schema wrapper .