void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha) throws RestrictionViolationException { p1.checkRestrictions(context, dad, alpha); p2.checkRestrictions(context, dad, alpha); }
void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha) throws RestrictionViolationException { p1.checkRestrictions(context, dad, alpha); p2.checkRestrictions(context, dad, alpha); }
void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha) throws RestrictionViolationException { if (dad != null) dad.startChoice(); p1.checkRestrictions(context, dad, alpha); if (dad != null) dad.alternative(); p2.checkRestrictions(context, dad, alpha); if (dad != null) dad.endChoice(); }
void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha) throws RestrictionViolationException { if (dad != null) dad.startChoice(); p1.checkRestrictions(context, dad, alpha); if (dad != null) dad.alternative(); p2.checkRestrictions(context, dad, alpha); if (dad != null) dad.endChoice(); }
@Override void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha) throws RestrictionViolationException { super.checkRestrictions(context, dad, alpha); try { except.checkRestrictions(DATA_EXCEPT_CONTEXT, null, null); } catch (RestrictionViolationException e) { e.maybeSetLocator(loc); throw e; } }
void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha) throws RestrictionViolationException { super.checkRestrictions(context, dad, alpha); try { except.checkRestrictions(DATA_EXCEPT_CONTEXT, null, null); } catch (RestrictionViolationException e) { e.maybeSetLocator(loc); throw e; } }
@Override void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha) throws RestrictionViolationException { switch (context) { case DATA_EXCEPT_CONTEXT: throw new RestrictionViolationException("data_except_contains_list"); case START_CONTEXT: throw new RestrictionViolationException("start_contains_list"); case LIST_CONTEXT: throw new RestrictionViolationException("list_contains_list"); } try { p.checkRestrictions(LIST_CONTEXT, dad, null); } catch (RestrictionViolationException e) { e.maybeSetLocator(locator); throw e; } }
void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha) throws RestrictionViolationException { switch (context) { case DATA_EXCEPT_CONTEXT: throw new RestrictionViolationException("data_except_contains_list"); case START_CONTEXT: throw new RestrictionViolationException("start_contains_list"); case LIST_CONTEXT: throw new RestrictionViolationException("list_contains_list"); } try { p.checkRestrictions(LIST_CONTEXT, dad, null); } catch (RestrictionViolationException e) { e.maybeSetLocator(locator); throw e; } }
@Override void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha) throws RestrictionViolationException { switch (context) { case START_CONTEXT: throw new RestrictionViolationException("start_contains_one_or_more"); case DATA_EXCEPT_CONTEXT: throw new RestrictionViolationException("data_except_contains_one_or_more"); } p.checkRestrictions(context == ELEMENT_CONTEXT ? ELEMENT_REPEAT_CONTEXT : context, dad, alpha); if (context != LIST_CONTEXT && !contentTypeGroupable(p.getContentType(), p.getContentType())) throw new RestrictionViolationException("one_or_more_string"); }
void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha) throws RestrictionViolationException { switch (context) { case START_CONTEXT: throw new RestrictionViolationException("start_contains_one_or_more"); case DATA_EXCEPT_CONTEXT: throw new RestrictionViolationException("data_except_contains_one_or_more"); } p.checkRestrictions(context == ELEMENT_CONTEXT ? ELEMENT_REPEAT_CONTEXT : context, dad, alpha); if (context != LIST_CONTEXT && !contentTypeGroupable(p.getContentType(), p.getContentType())) throw new RestrictionViolationException("one_or_more_string"); }
void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha) throws RestrictionViolationException { if (alpha != null) alpha.addElement(origNameClass); if (checkedRestrictions) return; switch (context) { case DATA_EXCEPT_CONTEXT: throw new RestrictionViolationException("data_except_contains_element"); case LIST_CONTEXT: throw new RestrictionViolationException("list_contains_element"); case ATTRIBUTE_CONTEXT: throw new RestrictionViolationException("attribute_contains_element"); } checkedRestrictions = true; try { p.checkRestrictions(ELEMENT_CONTEXT, new DuplicateAttributeDetector(), null); } catch (RestrictionViolationException e) { checkedRestrictions = false; e.maybeSetLocator(loc); throw e; } }
@Override void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha) throws RestrictionViolationException { if (alpha != null) alpha.addElement(origNameClass); if (checkedRestrictions) return; switch (context) { case DATA_EXCEPT_CONTEXT: throw new RestrictionViolationException("data_except_contains_element"); case LIST_CONTEXT: throw new RestrictionViolationException("list_contains_element"); case ATTRIBUTE_CONTEXT: throw new RestrictionViolationException("attribute_contains_element"); } checkedRestrictions = true; try { p.checkRestrictions(ELEMENT_CONTEXT, new DuplicateAttributeDetector(), null); } catch (RestrictionViolationException e) { checkedRestrictions = false; e.maybeSetLocator(loc); throw e; } }
else a1 = new Alphabet(); p1.checkRestrictions(context, dad, a1); if (a1.isEmpty()) p2.checkRestrictions(context, dad, a1); else { Alphabet a2 = new Alphabet(); p2.checkRestrictions(context, dad, a2); a1.checkOverlap(a2); if (alpha != null) {
else a1 = new Alphabet(); p1.checkRestrictions(context, dad, a1); if (a1.isEmpty()) p2.checkRestrictions(context, dad, a1); else { Alphabet a2 = new Alphabet(); p2.checkRestrictions(context, dad, a2); a1.checkOverlap(a2); if (alpha != null) {
public ParsedPattern expandPattern(ParsedPattern _pattern) throws BuildException, IllegalSchemaException { Pattern pattern = (Pattern) _pattern; if (!hadError) { try { pattern.checkRecursion(0); pattern = pattern.expand(pb); pattern.checkRestrictions(Pattern.START_CONTEXT, null, null); if (!hadError) return pattern; } catch (SAXParseException e) { error(e); } catch (SAXException e) { throw new BuildException(e); } catch (RestrictionViolationException e) { if (e.getName() != null) error(e.getMessageId(), e.getName().toString(), e .getLocator()); else error(e.getMessageId(), e.getLocator()); } } throw new IllegalSchemaException(); }
public ParsedPattern expandPattern(ParsedPattern _pattern) throws BuildException, IllegalSchemaException { Pattern pattern = (Pattern) _pattern; if (!hadError) { try { pattern.checkRecursion(0); pattern = pattern.expand(pb); pattern.checkRestrictions(Pattern.START_CONTEXT, null, null); if (!hadError) { return pattern; } } catch (SAXParseException e) { error(e); } catch (SAXException e) { throw new BuildException(e); } catch (RestrictionViolationException e) { if (e.getName() != null) { error(e.getMessageId(), e.getName().toString(), e .getLocator()); } else { error(e.getMessageId(), e.getLocator()); } } } throw new IllegalSchemaException(); }
p.checkRestrictions(ATTRIBUTE_CONTEXT, null, null);
p.checkRestrictions(ATTRIBUTE_CONTEXT, null, null);