KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xerces > parsers > AbstractXMLDocumentParser


1 /*
2  * Copyright 2001, 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.parsers;
18
19 import org.apache.xerces.xni.Augmentations;
20 import org.apache.xerces.xni.NamespaceContext;
21 import org.apache.xerces.xni.QName;
22 import org.apache.xerces.xni.XMLAttributes;
23 import org.apache.xerces.xni.XMLDTDContentModelHandler;
24 import org.apache.xerces.xni.XMLDTDHandler;
25 import org.apache.xerces.xni.XMLDocumentHandler;
26 import org.apache.xerces.xni.XMLLocator;
27 import org.apache.xerces.xni.XMLResourceIdentifier;
28 import org.apache.xerces.xni.XMLString;
29 import org.apache.xerces.xni.XNIException;
30 import org.apache.xerces.xni.parser.XMLDTDContentModelSource;
31 import org.apache.xerces.xni.parser.XMLDTDSource;
32 import org.apache.xerces.xni.parser.XMLDocumentSource;
33 import org.apache.xerces.xni.parser.XMLParserConfiguration;
34
35 /**
36  * This is the base class for all XML document parsers. XMLDocumentParser
37  * provides a common implementation shared by the various document parsers
38  * in the Xerces package. While this class is provided for convenience, it
39  * does not prevent other kinds of parsers to be constructed using the XNI
40  * interfaces.
41  *
42  * @author Arnaud Le Hors, IBM
43  * @author Andy Clark, IBM
44  *
45  * @version $Id: AbstractXMLDocumentParser.java,v 1.18 2004/02/24 23:15:56 mrglavas Exp $
46  */

47 public abstract class AbstractXMLDocumentParser
48     extends XMLParser
49     implements XMLDocumentHandler, XMLDTDHandler, XMLDTDContentModelHandler {
50
51     //
52
// Data
53
//
54

55     // state
56

57     /** True if inside DTD. */
58     protected boolean fInDTD;
59
60     /** Document source*/
61     protected XMLDocumentSource fDocumentSource;
62
63     /** DTD source*/
64     protected XMLDTDSource fDTDSource;
65
66     /** DTD content model source*/
67     protected XMLDTDContentModelSource fDTDContentModelSource;
68
69     //
70
// Constructors
71
//
72

73     /**
74      * Constructs a document parser using the default symbol table
75      * and grammar pool.
76      */

77     protected AbstractXMLDocumentParser(XMLParserConfiguration config) {
78         super(config);
79
80         // set handlers
81
config.setDocumentHandler(this);
82         config.setDTDHandler(this);
83         config.setDTDContentModelHandler(this);
84
85     } // <init>(XMLParserConfiguration)
86

87     //
88
// XMLDocumentHandler methods
89
//
90

91     /**
92      * The start of the document.
93      *
94      * @param locator The system identifier of the entity if the entity
95      * is external, null otherwise.
96      * @param encoding The auto-detected IANA encoding name of the entity
97      * stream. This value will be null in those situations
98      * where the entity encoding is not auto-detected (e.g.
99      * internal entities or a document entity that is
100      * parsed from a java.io.Reader).
101      * @param namespaceContext
102      * The namespace context in effect at the
103      * start of this document.
104      * This object represents the current context.
105      * Implementors of this class are responsible
106      * for copying the namespace bindings from the
107      * the current context (and its parent contexts)
108      * if that information is important.
109      * @param augs Additional information that may include infoset augmentations
110      *
111      * @throws XNIException Thrown by handler to signal an error.
112      */

113
114     public void startDocument(XMLLocator locator, String JavaDoc encoding,
115                               NamespaceContext namespaceContext, Augmentations augs)
116         throws XNIException {
117     } // startDocument(XMLLocator,String)
118

119     /**
120      * Notifies of the presence of an XMLDecl line in the document. If
121      * present, this method will be called immediately following the
122      * startDocument call.
123      *
124      * @param version The XML version.
125      * @param encoding The IANA encoding name of the document, or null if
126      * not specified.
127      * @param standalone The standalone value, or null if not specified.
128      * @param augs Additional information that may include infoset augmentations
129      *
130      * @throws XNIException Thrown by handler to signal an error.
131      */

132     public void xmlDecl(String JavaDoc version, String JavaDoc encoding, String JavaDoc standalone, Augmentations augs)
133         throws XNIException {
134     } // xmlDecl(String,String,String)
135

136     /**
137      * Notifies of the presence of the DOCTYPE line in the document.
138      *
139      * @param rootElement The name of the root element.
140      * @param publicId The public identifier if an external DTD or null
141      * if the external DTD is specified using SYSTEM.
142      * @param systemId The system identifier if an external DTD, null
143      * @param augs Additional information that may include infoset augmentations
144      * otherwise.
145      *
146      * @throws XNIException Thrown by handler to signal an error.
147      */

148     public void doctypeDecl(String JavaDoc rootElement, String JavaDoc publicId, String JavaDoc systemId, Augmentations augs)
149         throws XNIException {
150     } // doctypeDecl(String,String,String)
151

152     /**
153      * The start of an element. If the document specifies the start element
154      * by using an empty tag, then the startElement method will immediately
155      * be followed by the endElement method, with no intervening methods.
156      *
157      * @param element The name of the element.
158      * @param attributes The element attributes.
159      * @param augs Additional information that may include infoset augmentations
160      *
161      * @throws XNIException Thrown by handler to signal an error.
162      */

163     public void startElement(QName element, XMLAttributes attributes, Augmentations augs)
164         throws XNIException {
165     } // startElement(QName,XMLAttributes)
166

167     /**
168      * An empty element.
169      *
170      * @param element The name of the element.
171      * @param attributes The element attributes.
172      * @param augs Additional information that may include infoset augmentations
173      *
174      * @throws XNIException Thrown by handler to signal an error.
175      */

176     public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs)
177         throws XNIException {
178
179         startElement(element, attributes, augs);
180         endElement(element, augs);
181
182     } // emptyElement(QName,XMLAttributes)
183

