sk.uniba.euromath.document.schema.plug
Interface IValidationContextP

All Known Implementing Classes:
ValidationContextImpl

public interface IValidationContextP

Provides context information that is necessary to perform validation of some Datatypes. This class is given to schema.

Author:
Martin Vysny

Method Summary
 boolean isNotation(String notationName)
          Checks if a notation is declared with the specified name.
 boolean isUnparsedEntity(String entityName, String namespace)
          Checks if an unparsed entity is declared with the specified name.
 String resolveNamespacePrefix(String prefix)
          Resolves a namespace prefix to the corresponding namespace URI.
 void validate(Element element)
          Performs full validation over given element.
 

Method Detail

isNotation

boolean isNotation(String notationName)
Checks if a notation is declared with the specified name.

Parameters:
notationName - the notation name
Returns:
true if such notation is declared.

resolveNamespacePrefix

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

Parameters:
prefix - If the prefix is "" (empty string), it indicates an unprefixed value. Because of the prefix management, it will be always resolved to empty string. If the prefix is "xml", it will be resolved to "http://www.w3.org/XML/1998/namespace", as defined in the XML Namespaces Recommendation.
Returns:
namespace URI of this prefix, or null, if the specified prefix is not declared.

isUnparsedEntity

boolean isUnparsedEntity(String entityName,
                         String namespace)
Checks if an unparsed entity is declared with the specified name.

Parameters:
entityName - the entity name.
namespace - namespace, where this entity occured.
Returns:
true if document or appropriate schema has an unparsed entity declaration for the specified name. false otherwise.

validate

void validate(Element element)
              throws SchemaException
Performs full validation over given element. This element must be one of root elements from some schema, or an SchemaException will be thrown.

Parameters:
element - element to be validated.
Throws:
SchemaException - thrown if element isn't the root element, or if given uri doesn't exist, or it is thrown by underlying schema.validate.


Copyright © 2003-2006 null. All Rights Reserved.