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