KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xerces > xni > grammars > Grammar


1 /*
2  * Copyright 2000-2002,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.xerces.xni.grammars;
18
19 /**
20  * A generic grammar for use in validating XML documents. The Grammar
21  * object stores the validation information in a compiled form. Specific
22  * subclasses extend this class and "populate" the grammar by compiling
23  * the specific syntax (DTD, Schema, etc) into the data structures used
24  * by this object.
25  * <p>
26  * <strong>Note:</strong> The Grammar object is not useful as a generic
27  * grammar access or query object. In other words, you cannot round-trip
28  * specific grammar syntaxes with the compiled grammar information in
29  * the Grammar object. You <em>can</em> create equivalent validation
30  * rules in your choice of grammar syntax but there is no guarantee that
31  * the input and output will be the same.
32  *
33  * <p> Right now, this class is largely a shell; eventually,
34  * it will be enriched by having more expressive methods added. </p>
35  * will be moved from dtd.Grammar here.
36  *
37  * @author Jeffrey Rodriguez, IBM
38  * @author Eric Ye, IBM
39  * @author Andy Clark, IBM
40  * @author Neil Graham, IBM
41  *
42  * @version $Id: Grammar.java,v 1.6 2004/02/24 23:15:58 mrglavas Exp $
43  */

44
45 public interface Grammar {
46
47     /**
48      * get the <code>XMLGrammarDescription</code> associated with this
49      * object
50      */

51     public XMLGrammarDescription getGrammarDescription ();
52 } // interface Grammar
53

54
Popular Tags