in xmlschema-core/src/main/java/org/apache/ws/commons/schema/XmlSchemaDerivationMethod.java [44:72]
public static XmlSchemaDerivationMethod schemaValueOf(String name) {
String[] tokens = name.split("\\s");
XmlSchemaDerivationMethod method = new XmlSchemaDerivationMethod();
for (String t : tokens) {
if ("#all".equalsIgnoreCase(t) || "all".equalsIgnoreCase(t)) {
if (method.notAll()) {
throw new XmlSchemaException("Derivation method cannot be #all and something else.");
} else {
method.setAll(true);
}
} else {
if (method.isAll()) {
throw new XmlSchemaException("Derivation method cannot be #all and something else.");
}
if ("extension".equals(t)) {
method.setExtension(true);
} else if ("list".equals(t)) {
method.setList(true);
} else if ("restriction".equals(t)) {
method.setRestriction(true);
} else if ("substitution".equals(t)) {
method.setSubstitution(true);
} else if ("union".equals(t)) {
method.setUnion(true);
}
}
}
return method;
}