Resource resource = new XSDResourceFactoryImpl().createResource(schemaURI); XSDSchema schema; resource.load(Collections.EMPTY_MAP); schema = (XSDSchema) resource.getContents().get(0); schema.validate(); List<XSDDiagnostic> diagnostics = schema.getAllDiagnostics(); if (!diagnostics.isEmpty()) { throw new SchemaException(diagnostics); } ....
Ed Merks wrote on Fri, 09 October 2009 13:16 |
That's a lot of years ago... |
Ed Merks wrote on Fri, 09 October 2009 13:16 |
Have a look at XSDMainExample. In particular, you need to use a ResourceSet to load the initial resources so that included resources can be demand loaded into it. |