}
// generate schema components for each property
for (Property next : properties) {
if (next == null) { continue; }
Schema currentSchema = workingSchema;
TypeDefParticle parentCompositor = compositor;
boolean isChoice = (parentCompositor instanceof Choice);
ComplexType parentType = type;
// ignore transient and inverse reference properties
if (!next.isTransient() && !next.isInverseReference()) {
// handle transformers
if (next.isSetXmlTransformation() && next.getXmlTransformation().isSetXmlWriteTransformers()) {
addTransformerToSchema(next, ownerTypeInfo, compositor, type, workingSchema);
continue;
}
// handle XmlJoinNodes
if (next.isSetXmlJoinNodes()) {
addXmlJoinNodesToSchema(next, parentCompositor, currentSchema, parentType);
continue;
}
// deal with xml-path case
if (next.getXmlPath() != null) {
// create schema components based on the XmlPath
AddToSchemaResult xpr = addXPathToSchema(next, parentCompositor, currentSchema, isChoice, type);
// if the returned object or schema component is null there is nothing to do
if (xpr == null || (parentCompositor = xpr.particle) == null) {
continue;
}
// now process the property as per usual, adding to the created schema component
currentSchema = xpr.schema;
if (parentCompositor.getOwner() instanceof ComplexType) {
parentType = ((ComplexType)parentCompositor.getOwner());
}
// deal with the XmlElementWrapper case
} else if (!isChoice && next.isSetXmlElementWrapper()) {
AddToSchemaResult asr = addXmlElementWrapperToSchema(next, currentSchema, compositor);
// if returned object is null there is nothing to do