184     /**
185      * Character content.
186      *
187      * @param text The content.
188      * @param augs Additional information that may include infoset augmentations
189      *
190      * @throws XNIException Thrown by handler to signal an error.
191      */

192     public void characters(XMLString text, Augmentations augs) throws XNIException {
193     } // characters(XMLString)
194

195     /**
196      * Ignorable whitespace. For this method to be called, the document
197      * source must have some way of determining that the text containing
198      * only whitespace characters should be considered ignorable. For
199      * example, the validator can determine if a length of whitespace
200      * characters in the document are ignorable based on the element
201      * content model.
202      *
203      * @param text The ignorable whitespace.
204      * @param augs Additional information that may include infoset augmentations
205      *
206      * @throws XNIException Thrown by handler to signal an error.
207      */

208     public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException {
209     } // ignorableWhitespace(XMLString)
210

211     /**
212      * The end of an element.
213      *
214      * @param element The name of the element.
215      * @param augs Additional information that may include infoset augmentations
216      *
217      * @throws XNIException Thrown by handler to signal an error.
218      */

219     public void endElement(QName element, Augmentations augs) throws XNIException {
220     } // endElement(QName)
221

222     /**
223      * The start of a CDATA section.
224      * @param augs Additional information that may include infoset augmentations
225      *
226      * @throws XNIException Thrown by handler to signal an error.
227      */

228     public void startCDATA(Augmentations augs) throws XNIException {
229     } // startCDATA()
230

231     /**
232      * The end of a CDATA section.
233      * @param augs Additional information that may include infoset augmentations
234      *
235      * @throws XNIException Thrown by handler to signal an error.
236      */

237     public void endCDATA(Augmentations augs) throws XNIException {
238     } // endCDATA()
239

240     /**
241      * The end of the document.
242      * @param augs Additional information that may include infoset augmentations
243      *
244      * @throws XNIException Thrown by handler to signal an error.
245      */

246     public void endDocument(Augmentations augs) throws XNIException {
247     } // endDocument()
248

249
250     /**
251      * This method notifies the start of an entity.
252      * <p>
253      * <strong>Note:</strong> This method is not called for entity references
254      * appearing as part of attribute values.
255      *
256      * @param name The name of the entity.
257      * @param identifier The resource identifier.
258      * @param encoding The auto-detected IANA encoding name of the entity
259      * stream. This value will be null in those situations
260      * where the entity encoding is not auto-detected (e.g.
261      * internal entities or a document entity that is
262      * parsed from a java.io.Reader).
263      * @param augs Additional information that may include infoset augmentations
264      *
265      * @exception XNIException Thrown by handler to signal an error.
266      */

267     public void startGeneralEntity(String JavaDoc name,
268                                    XMLResourceIdentifier identifier,
269                                    String JavaDoc encoding,
270                                    Augmentations augs) throws XNIException {
271     } // startGeneralEntity(String,XMLResourceIdentifier,String,Augmentations)
272

