public XSElementDecl getGlobalElementDecl(QName element) { final SchemaGrammar sGrammar = findSchemaGrammar( XSDDescription.CONTEXT_ELEMENT, element.uri, null, element, null); if (sGrammar != null) { return sGrammar.getGlobalElementDecl(element.localpart); } return null; }
public void reportError(String key, Object[] args) { reportSchemaError(key, args); } // reportError(String,Object[])
private void setLocationHints(XSDDescription desc, String[] locations, SchemaGrammar grammar) { int length = locations.length; if (grammar == null) { fXSDDescription.fLocationHints = new String[length]; System.arraycopy(locations, 0, fXSDDescription.fLocationHints, 0, length); } else { setLocationHints(desc, locations, grammar.getDocumentLocations()); } }
(fNamespaceGrowth && !hasSchemaComponent(grammar, contextType, triggeringComponent)))) { fXSDDescription.reset(); fXSDDescription.fContextType = contextType; String[] temp = ((XMLSchemaLoader.LocationArray) locationArray).getLocationArray(); if (temp.length != 0) { setLocationHints(fXSDDescription, temp, grammar);
/** * Called when a duplicate value is added. */ protected void checkDuplicateValues() { if (contains()) { String code = "DuplicateKey"; String value = toString(fLocalValues); String cName = fIdentityConstraint.getIdentityConstraintName(); reportSchemaError(code, new Object[] { value, fElementName, cName }); } } // duplicateValue(Hashtable)
/** * Called when a duplicate value is added. */ protected void checkDuplicateValues() { // is this value as a group duplicated? if (contains()) { String code = "DuplicateUnique"; String value = toString(fLocalValues); String cName = fIdentityConstraint.getIdentityConstraintName(); reportSchemaError(code, new Object[] { value, fElementName, cName }); } } // duplicateValue(Hashtable)
/** Ends scope for value store. */ public void endValueScope() { if (fValuesCount == 0) { if (fIdentityConstraint.getCategory() == IdentityConstraint.IC_KEY) { String code = "AbsentKeyValue"; String cName = fIdentityConstraint.getIdentityConstraintName(); reportSchemaError(code, new Object[] { fElementName, cName }); } return; } // Validation Rule: Identity-constraint Satisfied // 4.2 If the {identity-constraint category} is key, then all of the following must be true: // 4.2.1 The target node set and the qualified node set are equal, that is, every member of the // target node set is also a member of the qualified node set and vice versa. // // If the IDC is a key check whether we have all the fields. if (fValuesCount != fFieldCount) { if (fIdentityConstraint.getCategory() == IdentityConstraint.IC_KEY) { String code = "KeyNotEnoughValues"; UniqueOrKey key = (UniqueOrKey) fIdentityConstraint; String cName = key.getIdentityConstraintName(); reportSchemaError(code, new Object[] { fElementName, cName }); } return; } } // endValueScope()
public void endDocumentFragment() { // do all the necessary management... super.endDocumentFragment(); // verify references // get the key store corresponding (if it exists): fKeyValueStore = (ValueStoreBase) fValueStoreCache.fGlobalIDConstraintMap.get( ((KeyRef) fIdentityConstraint).getKey()); if (fKeyValueStore == null) { // report error String code = "KeyRefOutOfScope"; String value = fIdentityConstraint.getName(); reportSchemaError(code, new Object[] { value }); return; } int errorIndex = fKeyValueStore.contains(this); if (errorIndex != -1) { String code = "KeyNotFound"; String values = toString(fValues, errorIndex, fFieldCount); String name = fIdentityConstraint.getName(); reportSchemaError(code, new Object[] { name, values, fElementName }); } } // endDocumentFragment()
String code = "UnknownField"; String cName = fIdentityConstraint.getIdentityConstraintName(); reportSchemaError(code, new Object[] { field.toString(), fElementName, cName }); return; String code = "FieldMultipleMatch"; String cName = fIdentityConstraint.getIdentityConstraintName(); reportSchemaError(code, new Object[] { field.toString(), cName });