First of all, many thanks for your help...
Now it's working using only one define for the sample.xsd.
So the correct Java code is:
//sample.xsd
//Schema that import the type definition from base.xsd
URL sampleXsdURL = Thread.currentThread
().getContextClassLoader()
.getResource("sample.xsd");
InputStream sampleXsd = sampleXsdURL.openStream();
//sample.xml
//document conform to the sample.xsd
InputStream sampleXml = Thread.currentThread()
.getContextClassLoader().getResourceAsStream("sample.xml
");
//Load the Schemas
XSDHelper.INSTANCE.define(sampleXsd, sampleXsdURL.toString());
System.out.println("-------------->>> Schemas read");
//Load xml
XMLDocument xDoc = XMLHelper.INSTANCE.load(sampleXml);
System.out.println("-------------->>> Xml read");
What do you think about adding your sample lines somewhere, maybe on the
Tuscany Wiki?
It can be helpful for other people... together with the hint of looking
inside the JUnit stuff!
Thanks again
Emiliano