org.apache.xerces.impl.dv.dtd
Class IDDatatypeValidator

java.lang.Object
  extended by org.apache.xerces.impl.dv.dtd.IDDatatypeValidator
All Implemented Interfaces:
DatatypeValidator
Direct Known Subclasses:
XML11IDDatatypeValidator

public class IDDatatypeValidator
extends java.lang.Object
implements DatatypeValidator

IDDatatypeValidator - ID represents the ID attribute type from XML 1.0 Recommendation. The value space od ID is the set of all strings that match the NCName production and have been used in an XML document. The lexical space of ID is the set of all strings that match the NCName production.

The value space of ID is scoped to a specific instance document.

The following constraint applies: An ID must not appear more than once in an XML document as a value of this type; i.e., ID values must uniquely identify the elements which bear them.

Version:
$Id: IDDatatypeValidator.java 446749 2006-09-15 21:51:23Z mrglavas $
Author:
Jeffrey Rodriguez, IBM, Sandy Gao, IBM

Constructor Summary
IDDatatypeValidator()
           
 
Method Summary
 void validate(java.lang.String content, ValidationContext context)
          Checks that "content" string is valid ID value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IDDatatypeValidator

public IDDatatypeValidator()
Method Detail

validate

public void validate(java.lang.String content,
                     ValidationContext context)
              throws InvalidDatatypeValueException
Checks that "content" string is valid ID value. If invalid a Datatype validation exception is thrown.

Specified by:
validate in interface DatatypeValidator
Parameters:
content - the string value that needs to be validated
context - the validation context
Throws:
InvalidDatatypeException - if the content is invalid according to the rules for the validators
InvalidDatatypeValueException
See Also:
InvalidDatatypeValueException