InputSource source = new InputSource(mapping.schemaUrl);
XSParser xsParser = new XSParser();
xsParser.setValidating(false);
XSSchema xsSchema;
try
{
xsSchema = xsParser.parse(source);
}
catch(Exception e)
{
log.error(e);
throw new IllegalStateException(e.getMessage());
}
XsQName rootName = new XsQName(mapping.namespaceUri, mapping.root);
XSElement root = xsSchema.getElement(rootName);
// name with the prefix
rootName = root.getName();
String rootPrefix = rootName.getPrefix();
String rootQName = (rootPrefix == null || rootPrefix.length() == 0 ?