problems adding namespace to a schema generated in code

"Alexander Kampmann" <[email protected]> Mon, 31 May 2010 17:26:13 +0200
Newsgroups gmane.text.xml.xmlbeans.user
Message-ID <[email protected]>
hi there, 

i'm using the org.apache.xmlbeans.impl.xb.xsdschema.SchemaDocument (and related) classes to create a xml- schema in code. 
It works well and I can write the schema to a file, but there are two problems: 

1) I can't figure out how to add something like xmlns:tns="..." to my schema- Element. Setting the target namespace works, but the schema is invalid without that attribute. 

2) By now I write the schema to a file and start scomp using Runtime.getDefaultRuntime().exec(), but in my eyes it would be nicer to start the compilation from my program directly. Is there a way to do so? I have had a look at the scomp- sources, but I didn't get wise from it. 

Thanks for your advice, 

Alex
-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01