org.relaxng.datatype
Interface ValidationContext

All Known Subinterfaces:
IDContextProvider

public interface ValidationContext

An interface that must be implemented by caller to provide context information that is necessary to perform validation of some Datatypes.

Author:
James Clark, Kohsuke KAWAGUCHI

Method Summary
 boolean isNotation(String notationName)
          checks if a notation is declared with the specified name.
 boolean isUnparsedEntity(String entityName)
          checks if an unparsed entity is declared with the specified name.
 String resolveNamespacePrefix(String prefix)
          Resolves a namespace prefix to the corresponding namespace URI.
 

Method Detail

resolveNamespacePrefix

public String resolveNamespacePrefix(String prefix)
Resolves a namespace prefix to the corresponding namespace URI. This method is used for validating QName, for example.

If the prefix is "" (empty string), it indicates unprefixed value. The callee should resolved it as if it sees an unprefixed element, rather than unprefixed attribute.

If the prefix is "xml", then the callee must resolve this prefix into "http://www.w3.org/XML/1998/namespace", as defined in the XML Namespace rec.

Returns:
namespace URI of this prefix. If the specified prefix is not declared, the implementation must return null.

isUnparsedEntity

public boolean isUnparsedEntity(String entityName)
checks if an unparsed entity is declared with the specified name.
Returns:
true if DTD has an unparsed entity declaration for the specified name. false if otherwise.

isNotation

public boolean isNotation(String notationName)
checks if a notation is declared with the specified name.
Returns:
true if DTD has a notation declaration with the specified name. false if otherwise.