for( ClassOutline co : model.getClasses() ) {
XSComponent sc = co.target.getSchemaComponent();
if(sc==null) continue;
if (!(sc instanceof XSDeclaration))
continue;
XSDeclaration decl = (XSDeclaration) sc;
if(decl.isLocal())
continue; // local components cannot be referenced from outside, so no need to list.
List<ClassOutline> list = perSchema.get(decl.getOwnerSchema());
if(list==null) {
list = new ArrayList<ClassOutline>();
perSchema.put(decl.getOwnerSchema(),list);
}
list.add(co);
if(decl.getTargetNamespace().equals(""))
hasComponentInNoNamespace = true;
}
OutputStream os = new FileOutputStream(episodeFile);
Bindings bindings = TXW.create(Bindings.class, new StreamSerializer(os, "UTF-8"));