Hi ,
I use the following code to read the schemaA which import the schemaB and
print the base uri
for each schema element :
schemaCol.setBaseUri(schemaBaseUri);
schemaCol.setSchemaResolver (new XmlSchemaURIResolver());
XmlSchema xmlSchema = schemaCol.read(schemaA);
When I check the imported schema element base uri , I always get null.
Document[] docs = xmlSchema.getAllSchemas();
for (int i = 0; i < docs.length; i++) {
Element ele = docs[i].getDocumentElement();
System.out.println("--- getBaseUri---- " + ele.getBaseURI());
}
I always get null value .Is there anything I need to set for schemaCol ?
Thanks
Jim