if(decl.getTargetNamespace().equals(""))
hasComponentInNoNamespace = true;
}
OutputStream os = new FileOutputStream(episodeFile);
Bindings bindings = TXW.create(Bindings.class, new StreamSerializer(os, "UTF-8"));
if(hasComponentInNoNamespace) // otherwise jaxb binding NS should be the default namespace
bindings._namespace(Const.JAXB_NSURI,"jaxb");
else
bindings._namespace(Const.JAXB_NSURI,"");
bindings.version("2.1");
bindings._comment("\n\n"+opt.getPrologComment()+"\n ");
// generate listing per schema
for (Map.Entry<XSSchema,List<ClassOutline>> e : perSchema.entrySet()) {
Bindings group = bindings.bindings();
String tns = e.getKey().getTargetNamespace();
if(!tns.equals(""))
group._namespace(tns,"tns");
group.scd("x-schema::"+(tns.equals("")?"":"tns"));
group.schemaBindings().map(false);
for (ClassOutline co : e.getValue()) {
Bindings child = group.bindings();
child.scd(co.target.getSchemaComponent().apply(SCD));
child.klass().ref(co.implClass.fullName());
}
group.commit(true);
}
bindings.commit();