private static void adjustChoiceMaxSiblings(ISchemaCompositor compositor, HashMap<String, Integer> siblings) { if (isSimpleChoice(compositor)) { // Supported // Update all child element occurrences of the choice compositor // to the number of occurrences found // Each choice occurrence counts as one occurrence for all child elements // of that choice int childElementCount = countChoiceElementChildren(compositor, siblings); updateChoiceElementChildren(compositor, siblings, childElementCount); } else { // Not supported // IMPORTANT: Any child of choice that is not an element (e.g. // sequence, choice) is not supported, in future could recursively // calculate, but time vs benefit is not worth it // Remove all elements nested in compositors from validation check // by setting their occurrences to integer MIN updateChoiceElementChildren(compositor, siblings, Integer.MIN_VALUE); } }
private static void adjustChoiceMinSiblings(ISchemaCompositor compositor, HashMap<String, Integer> siblings) { if (isSimpleChoice(compositor)) { // Supported // Update all child element occurrences of the choice compositor // to the number of occurrences found // Each choice occurrence counts as one occurrence for all child elements // of that choice int childElementCount = countChoiceElementChildren(compositor, siblings); updateChoiceElementChildren(compositor, siblings, childElementCount); } else { // Not supported // IMPORTANT: Any child of choice that is not an element (e.g. // sequence, choice) is not supported, in future could recursively // caculate, but time vs benefit is not worth it // Remove all elements nested in compositors from validation check // by setting their occurrences to integer MAX updateChoiceElementChildren(compositor, siblings, Integer.MAX_VALUE); } }
/** * @param compositor * @param siblings */ private static void adjustChoiceMinSiblings(ISchemaCompositor compositor, HashMap siblings) { if (isSimpleChoice(compositor)) { // Supported // Update all child element occurrences of the choice compositor // to the number of occurences found // Each choice occurence counts as one occurence for all child elements // of that choice int childElementCount = countChoiceElementChildren(compositor, siblings); updateChoiceElementChildren(compositor, siblings, childElementCount); } else { // Not supported // IMPORTANT: Any child of choice that is not an element (e.g. // sequence, choice) is not supported, in future could recursively // caculate, but time vs benefit is not worth it // Remove all elements nested in compositors from validation check // by setting their occurrences to integer MAX updateChoiceElementChildren(compositor, siblings, Integer.MAX_VALUE); } }
/** * @param compositor * @param siblings */ private static void adjustChoiceMaxSiblings(ISchemaCompositor compositor, HashMap siblings) { if (isSimpleChoice(compositor)) { // Supported // Update all child element occurrences of the choice compositor // to the number of occurences found // Each choice occurence counts as one occurence for all child elements // of that choice int childElementCount = countChoiceElementChildren(compositor, siblings); updateChoiceElementChildren(compositor, siblings, childElementCount); } else { // Not supported // IMPORTANT: Any child of choice that is not an element (e.g. // sequence, choice) is not supported, in future could recursively // caculate, but time vs benefit is not worth it // Remove all elements nested in compositors from validation check // by setting their occurrences to integer MIN updateChoiceElementChildren(compositor, siblings, Integer.MIN_VALUE); } }