schemaPrefix = args[argIndx + 1];
}
}
}
XMLSchemaLoader xsLoader = new XMLSchemaLoader();
if ("1.1".equals(schemaVersion)) {
xsLoader.setProperty(XML_SCHEMA_VERSION,
Constants.W3C_XML_SCHEMA11_NS_URI);
}
else if (schemaVersion != null && !"1.0".equals(schemaVersion)) {
printUsage();
System.exit(-1);
}
if (schemaPrefix != null) {
XSD_LANGUAGE_PREFIX = schemaPrefix + ":";
}
// construct the XSModel object from a schema document
XSModel xsModel = xsLoader.loadURI(schemaUri);
try {
// instantiate the serializer and invoke serialization method
XSSerializer xsSerializer = new XSSerializer();
xsSerializer.serialize(xsModel);