public final class ConfigurableValidationState extends ValidationState
An extension of ValidationState which can be configured to turn off checking for ID/IDREF errors and unparsed entity errors.
Constructor and Description |
---|
ConfigurableValidationState()
Creates a new ConfigurableValidationState.
|
Modifier and Type | Method and Description |
---|---|
void |
addId(java.lang.String name)
Adds the ID, if ID/IDREF checking is enabled.
|
void |
addIdRef(java.lang.String name)
Adds the IDREF, if ID/IDREF checking is enabled.
|
java.util.Iterator |
checkIDRefID()
Checks if all IDREFs have a corresponding ID.
|
boolean |
isEntityDeclared(java.lang.String name)
Checks if an entity is declared.
|
boolean |
isEntityUnparsed(java.lang.String name)
Checks if an entity is unparsed.
|
boolean |
isIdDeclared(java.lang.String name)
Checks if an ID has already been declared.
|
void |
setIdIdrefChecking(boolean setting)
Turns checking for ID/IDREF errors on and off.
|
void |
setUnparsedEntityChecking(boolean setting)
Turns checking for unparsed entity errors on and off.
|
getLocale, getSymbol, getURI, needExtraChecking, needFacetChecking, needToNormalize, reset, resetIDTables, setEntityState, setExtraChecking, setFacetChecking, setLocale, setNamespaceSupport, setNormalizationRequired, setSymbolTable, setUsingNamespaces, useNamespaces
public ConfigurableValidationState()
public void setIdIdrefChecking(boolean setting)
setting
- true to turn on error checking,
false to turn off error checkingpublic void setUnparsedEntityChecking(boolean setting)
setting
- true to turn on error checking,
false to turn off error checkingpublic java.util.Iterator checkIDRefID()
checkIDRefID
in class ValidationState
public boolean isIdDeclared(java.lang.String name)
isIdDeclared
in interface ValidationContext
isIdDeclared
in class ValidationState
public boolean isEntityDeclared(java.lang.String name)
isEntityDeclared
in interface ValidationContext
isEntityDeclared
in class ValidationState
public boolean isEntityUnparsed(java.lang.String name)
isEntityUnparsed
in interface ValidationContext
isEntityUnparsed
in class ValidationState
public void addId(java.lang.String name)
addId
in interface ValidationContext
addId
in class ValidationState
name
- the ID to addpublic void addIdRef(java.lang.String name)
addIdRef
in interface ValidationContext
addIdRef
in class ValidationState
name
- the IDREF to addCopyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.