273     /**
274      * Notifies of the presence of a TextDecl line in an entity. If present,
275      * this method will be called immediately following the startEntity call.
276      * <p>
277      * <strong>Note:</strong> This method will never be called for the
278      * document entity; it is only called for external general entities
279      * referenced in document content.
280      * <p>
281      * <strong>Note:</strong> This method is not called for entity references
282      * appearing as part of attribute values.
283      *
284      * @param version The XML version, or null if not specified.
285      * @param encoding The IANA encoding name of the entity.
286      * @param augs Additional information that may include infoset augmentations
287      *
288      * @exception XNIException
289      * Thrown by handler to signal an error.
290      */

291     public void textDecl(String JavaDoc version, String JavaDoc encoding, Augmentations augs) throws XNIException {
292     } // textDecl(String, String, Augmentations)
293

294     /**
295      * This method notifies the end of an entity.
296      * <p>
297      * <strong>Note:</strong> This method is not called for entity references
298      * appearing as part of attribute values.
299      *
300      * @param name The name of the entity.
301      * @param augs Additional information that may include infoset augmentations
302      *
303      * @exception XNIException
304      * Thrown by handler to signal an error.
305      */

306     public void endGeneralEntity(String JavaDoc name, Augmentations augs)
307         throws XNIException {
308     } // endGeneralEntity(String,Augmentations)
309

310     /**
311      * A comment.
312      *
313      * @param text The text in the comment.
314      * @param augs Additional information that may include infoset augmentations
315      *
316      * @exception XNIException
317      * Thrown by application to signal an error.
318      */

319     public void comment(XMLString text, Augmentations augs) throws XNIException {
320     } // comment (XMLString, Augmentations)
321

322     /**
323      * A processing instruction. Processing instructions consist of a
324      * target name and, optionally, text data. The data is only meaningful
325      * to the application.
326      * <p>
327      * Typically, a processing instruction's data will contain a series
328      * of pseudo-attributes. These pseudo-attributes follow the form of
329      * element attributes but are <strong>not</strong> parsed or presented
330      * to the application as anything other than text. The application is
331      * responsible for parsing the data.
332      *
333      * @param target The target.
334      * @param data The data or null if none specified.
335      * @param augs Additional information that may include infoset augmentations
336      *
337      * @exception XNIException
338      * Thrown by handler to signal an error.
339      */

340     public void processingInstruction(String JavaDoc target, XMLString data, Augmentations augs)
341         throws XNIException {
342     } // processingInstruction(String, XMLString, Augmentations)
343

344     
345     /** Sets the document source */
346     public void setDocumentSource(XMLDocumentSource source){
347         fDocumentSource = source;
348     } // setDocumentSource
349

350     /** Returns the document source */
351     public XMLDocumentSource getDocumentSource (){
352         return fDocumentSource;
353     } // getDocumentSource
354
//
355
// XMLDTDHandler methods
356
//
357

358     /**
359      * The start of the DTD.
360      *
361      * @param locator The document locator, or null if the document
362      * location cannot be reported during the parsing of
363      * the document DTD. However, it is <em>strongly</em>
364      * recommended that a locator be supplied that can
365      * at least report the base system identifier of the
366      * DTD.
367      * @param augs Additional information that may include infoset
368      * augmentations.
369      *
370      * @throws XNIException Thrown by handler to signal an error.
371      */

372     public void startDTD(XMLLocator locator, Augmentations augs) throws XNIException {
373         fInDTD = true;
374     } // startDTD(XMLLocator)
375

376
377     /**
378      * The start of the DTD external subset.
379      *
380      * @param augmentations Additional information that may include infoset
381      * augmentations.
382      *
383      * @throws XNIException Thrown by handler to signal an error.
384      */

385     public void startExternalSubset(XMLResourceIdentifier identifier, Augmentations augmentations)
386         throws XNIException {
387     } // startExternalSubset(Augmentations)
388

389     /**
390      * The end of the DTD external subset.
391      *
392      * @param augmentations Additional information that may include infoset
393      * augmentations.
394      *
395      * @throws XNIException Thrown by handler to signal an error.
396      */

397     public void endExternalSubset(Augmentations augmentations)
398         throws XNIException {
399     } // endExternalSubset(Augmentations)
400

