1 package org.relaxng.datatype;
\r
4 * An interface that must be implemented by caller to
\r
5 * provide context information that is necessary to
\r
6 * perform validation of some Datatypes.
\r
8 * @author <a href="mailto:jjc@jclark.com">James Clark</a>
\r
9 * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
\r
11 public interface ValidationContext {
\r
14 * Resolves a namespace prefix to the corresponding namespace URI.
\r
16 * This method is used for validating the QName type, for example.
\r
19 * If the prefix is "" (empty string), it indicates
\r
20 * an unprefixed value. The callee
\r
21 * should resolve it as for an unprefixed
\r
22 * element, rather than for an unprefixed attribute.
\r
25 * If the prefix is "xml", then the callee must resolve
\r
26 * this prefix into "http://www.w3.org/XML/1998/namespace",
\r
27 * as defined in the XML Namespaces Recommendation.
\r
30 * namespace URI of this prefix.
\r
31 * If the specified prefix is not declared,
\r
32 * the implementation must return null.
\r
34 String resolveNamespacePrefix( String prefix );
\r
37 * Returns the base URI of the context. The null string may be returned
\r
38 * if no base URI is known.
\r
40 String getBaseUri();
\r
43 * Checks if an unparsed entity is declared with the
\r
48 * if the DTD has an unparsed entity declaration for
\r
49 * the specified name.
\r
53 boolean isUnparsedEntity( String entityName );
\r
56 * Checks if a notation is declared with the
\r
61 * if the DTD has a notation declaration for the specified name.
\r
65 boolean isNotation( String notationName );
\r