Class Overview
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@xerces.internal
Summary
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
Constants
protected
static
final
int
DT_ANYURI
Constant Value:
0
(0x00000000)
protected
static
final
int
DT_BLOCK
Constant Value:
-1
(0xffffffff)
protected
static
final
int
DT_BLOCK1
Constant Value:
-2
(0xfffffffe)
protected
static
final
int
DT_BOOLEAN
Constant Value:
-15
(0xfffffff1)
protected
static
final
int
DT_COUNT
Constant Value:
9
(0x00000009)
protected
static
final
int
DT_FINAL
Constant Value:
-3
(0xfffffffd)
protected
static
final
int
DT_FINAL1
Constant Value:
-4
(0xfffffffc)
protected
static
final
int
DT_FINAL2
Constant Value:
-5
(0xfffffffb)
protected
static
final
int
DT_FORM
Constant Value:
-6
(0xfffffffa)
protected
static
final
int
DT_ID
Constant Value:
1
(0x00000001)
protected
static
final
int
DT_LANGUAGE
Constant Value:
8
(0x00000008)
protected
static
final
int
DT_MAXOCCURS
Constant Value:
-7
(0xfffffff9)
protected
static
final
int
DT_MAXOCCURS1
Constant Value:
-8
(0xfffffff8)
protected
static
final
int
DT_MEMBERTYPES
Constant Value:
-9
(0xfffffff7)
protected
static
final
int
DT_MINOCCURS1
Constant Value:
-10
(0xfffffff6)
protected
static
final
int
DT_NAMESPACE
Constant Value:
-11
(0xfffffff5)
protected
static
final
int
DT_NCNAME
Constant Value:
5
(0x00000005)
protected
static
final
int
DT_NONNEGINT
Constant Value:
-16
(0xfffffff0)
protected
static
final
int
DT_POSINT
Constant Value:
-17
(0xffffffef)
protected
static
final
int
DT_PROCESSCONTENTS
Constant Value:
-12
(0xfffffff4)
protected
static
final
int
DT_QNAME
Constant Value:
2
(0x00000002)
protected
static
final
int
DT_STRING
Constant Value:
3
(0x00000003)
protected
static
final
int
DT_TOKEN
Constant Value:
4
(0x00000004)
protected
static
final
int
DT_USE
Constant Value:
-13
(0xfffffff3)
protected
static
final
int
DT_WHITESPACE
Constant Value:
-14
(0xfffffff2)
protected
static
final
int
DT_XPATH
Constant Value:
6
(0x00000006)
protected
static
final
int
DT_XPATH1
Constant Value:
7
(0x00000007)
Fields
public
static
final
int
ATTIDX_ABSTRACT
public
static
final
int
ATTIDX_AFORMDEFAULT
public
static
final
int
ATTIDX_BASE
public
static
final
int
ATTIDX_BLOCK
public
static
final
int
ATTIDX_BLOCKDEFAULT
public
static
final
int
ATTIDX_DEFAULT
public
static
final
int
ATTIDX_EFORMDEFAULT
public
static
final
int
ATTIDX_ENUMNSDECLS
public
static
final
int
ATTIDX_FINAL
public
static
final
int
ATTIDX_FINALDEFAULT
public
static
final
int
ATTIDX_FIXED
public
static
final
int
ATTIDX_FORM
public
static
final
int
ATTIDX_FROMDEFAULT
public
static
final
int
ATTIDX_ID
public
static
final
int
ATTIDX_ISRETURNED
public
static
final
int
ATTIDX_ITEMTYPE
public
static
final
int
ATTIDX_MAXOCCURS
public
static
final
int
ATTIDX_MEMBERTYPES
public
static
final
int
ATTIDX_MINOCCURS
public
static
final
int
ATTIDX_MIXED
public
static
final
int
ATTIDX_NAME
public
static
final
int
ATTIDX_NAMESPACE
public
static
final
int
ATTIDX_NAMESPACE_LIST
public
static
final
int
ATTIDX_NILLABLE
public
static
final
int
ATTIDX_NONSCHEMA
public
static
final
int
ATTIDX_PROCESSCONTENTS
public
static
final
int
ATTIDX_PUBLIC
public
static
final
int
ATTIDX_REF
public
static
final
int
ATTIDX_REFER
public
static
final
int
ATTIDX_SCHEMALOCATION
public
static
final
int
ATTIDX_SOURCE
public
static
final
int
ATTIDX_SUBSGROUP
public
static
final
int
ATTIDX_SYSTEM
public
static
final
int
ATTIDX_TARGETNAMESPACE
public
static
final
int
ATTIDX_TYPE
public
static
final
int
ATTIDX_USE
public
static
final
int
ATTIDX_VALUE
public
static
final
int
ATTIDX_VERSION
public
static
final
int
ATTIDX_XML_LANG
public
static
final
int
ATTIDX_XPATH
protected
Vector
fNamespaceList
protected
boolean[]
fSeen
Public Constructors
public
XSAttributeChecker
(XSDHandler schemaHandler)
Public Methods
public
Object[]
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. 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 |
isGlobal
| whether a child of <schema> or <redefine> |
schemaDoc
| the document where the element lives in |
enumAsQName
| whether to tread enumeration value as QName |
Returns
- an array containing attribute values
public
Object[]
checkAttributes
(Element element, boolean isGlobal, XSDocumentInfo schemaDoc)
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 |
isGlobal
| whether a child of <schema> or <redefine> |
schemaDoc
| the document where the element lives in |
Returns
- an array containing attribute values
public
void
returnAttrArray
(Object[] attrArray, XSDocumentInfo schemaDoc)
Protected Methods