401     /**
402      * This method notifies the start of an entity.
403      * <p>
404      * <strong>Note:</strong> This method is not called for entity references
405      * appearing as part of attribute values.
406      *
407      * @param name The name of the entity.
408      * @param identifier The resource identifier.
409      * @param encoding The auto-detected IANA encoding name of the entity
410      * stream. This value will be null in those situations
411      * where the entity encoding is not auto-detected (e.g.
412      * internal entities or a document entity that is
413      * parsed from a java.io.Reader).
414      * @param augs Additional information that may include infoset augmentations
415      *
416      * @exception XNIException Thrown by handler to signal an error.
417      */

418     public void startParameterEntity(String JavaDoc name,
419                                      XMLResourceIdentifier identifier,
420                                      String JavaDoc encoding,
421                                      Augmentations augs) throws XNIException {
422     } // startParameterEntity(String,XMLResourceIdentifier,String,Augmentations)
423

424     /**
425      * This method notifies the end of an entity.
426      * <p>
427      * <strong>Note:</strong> This method is not called for entity references
428      * appearing as part of attribute values.
429      *
430      * @param name The name of the entity.
431      * @param augs Additional information that may include infoset augmentations
432      *
433      * @exception XNIException
434      * Thrown by handler to signal an error.
435      */

436     public void endParameterEntity(String JavaDoc name, Augmentations augs)
437         throws XNIException {
438     } // endParameterEntity(String,Augmentations)
439

440     /**
441      * Characters within an IGNORE conditional section.
442      *
443      * @param text The ignored text.
444      * @param augs Additional information that may include infoset
445      * augmentations.
446      *
447      * @throws XNIException Thrown by handler to signal an error.
448      */

449      public void ignoredCharacters(XMLString text, Augmentations augs) throws XNIException {
450      } // ignoredCharacters(XMLString, Augmentations)
451

452     /**
453      * An element declaration.
454      *
455      * @param name The name of the element.
456      * @param contentModel The element content model.
457      * @param augs Additional information that may include infoset
458      * augmentations.
459      *
460      * @throws XNIException Thrown by handler to signal an error.
461      */

462     public void elementDecl(String JavaDoc name, String JavaDoc contentModel, Augmentations augs)
463         throws XNIException {
464     } // elementDecl(String,String)
465

466     /**
467      * The start of an attribute list.
468      *
469      * @param elementName The name of the element that this attribute
470      * list is associated with.
471      * @param augs Additional information that may include infoset
472      * augmentations.
473      *
474      * @throws XNIException Thrown by handler to signal an error.
475      */

476     public void startAttlist(String JavaDoc elementName, Augmentations augs) throws XNIException {
477     } // startAttlist(String)
478

479     /**
480      * An attribute declaration.
481      *
482      * @param elementName The name of the element that this attribute
483      * is associated with.
484      * @param attributeName The name of the attribute.
485      * @param type The attribute type. This value will be one of
486      * the following: "CDATA", "ENTITY", "ENTITIES",
487      * "ENUMERATION", "ID", "IDREF", "IDREFS",
488      * "NMTOKEN", "NMTOKENS", or "NOTATION".
489      * @param enumeration If the type has the value "ENUMERATION" or
490      * "NOTATION", this array holds the allowed attribute
491      * values; otherwise, this array is null.
492      * @param defaultType The attribute default type. This value will be
493      * one of the following: "#FIXED", "#IMPLIED",
494      * "#REQUIRED", or null.
495      * @param defaultValue The attribute default value, or null if no
496      * default value is specified.
497      * @param nonNormalizedDefaultValue The attribute default value with no normalization
498      * performed, or null if no default value is specified.
499      * @param augs Additional information that may include infoset
500      * augmentations.
501      *
502      * @throws XNIException Thrown by handler to signal an error.
503      */

504     public void attributeDecl(String JavaDoc elementName, String JavaDoc attributeName,
505                               String JavaDoc type, String JavaDoc[] enumeration,
506                               String JavaDoc defaultType, XMLString defaultValue,
507                   XMLString nonNormalizedDefaultValue, Augmentations augs)
508         throws XNIException {
509     } // attributeDecl(String,String,String,String[],String,XMLString, XMLString, Augmentations)
510

511     /**
512      * The end of an attribute list.
513      *
514      * @param augs Additional information that may include infoset
515      * augmentations.
516      *
517      * @throws XNIException Thrown by handler to signal an error.
518      */

519     public void endAttlist(Augmentations augs) throws XNIException {
520     } // endAttlist()
521

