- href="mailto:jjc@jclark.com">James Clark
- href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI
Field Summary | ||
---|---|---|
public static final int | ID_TYPE_NULL | Indicates that the datatype doesn't have ID/IDREF semantics. This value is one of the possible return values of the #getIdType method. |
public static final int | ID_TYPE_ID | Indicates that RELAX NG compatibility processors should treat this datatype as having ID semantics. This value is one of the possible return values of the #getIdType method. |
public static final int | ID_TYPE_IDREF | Indicates that RELAX NG compatibility processors should treat this datatype as having IDREF semantics. This value is one of the possible return values of the #getIdType method. |
public static final int | ID_TYPE_IDREFS | Indicates that RELAX NG compatibility processors should treat this datatype as having IDREFS semantics. This value is one of the possible return values of the #getIdType method. |
Method from org.relaxng.datatype.Datatype Summary: |
---|
checkValid, createStreamingValidator, createValue, getIdType, isContextDependent, isValid, sameValue, valueHashCode |
Method from org.relaxng.datatype.Datatype Detail: |
---|
If the specified 'literal' is a valid lexical representation for this datatype, then this method must return without throwing any exception. If not, the callee must throw an exception (with diagnosis message, if possible.) The application can use this method to provide detailed error message to users. This method is kept separate from the isValid method to achieve higher performance during normal validation. |
By using streaming validators instead of the isValid method, the caller can avoid keeping the entire string, which is sometimes quite big, in memory. |
The caller cannot generally assume that the value object is
a meaningful Java object. For example, the caller cannot expect
this method to return
Also, the caller cannot assume that the equals method and
the hashCode method of the value object are consistent with
the semantics of the datatype. For that purpose, the sameValue
method and the valueHashCode method have to be used. Note that
this means you cannot use classes like
The returned value object should be used solely for the sameValue and valueHashCode methods. |
This method is introduced to support the RELAX NG DTD compatibility spec. (Of course it's always free to use this method for other purposes.)
If you are implementing a datatype library and have no idea about
the "RELAX NG DTD compatibility" thing, just return
|
The callee must return true even when the context is not always necessary. (For example, the "QName" type doesn't need a context object when validating unprefixed string. But nonetheless QName must return true.)
XSD's When a datatype is context-independent, then the #isValid method, the #checkValid method, the #createStreamingValidator method and the #createValue method can be called without providing a context object. |
|
|
|