public StringSchemaWriter(List<String> schemas, List<URI> links, UriInfo ui) {
this.theSchemas = new LinkedList<String>();
// we'll need to do the proper schema caching eventually
for (String s : schemas) {
XMLSource source = new XMLSource(new ByteArrayInputStream(s.getBytes()));
source.setBuffering(true);
Map<String, String> locs = getLocationsMap(source, "import", links, ui);
locs.putAll(getLocationsMap(source, "include", links, ui));
String actualSchema = !locs.isEmpty() ? transformSchema(s, locs) : s;
theSchemas.add(actualSchema);
}