522     /**
523      * An internal entity declaration.
524      *
525      * @param name The name of the entity. Parameter entity names start with
526      * '%', whereas the name of a general entity is just the
527      * entity name.
528      * @param text The value of the entity.
529      * @param nonNormalizedText The non-normalized value of the entity. This
530      * value contains the same sequence of characters that was in
531      * the internal entity declaration, without any entity
532      * references expanded.
533      * @param augs Additional information that may include infoset
534      * augmentations.
535      *
536      * @throws XNIException Thrown by handler to signal an error.
537      */

538     public void internalEntityDecl(String JavaDoc name, XMLString text,
539                                    XMLString nonNormalizedText, Augmentations augs)
540         throws XNIException {
541     } // internalEntityDecl(String,XMLString,XMLString)
542

543     /**
544      * An external entity declaration.
545      *
546      * @param name The name of the entity. Parameter entity names start
547      * with '%', whereas the name of a general entity is just
548      * the entity name.
549      * @param identifier An object containing all location information
550      * pertinent to this entity.
551      * @param augs Additional information that may include infoset
552      * augmentations.
553      *
554      * @throws XNIException Thrown by handler to signal an error.
555      */

556     public void externalEntityDecl(String JavaDoc name, XMLResourceIdentifier identifier,
557                                    Augmentations augs) throws XNIException {
558     } // externalEntityDecl(String,XMLResourceIdentifier, Augmentations)
559

560     /**
561      * An unparsed entity declaration.
562      *
563      * @param name The name of the entity.
564      * @param identifier An object containing all location information
565      * pertinent to this entity.
566      * @param notation The name of the notation.
567      * @param augs Additional information that may include infoset
568      * augmentations.
569      *
570      * @throws XNIException Thrown by handler to signal an error.
571      */

572     public void unparsedEntityDecl(String JavaDoc name, XMLResourceIdentifier identifier,
573                                    String JavaDoc notation, Augmentations augs) throws XNIException {
574     } // unparsedEntityDecl(String,XMLResourceIdentifier, String, Augmentations)
575

576     /**
577      * A notation declaration
578      *
579      * @param name The name of the notation.
580      * @param identifier An object containing all location information
581      * pertinent to this notation.
582      * @param augs Additional information that may include infoset
583      * augmentations.
584      *
585      * @throws XNIException Thrown by handler to signal an error.
586      */

587     public void notationDecl(String JavaDoc name, XMLResourceIdentifier identifier,
588         Augmentations augs)
589         throws XNIException {
590     } // notationDecl(String,XMLResourceIdentifier, Augmentations)
591

592     /**
593      * The start of a conditional section.
594      *
595      * @param type The type of the conditional section. This value will
596      * either be CONDITIONAL_INCLUDE or CONDITIONAL_IGNORE.
597      * @param augs Additional information that may include infoset
598      * augmentations.
599      *
600      * @throws XNIException Thrown by handler to signal an error.
601      *
602      * @see #CONDITIONAL_INCLUDE
603      * @see #CONDITIONAL_IGNORE
604      */

605     public void startConditional(short type, Augmentations augs) throws XNIException {
606     } // startConditional(short)
607

608     /**
609      * The end of a conditional section.
610      *
611      * @param augs Additional information that may include infoset
612      * augmentations.
613      *
614      * @throws XNIException Thrown by handler to signal an error.
615      */

616     public void endConditional(Augmentations augs) throws XNIException {
617     } // endConditional()
618

619     /**
620      * The end of the DTD.
621      *
622      * @param augs Additional information that may include infoset
623      * augmentations.
624      *
625      * @throws XNIException Thrown by handler to signal an error.
626      */

627     public void endDTD(Augmentations augs) throws XNIException {
628         fInDTD = false;
629     } // endDTD()
630

631     // set the source of this handler
632
public void setDTDSource(XMLDTDSource source) {
633         fDTDSource = source;
634     }
635
636     // return the source from which this handler derives its events
637
public XMLDTDSource getDTDSource() {
638         return fDTDSource;
639     }
640
641     //
642
// XMLDTDContentModelHandler methods
643
//
644

645     /**
646      * The start of a content model. Depending on the type of the content
647      * model, specific methods may be called between the call to the
648      * startContentModel method and the call to the endContentModel method.
649      *
650      * @param elementName The name of the element.
651      * @param augs Additional information that may include infoset
652      * augmentations.
653      *
654      * @throws XNIException Thrown by handler to signal an error.
655      */

656     public void startContentModel(String JavaDoc elementName, Augmentations augs) throws XNIException {
657     } // startContentModel(String, Augmentations)
658

