/** * Gets a fresh {@link SchemaCompiler}. * * @return * always return non-null object. */ public static SchemaCompiler createSchemaCompiler() { return new SchemaCompilerImpl(); }
public void parseSchema(InputSource source) { checkAbsoluteness(source.getSystemId()); try { forest.parse(source,true); } catch (SAXException e) { // parsers are required to report an error to ErrorHandler, // so we should never see this error. e.printStackTrace(); } }
public SchemaCompilerImpl() { opts.compatibilityMode = Options.EXTENSION; resetSchema(); if(System.getProperty("xjc-api.test")!=null) { opts.debugMode = true; opts.verbose = true; } }
public void parseSchema( String systemId, Element element ) { checkAbsoluteness(systemId); try { DOMScanner scanner = new DOMScanner(); // use a locator that sets the system ID correctly // so that we can resolve relative URLs in most of the case. // it still doesn't handle xml:base and XInclude and all those things // correctly. There's just no way to make all those things work with DOM! LocatorImpl loc = new LocatorImpl(); loc.setSystemId(systemId); scanner.setLocator(loc); scanner.setContentHandler(getParserHandler(systemId)); scanner.scan(element); } catch (SAXException e) { // since parsing DOM shouldn't cause a SAX exception // and our handler will never throw it, it's not clear // if this will ever happen. fatalError(new SAXParseException2( e.getMessage(), null, systemId,-1,-1, e)); } }
public void parseSchema( String systemId, Element element ) { checkAbsoluteness(systemId); try { DOMScanner scanner = new DOMScanner(); // use a locator that sets the system ID correctly // so that we can resolve relative URLs in most of the case. // it still doesn't handle xml:base and XInclude and all those things // correctly. There's just no way to make all those things work with DOM! LocatorImpl loc = new LocatorImpl(); loc.setSystemId(systemId); scanner.setLocator(loc); scanner.setContentHandler(getParserHandler(systemId)); scanner.scan(element); } catch (SAXException e) { // since parsing DOM shouldn't cause a SAX exception // and our handler will never throw it, it's not clear // if this will ever happen. fatalError(new SAXParseException2( e.getMessage(), null, systemId,-1,-1, e)); } }
public void parseSchema( String systemId, Element element ) { checkAbsoluteness(systemId); try { DOMScanner scanner = new DOMScanner(); // use a locator that sets the system ID correctly // so that we can resolve relative URLs in most of the case. // it still doesn't handle xml:base and XInclude and all those things // correctly. There's just no way to make all those things work with DOM! LocatorImpl loc = new LocatorImpl(); loc.setSystemId(systemId); scanner.setLocator(loc); scanner.setContentHandler(getParserHandler(systemId)); scanner.scan(element); } catch (SAXException e) { // since parsing DOM shouldn't cause a SAX exception // and our handler will never throw it, it's not clear // if this will ever happen. fatalError(new SAXParseException2( e.getMessage(), null, systemId,-1,-1, e)); } }
public void parseSchema(InputSource source) { checkAbsoluteness(source.getSystemId()); try { forest.parse(source,true); } catch (SAXException e) { // parsers are required to report an error to ErrorHandler, // so we should never see this error. e.printStackTrace(); } }
/** * Gets a fresh {@link SchemaCompiler}. * * @return * always return non-null object. */ public static SchemaCompiler createSchemaCompiler() { return new SchemaCompilerImpl(); }
public SchemaCompilerImpl() { opts.compatibilityMode = Options.EXTENSION; resetSchema(); if(System.getProperty("xjc-api.test")!=null) { opts.debugMode = true; opts.verbose = true; } }
public void parseSchema( String systemId, Element element ) { checkAbsoluteness(systemId); try { DOMScanner scanner = new DOMScanner(); // use a locator that sets the system ID correctly // so that we can resolve relative URLs in most of the case. // it still doesn't handle xml:base and XInclude and all those things // correctly. There's just no way to make all those things work with DOM! LocatorImpl loc = new LocatorImpl(); loc.setSystemId(systemId); scanner.setLocator(loc); scanner.setContentHandler(getParserHandler(systemId)); scanner.scan(element); } catch (SAXException e) { // since parsing DOM shouldn't cause a SAX exception // and our handler will never throw it, it's not clear // if this will ever happen. fatalError(new SAXParseException2( e.getMessage(), null, systemId,-1,-1, e)); } }
public void parseSchema(String systemId, XMLStreamReader reader) throws XMLStreamException { checkAbsoluteness(systemId); forest.parse(systemId,reader,true); }
/** * Gets a fresh {@link SchemaCompiler}. * * @return * always return non-null object. */ public static SchemaCompiler createSchemaCompiler() { return new SchemaCompilerImpl(); }
public SchemaCompilerImpl() { opts.compatibilityMode = Options.EXTENSION; resetSchema(); if(System.getProperty("xjc-api.test")!=null) { opts.debugMode = true; opts.verbose = true; } }
public void parseSchema( String systemId, Element element ) { checkAbsoluteness(systemId); try { DOMScanner scanner = new DOMScanner(); // use a locator that sets the system ID correctly // so that we can resolve relative URLs in most of the case. // it still doesn't handle xml:base and XInclude and all those things // correctly. There's just no way to make all those things work with DOM! LocatorImpl loc = new LocatorImpl(); loc.setSystemId(systemId); scanner.setLocator(loc); scanner.setContentHandler(getParserHandler(systemId)); scanner.scan(element); } catch (SAXException e) { // since parsing DOM shouldn't cause a SAX exception // and our handler will never throw it, it's not clear // if this will ever happen. fatalError(new SAXParseException2( e.getMessage(), null, systemId,-1,-1, e)); } }
public void parseSchema(InputSource source) { checkAbsoluteness(source.getSystemId()); try { forest.parse(source,true); } catch (SAXException e) { // parsers are required to report an error to ErrorHandler, // so we should never see this error. e.printStackTrace(); } }
/** * Gets a fresh {@link SchemaCompiler}. * * @return * always return non-null object. */ public static SchemaCompiler createSchemaCompiler() { return new SchemaCompilerImpl(); }