View Javadoc
1   /*
2    * reserved comment block
3    * DO NOT REMOVE OR ALTER!
4    */
5   /*
6    * Copyright 2000-2002,2004 The Apache Software Foundation.
7    *
8    * Licensed under the Apache License, Version 2.0 (the "License");
9    * you may not use this file except in compliance with the License.
10   * You may obtain a copy of the License at
11   *
12   *      http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing, software
15   * distributed under the License is distributed on an "AS IS" BASIS,
16   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17   * See the License for the specific language governing permissions and
18   * limitations under the License.
19   */
20  
21  package com.sun.org.apache.xerces.internal.xni.grammars;
22  
23  /**
24   * A generic grammar for use in validating XML documents. The Grammar
25   * object stores the validation information in a compiled form. Specific
26   * subclasses extend this class and "populate" the grammar by compiling
27   * the specific syntax (DTD, Schema, etc) into the data structures used
28   * by this object.
29   * <p>
30   * <strong>Note:</strong> The Grammar object is not useful as a generic
31   * grammar access or query object. In other words, you cannot round-trip
32   * specific grammar syntaxes with the compiled grammar information in
33   * the Grammar object. You <em>can</em> create equivalent validation
34   * rules in your choice of grammar syntax but there is no guarantee that
35   * the input and output will be the same.
36   *
37   * <p> Right now, this class is largely a shell; eventually,
38   * it will be enriched by having more expressive methods added. </p>
39   * will be moved from dtd.Grammar here.
40   *
41   * @author Jeffrey Rodriguez, IBM
42   * @author Eric Ye, IBM
43   * @author Andy Clark, IBM
44   * @author Neil Graham, IBM
45   *
46   */
47  
48  public interface Grammar {
49  
50      /**
51       * get the <code>XMLGrammarDescription</code> associated with this
52       * object
53       */
54      public XMLGrammarDescription getGrammarDescription ();
55  } // interface Grammar