/** * Exports a wrapper schema document for the given XML Schema Infoset. * * @param writer * @param xsModel * @param targetNs * @param translator * @throws XMLStreamException */ public static void export( XMLStreamWriter writer, GMLSchemaInfoSet xsModel, String targetNs, URITranslator translator ) throws XMLStreamException { List<Pair<String, String>> nsImports = new ArrayList<Pair<String, String>>(); for ( String ns : xsModel.getAppNamespaces() ) { List<String> locations = xsModel.getComponentLocations( ns ); for ( String location : locations ) { String translated = translator.translate( location ); nsImports.add( new Pair<String, String>( ns, translated ) ); } } writeWrapperDoc( writer, targetNs, nsImports ); }