com.sun.msv.grammar
Interface IDContextProvider

All Superinterfaces:
ValidationContext
All Known Implementing Classes:
GrammarReader, AbstractVerifier

public interface IDContextProvider
extends ValidationContext

ValidationContextProvider that supports limited ID/IDREF implementation.

Author:
Kohsuke KAWAGUCHI

Method Summary
 boolean onID(String symbolSpaceURI, String symbolSpaceLocalName, Object newIDToken)
          this method is called when another ID is found to check whether this ID is already used or not.
 void onIDREF(String symbolSpaceURI, String symbolSpaceLocalName, Object idrefToken)
          this method is called when an IDREF is found.
 
Methods inherited from interface org.relaxng.datatype.ValidationContext
isNotation, isUnparsedEntity, resolveNamespacePrefix
 

Method Detail

onID

public boolean onID(String symbolSpaceURI,
                    String symbolSpaceLocalName,
                    Object newIDToken)
this method is called when another ID is found to check whether this ID is already used or not. It is the callee's responsibility that stores ID and checks doubly defined ID.
Parameters:
symbolSpaceName - token has to be unique within the same symbol space, but two tokens can have the same name if they reside in different symbol spaces.
Returns:
true if there is no preceding ID of the same name; false if this name is already declared as ID.

onIDREF

public void onIDREF(String symbolSpaceURI,
                    String symbolSpaceLocalName,
                    Object idrefToken)
this method is called when an IDREF is found. It is the callee's responsibility to store it and checks the existance of corresponding IDs later. Note that due to the forward reference, it is not possible to perform this check when IDREF is found. It must be done separately after parsing the entire document.