659     /**
660      * A content model of ANY.
661      *
662      * @param augs Additional information that may include infoset
663      * augmentations.
664      *
665      * @throws XNIException Thrown by handler to signal an error.
666      *
667      * @see #empty
668      * @see #startGroup
669      */

670     public void any(Augmentations augs) throws XNIException {
671     } // any(Augmentations)
672

673     /**
674      * A content model of EMPTY.
675      *
676      * @param augs Additional information that may include infoset
677      * augmentations.
678      *
679      * @throws XNIException Thrown by handler to signal an error.
680      *
681      * @see #any
682      * @see #startGroup
683      */

684     public void empty(Augmentations augs) throws XNIException {
685     } // empty(Augmentations)
686

687     /**
688      * A start of either a mixed or children content model. A mixed
689      * content model will immediately be followed by a call to the
690      * <code>pcdata()</code> method. A children content model will
691      * contain additional groups and/or elements.
692      *
693      * @param augs Additional information that may include infoset
694      * augmentations.
695      *
696      * @throws XNIException Thrown by handler to signal an error.
697      *
698      * @see #any
699      * @see #empty
700      */

701     public void startGroup(Augmentations augs) throws XNIException {
702     } // stargGroup(Augmentations)
703

704     /**
705      * The appearance of "#PCDATA" within a group signifying a
706      * mixed content model. This method will be the first called
707      * following the content model's <code>startGroup()</code>.
708      *
709      * @param augs Additional information that may include infoset
710      * augmentations.
711      *
712      * @throws XNIException Thrown by handler to signal an error.
713      *
714      * @see #startGroup
715      */

716     public void pcdata(Augmentations augs) throws XNIException {
717     } // pcdata(Augmentations)
718

719     /**
720      * A referenced element in a mixed or children content model.
721      *
722      * @param elementName The name of the referenced element.
723      * @param augs Additional information that may include infoset
724      * augmentations.
725      *
726      * @throws XNIException Thrown by handler to signal an error.
727      */

728     public void element(String JavaDoc elementName, Augmentations augs) throws XNIException {
729     } // element(String, Augmentations)
730

731     /**
732      * The separator between choices or sequences of a mixed or children
733      * content model.
734      *
735      * @param separator The type of children separator.
736      * @param augs Additional information that may include infoset
737      * augmentations.
738      *
739      * @throws XNIException Thrown by handler to signal an error.
740      *
741      * @see #SEPARATOR_CHOICE
742      * @see #SEPARATOR_SEQUENCE
743      */

744     public void separator(short separator, Augmentations augs) throws XNIException {
745     } // separator(short, Augmentations)
746

747     /**
748      * The occurrence count for a child in a children content model or
749      * for the mixed content model group.
750      *
751      * @param occurrence The occurrence count for the last element
752      * or group.
753      * @param augs Additional information that may include infoset
754      * augmentations.
755      *
756      * @throws XNIException Thrown by handler to signal an error.
757      *
758      * @see #OCCURS_ZERO_OR_ONE
759      * @see #OCCURS_ZERO_OR_MORE
760      * @see #OCCURS_ONE_OR_MORE
761      */

762     public void occurrence(short occurrence, Augmentations augs) throws XNIException {
763     } // occurence(short, Augmentations)
764

765     /**
766      * The end of a group for mixed or children content models.
767      *
768      * @param augs Additional information that may include infoset
769      * augmentations.
770      *
771      * @throws XNIException Thrown by handler to signal an error.
772      */

773     public void endGroup(Augmentations augs) throws XNIException {
774     } // endGroup(Augmentations)
775

776     /**
777      * The end of a content model.
778      *
779      * @param augs Additional information that may include infoset
780      * augmentations.
781      *
782      * @throws XNIException Thrown by handler to signal an error.
783      */

784     public void endContentModel(Augmentations augs) throws XNIException {
785     } // endContentModel(Augmentations)
786

787     // set content model source
788
public void setDTDContentModelSource(XMLDTDContentModelSource source) {
789         fDTDContentModelSource = source;
790     }
791
792     // get content model source
793
public XMLDTDContentModelSource getDTDContentModelSource() {
794         return fDTDContentModelSource;
795     }
796
797     //
798
// Protected methods
799
//
800

801     /**
802      * reset all components before parsing
803      */

804     protected void reset() throws XNIException {
805         super.reset();
806         fInDTD = false;
807     } // reset()
808

809 } // class AbstractXMLDocumentParser
810
Popular Tags