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