Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.exist.validation
Class EntityResolver

    java.lang.Object
      org.exist.validation.EntityResolver

All Implemented Interfaces:
  org.apache.xerces.xni.parser.XMLEntityResolver

public class EntityResolver
extends java.lang.Object
implements org.apache.xerces.xni.parser.XMLEntityResolver

Specific grammar resolver for eXist. Currently supports XSD and DTD. XML Schemas and DTD grammars are stored in collections of the database: /db/system/grammar/xsd /db/system/grammar/dtd The XSD's are resolved automatically using xQuery. For DTD's (hey this is ancient stuff, these are no xml documents) separate data management is required. The details are stored in /db/system/grammar/dtd/catalog/xml Extra bonus: an xQuery generating a catalogus with DTD's and XSD's /db/system/grammar/xq/catalog.xq

Author:
  dizzzz
See Also:
  `NOTES ===== - Keep list called grammar id's. For first grammar the base URI must be set. other grammars must be found relative, unless full path is used. - If not schema but folder is supplied, use this folder as startpoint search grammar set -`

Constructor Summary
`EntityResolver(DatabaseResources resources)` Initialize EntityResolver.

Method Summary
`org.apache.xerces.xni.parser.XMLInputSource` | `resolveEntity(org.apache.xerces.xni.XMLResourceIdentifier xrid)` Resolve GRAMMAR specified with this GRAMMAR id
`void` | `setStartGrammarPath(java.lang.String path)` WHat can be supplied: - path to collection (/db/foo/bar/) In this case all grammars must be searched.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### EntityResolver

    public EntityResolver(DatabaseResources resources)

  Initialize EntityResolver.

Parameters:
  `resources` -

Method Detail

### setStartGrammarPath

    public void setStartGrammarPath(java.lang.String path)

  WHat can be supplied: - path to collection (/db/foo/bar/) In this case all grammars must be searched. o Grammars can be found using xquery o DTD's can only be found by finding catalog files. - path to start schema (/db/foo/bar/special.xsd) The pointed grammar -if it exist- must be used - path to catalog file (/db/foo/bar/catalog.xml)

  Parameters:
    `path` - Path tp

### resolveEntity

    public org.apache.xerces.xni.parser.XMLInputSource resolveEntity(org.apache.xerces.xni.XMLResourceIdentifier xrid)
                                                              throws org.apache.xerces.xni.XNIException,
                                                                     java.io.IOException

  Resolve GRAMMAR specified with this GRAMMAR id

  Specified by:
    `resolveEntity` in interface `org.apache.xerces.xni.parser.XMLEntityResolver`
  Parameters:
    `xrid` - Grammar Identifier.
  Returns:
    Inputsource containing grammar.
  Throws:
    `org.apache.xerces.xni.XNIException` - Xerces exception, can be anything
    `java.io.IOException` - Can be anything

Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) Wolfgang Meier. All rights reserved.