private void checkNSRecurseCheckCardinality(Vector children, int min1, int max1, SubstitutionGroupHandler dSGHandler, XSParticleDecl wildcard, int min2, int max2, boolean checkWCOccurrence) throws XMLSchemaException { // check Occurrence ranges if (checkWCOccurrence && !checkOccurrenceRange(min1,max1,min2,max2)) { throw new XMLSchemaException("rcase-NSRecurseCheckCardinality.2", new Object[]{ Integer.toString(min1), max1==SchemaSymbols.OCCURRENCE_UNBOUNDED?"unbounded":Integer.toString(max1), Integer.toString(min2), max2==SchemaSymbols.OCCURRENCE_UNBOUNDED?"unbounded":Integer.toString(max2)}); } // Check that each member of the group is a valid restriction of the wildcard int count = children.size(); try { for (int i = 0; i < count; i++) { XSParticleDecl particle1 = (XSParticleDecl)children.elementAt(i); particleValidRestriction(particle1, dSGHandler, wildcard, null, false); } } // REVISIT: should we really just ignore original cause of this error? // how can we report it? catch (XMLSchemaException e) { throw new XMLSchemaException("rcase-NSRecurseCheckCardinality.1", null); } }
private void checkNSCompat(XSElementDecl elem, int min1, int max1, XSWildcardDecl wildcard, int min2, int max2, boolean checkWCOccurrence) throws XMLSchemaException { // check Occurrence ranges if (checkWCOccurrence && !checkOccurrenceRange(min1,max1,min2,max2)) { throw new XMLSchemaException("rcase-NSCompat.2", new Object[]{ elem.fName, Integer.toString(min1), max1==SchemaSymbols.OCCURRENCE_UNBOUNDED?"unbounded":Integer.toString(max1), Integer.toString(min2), max2==SchemaSymbols.OCCURRENCE_UNBOUNDED?"unbounded":Integer.toString(max2)}); } // check wildcard allows namespace of element if (!wildcard.allowNamespace(elem.fTargetNamespace)) { throw new XMLSchemaException("rcase-NSCompat.1", new Object[]{elem.fName,elem.fTargetNamespace}); } }
if (!checkOccurrenceRange(min1,max1,min2,max2)) { throw new XMLSchemaException("rcase-RecurseLax.1", new Object[]{ Integer.toString(min1),
if (!checkOccurrenceRange(min1,max1,min2,max2)) { throw new XMLSchemaException("rcase-MapAndSum.2", new Object[]{Integer.toString(min1),
if (!checkOccurrenceRange(min1,max1,min2,max2)) { throw new XMLSchemaException("rcase-RecurseUnordered.1", new Object[]{ Integer.toString(min1),
private void checkNSSubset(XSWildcardDecl dWildcard, int min1, int max1, XSWildcardDecl bWildcard, int min2, int max2) throws XMLSchemaException { // check Occurrence ranges if (!checkOccurrenceRange(min1,max1,min2,max2)) { throw new XMLSchemaException("rcase-NSSubset.2", new Object[]{ Integer.toString(min1), max1==SchemaSymbols.OCCURRENCE_UNBOUNDED?"unbounded":Integer.toString(max1), Integer.toString(min2), max2==SchemaSymbols.OCCURRENCE_UNBOUNDED?"unbounded":Integer.toString(max2)}); } // check wildcard subset if (!isSubsetOf(dWildcard, bWildcard)) { throw new XMLSchemaException("rcase-NSSubset.1", null); } if (dWildcard.weakerProcessContents(bWildcard)) { throw new XMLSchemaException("rcase-NSSubset.3", new Object[]{dWildcard.getProcessContentsAsString(), bWildcard.getProcessContentsAsString()}); } }
if (!checkOccurrenceRange(min1,max1,min2,max2)) { throw new XMLSchemaException("rcase-Recurse.1", new Object[]{ Integer.toString(min1),
if (!checkOccurrenceRange(dMin, dMax, bMin, bMax)) { throw new XMLSchemaException("rcase-NameAndTypeOK.3", new Object[]{