Class XSAttributeCheck is used to check the validity of attributes
appearing in the schema document. It
- reports an error for invalid element (invalid namespace, invalid name)
- reports an error for invalid attribute (invalid namespace, invalid name)
- reports an error for invalid attribute value
- return compiled values for attriute values
- provide default value for missing optional attributes
- provide default value for incorrect attribute values
But it's the caller's responsibility to check whether a required attribute
is present.
Things need revisiting:
- Whether to return non-schema attributes/values
- Do we need to update NamespaceScope and ErrorReporter when reset()?
- Should have the datatype validators return compiled value
- use symbol table instead of many hashtables
author: Sandy Gao, IBM version: $Id: XSAttributeChecker.java 471890 2006-11-06 22:00:18Z mrglavas $
checkAttributes(Element element, boolean isGlobal, XSDocumentInfo schemaDoc) Check whether the specified element conforms to the attributes restriction
an array of attribute values is returned.
checkAttributes(Element element, boolean isGlobal, XSDocumentInfo schemaDoc, boolean enumAsQName) Check whether the specified element conforms to the attributes restriction
an array of attribute values is returned.
Check whether the specified element conforms to the attributes restriction
an array of attribute values is returned. the caller must call
returnAttrArray to return that array.
Parameters: element - which element to check Parameters: isGlobal - whether a child of <schema> or <redefine> Parameters: schemaDoc - the document where the element lives in an array containing attribute values
Check whether the specified element conforms to the attributes restriction
an array of attribute values is returned. the caller must call
returnAttrArray to return that array. This method also takes
an extra parameter: if the element is "enumeration", whether to make a
copy of the namespace context, so that the value can be resolved as a
QName later.
Parameters: element - which element to check Parameters: isGlobal - whether a child of <schema> or <redefine> Parameters: schemaDoc - the document where the element lives in Parameters: enumAsQName - whether to tread enumeration value as QName an array containing attribute values