KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xerces > impl > xs > opti > DefaultXMLDocumentHandler


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.impl.xs.opti;
18
19 import org.apache.xerces.xni.QName;
20 import org.apache.xerces.xni.XMLString;
21 import org.apache.xerces.xni.NamespaceContext;
22 import org.apache.xerces.xni.XMLLocator;
23 import org.apache.xerces.xni.Augmentations;
24 import org.apache.xerces.xni.XMLAttributes;
25 import org.apache.xerces.xni.XMLDTDHandler;
26 import org.apache.xerces.xni.XMLDocumentHandler;
27 import org.apache.xerces.xni.XMLDTDContentModelHandler;
28 import org.apache.xerces.xni.XMLResourceIdentifier;
29 import org.apache.xerces.xni.parser.XMLDocumentSource;
30 import org.apache.xerces.xni.parser.XMLDTDSource;
31 import org.apache.xerces.xni.parser.XMLDTDContentModelSource;
32
33 import org.apache.xerces.xni.XNIException;
34
35 /**
36  * @xerces.internal
37  *
38  * @author Rahul Srivastava, Sun Microsystems Inc.
39  * @author Sandy Gao, IBM
40  *
41  * @version $Id: DefaultXMLDocumentHandler.java,v 1.5 2004/10/06 15:14:49 mrglavas Exp $
42  */

43 public class DefaultXMLDocumentHandler implements XMLDocumentHandler,
44                                                   XMLDTDHandler,
45                                                   XMLDTDContentModelHandler {
46     
47     /** Default Constructor */
48     public DefaultXMLDocumentHandler() {
49     }
50
51     //
52
// XMLDocumentHandler methods
53
//
54

55     /**
56      * The start of the document.
57      *
58      * @param locator The document locator, or null if the document
59      * location cannot be reported during the parsing
60      * of this document. However, it is <em>strongly</em>
61      * recommended that a locator be supplied that can
62      * at least report the system identifier of the
63      * document.
64      * @param encoding The auto-detected IANA encoding name of the entity
65      * stream. This value will be null in those situations
66      * where the entity encoding is not auto-detected (e.g.
67      * internal entities or a document entity that is
68      * parsed from a java.io.Reader).
69      * @param augs Additional information that may include infoset augmentations
70      * @exception XNIException
71      * Thrown by handler to signal an error.
72      */

73     public void startDocument(XMLLocator locator, String JavaDoc encoding,
74                               NamespaceContext context, Augmentations augs)
75         throws XNIException {
76     }
77
78     /**
79      * Notifies of the presence of an XMLDecl line in the document. If
80      * present, this method will be called immediately following the
81      * startDocument call.
82      *
83      * @param version The XML version.
84      * @param encoding The IANA encoding name of the document, or null if
85      * not specified.
86      * @param standalone The standalone value, or null if not specified.
87      * @param augs Additional information that may include infoset augmentations
88      *
89      * @exception XNIException
90      * Thrown by handler to signal an error.
91      */

92     public void xmlDecl(String JavaDoc version, String JavaDoc encoding, String JavaDoc standalone, Augmentations augs)
93         throws XNIException {
94     }
95
96     /**
97      * Notifies of the presence of the DOCTYPE line in the document.
98      *
99      * @param rootElement
100      * The name of the root element.
101      * @param publicId The public identifier if an external DTD or null
102      * if the external DTD is specified using SYSTEM.
103      * @param systemId The system identifier if an external DTD, null
104      * otherwise.
105      * @param augs Additional information that may include infoset augmentations
106      *
107      * @exception XNIException
108      * Thrown by handler to signal an error.
109      */

110     public void doctypeDecl(String JavaDoc rootElement, String JavaDoc publicId, String JavaDoc systemId, Augmentations augs)
111         throws XNIException {
112     }
113
114     /**
115      * A comment.
116      *
117      * @param text The text in the comment.
118      * @param augs Additional information that may include infoset augmentations
119      *
120      * @exception XNIException
121      * Thrown by application to signal an error.
122      */

123     public void comment(XMLString text, Augmentations augs) throws XNIException {
124     }
125
126     /**
127      * A processing instruction. Processing instructions consist of a
128      * target name and, optionally, text data. The data is only meaningful
129      * to the application.
130      * <p>
131      * Typically, a processing instruction's data will contain a series
132      * of pseudo-attributes. These pseudo-attributes follow the form of
133      * element attributes but are <strong>not</strong> parsed or presented
134      * to the application as anything other than text. The application is
135      * responsible for parsing the data.
136      *
137      * @param target The target.
138      * @param data The data or null if none specified.
139      * @param augs Additional information that may include infoset augmentations
140      *
141      * @exception XNIException
142      * Thrown by handler to signal an error.
143      */

144     public void processingInstruction(String JavaDoc target, XMLString data, Augmentations augs)
145         throws XNIException {
146     }
147
148     /**
149      * The start of a namespace prefix mapping. This method will only be
150      * called when namespace processing is enabled.
151      *
152      * @param prefix The namespace prefix.
153      * @param uri The URI bound to the prefix.
154      * @param augs Additional information that may include infoset augmentations
155      *
156      * @exception XNIException
157      * Thrown by handler to signal an error.
158      */

159     public void startPrefixMapping(String JavaDoc prefix, String JavaDoc uri, Augmentations augs)
160         throws XNIException {
161     }
162
163     /**
164      * The start of an element.
165      *
166      * @param element The name of the element.
167      * @param attributes The element attributes.
168      * @param augs Additional information that may include infoset augmentations
169      *
170      * @exception XNIException
171      * Thrown by handler to signal an error.
172      */

173     public void startElement(QName element, XMLAttributes attributes, Augmentations augs)
174         throws XNIException {
175     }
176
177     /**
178      * An empty element.
179      *
180      * @param element The name of the element.
181      * @param attributes The element attributes.
182      * @param augs Additional information that may include infoset augmentations
183      *
184      * @exception XNIException
185      * Thrown by handler to signal an error.
186      */

187     public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs)
188         throws XNIException {
189     }
190
191     /**
192      * This method notifies the start of a general entity.
193      * <p>
194      * <strong>Note:</strong> This method is not called for entity references
195      * appearing as part of attribute values.
196      *
197      * @param name The name of the general entity.
198      * @param identifier The resource identifier.
199      * @param encoding The auto-detected IANA encoding name of the entity
200      * stream. This value will be null in those situations
201      * where the entity encoding is not auto-detected (e.g.
202      * internal entities or a document entity that is
203      * parsed from a java.io.Reader).
204      * @param augs Additional information that may include infoset augmentations
205      *
206      * @exception XNIException Thrown by handler to signal an error.
207      */

208     public void startGeneralEntity(String JavaDoc name,
209                                    XMLResourceIdentifier identifier,
210                                    String JavaDoc encoding,
211                                    Augmentations augs) throws XNIException {
212     }
213
214     /**
215      * Notifies of the presence of a TextDecl line in an entity. If present,
216      * this method will be called immediately following the startEntity call.
217      * <p>
218      * <strong>Note:</strong> This method will never be called for the
219      * document entity; it is only called for external general entities
220      * referenced in document content.
221      * <p>
222      * <strong>Note:</strong> This method is not called for entity references
223      * appearing as part of attribute values.
224      *
225      * @param version The XML version, or null if not specified.
226      * @param encoding The IANA encoding name of the entity.
227      * @param augs Additional information that may include infoset augmentations
228      *
229      * @exception XNIException
230      * Thrown by handler to signal an error.
231      */

232     public void textDecl(String JavaDoc version, String JavaDoc encoding, Augmentations augs) throws XNIException {
233     }
234
235     /**
236      * This method notifies the end of a general entity.
237      * <p>
238      * <strong>Note:</strong> This method is not called for entity references
239      * appearing as part of attribute values.
240      *
241      * @param name The name of the entity.
242      * @param augs Additional information that may include infoset augmentations
243      *
244      * @exception XNIException
245      * Thrown by handler to signal an error.
246      */

247     public void endGeneralEntity(String JavaDoc name, Augmentations augs) throws XNIException {
248     }
249
250     /**
251      * Character content.
252      *
253      * @param text The content.
254      * @param augs Additional information that may include infoset augmentations
255      *
256      * @exception XNIException
257      * Thrown by handler to signal an error.
258      */

259     public void characters(XMLString text, Augmentations augs) throws XNIException {
260     }
261
262     /**
263      * Ignorable whitespace. For this method to be called, the document
264      * source must have some way of determining that the text containing
265      * only whitespace characters should be considered ignorable. For
266      * example, the validator can determine if a length of whitespace
267      * characters in the document are ignorable based on the element
268      * content model.
269      *
270      * @param text The ignorable whitespace.
271      * @param augs Additional information that may include infoset augmentations
272      *
273      * @exception XNIException
274      * Thrown by handler to signal an error.
275      */

276     public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException {
277     }
278
279     /**
280      * The end of an element.
281      *
282      * @param element The name of the element.
283      * @param augs Additional information that may include infoset augmentations
284      *
285      * @exception XNIException
286      * Thrown by handler to signal an error.
287      */

288     public void endElement(QName element, Augmentations augs) throws XNIException {
289     }
290
291     /**
292      * The end of a namespace prefix mapping. This method will only be
293      * called when namespace processing is enabled.
294      *
295      * @param prefix The namespace prefix.
296      * @param augs Additional information that may include infoset augmentations
297      *
298      * @exception XNIException
299      * Thrown by handler to signal an error.
300      */

301     public void endPrefixMapping(String JavaDoc prefix, Augmentations augs) throws XNIException {
302     }
303
304     /**
305      * The start of a CDATA section.
306      *
307      * @param augs Additional information that may include infoset augmentations
308      *
309      * @exception XNIException
310      * Thrown by handler to signal an error.
311      */

312     public void startCDATA(Augmentations augs) throws XNIException {
313     }
314
315     /**
316      * The end of a CDATA section.
317      *
318      * @param augs Additional information that may include infoset augmentations
319      *
320      * @exception XNIException
321      * Thrown by handler to signal an error.
322      */

323     public void endCDATA(Augmentations augs) throws XNIException {
324     }
325
326     /**
327      * The end of the document.
328      *
329      * @param augs Additional information that may include infoset augmentations
330      *
331      * @exception XNIException
332      * Thrown by handler to signal an error.
333      */

334     public void endDocument(Augmentations augs) throws XNIException {
335     }
336
337
338     //
339
// XMLDTDHandler methods
340
//
341

342     /**
343      * The start of the DTD.
344      *
345      * @param locator The document locator, or null if the document
346      * location cannot be reported during the parsing of
347      * the document DTD. However, it is <em>strongly</em>
348      * recommended that a locator be supplied that can
349      * at least report the base system identifier of the
350      * DTD.
351      * @param augmentations Additional information that may include infoset
352      * augmentations.
353      *
354      * @throws XNIException Thrown by handler to signal an error.
355      */

356     public void startDTD(XMLLocator locator, Augmentations augmentations)
357         throws XNIException {
358     }
359
360     /**
361      * This method notifies of the start of a parameter entity. The parameter
362      * entity name start with a '%' character.
363      *
364      * @param name The name of the parameter entity.
365      * @param identifier The resource identifier.
366      * @param encoding The auto-detected IANA encoding name of the entity
367      * stream. This value will be null in those situations
368      * where the entity encoding is not auto-detected (e.g.
369      * internal parameter entities).
370      * @param augmentations Additional information that may include infoset
371      * augmentations.
372      *
373      * @throws XNIException Thrown by handler to signal an error.
374      */

375     public void startParameterEntity(String JavaDoc name,
376                                      XMLResourceIdentifier identifier,
377                                      String JavaDoc encoding,
378                                      Augmentations augmentations) throws XNIException {
379     }
380
381     /**
382      * Notifies of the presence of a TextDecl line in an entity. If present,
383      * this method will be called immediately following the startEntity call.
384      * <p>
385      * <strong>Note:</strong> This method is only called for external
386      * parameter entities referenced in the DTD.
387      *
388      * @param version The XML version, or null if not specified.
389      * @param encoding The IANA encoding name of the entity.
390      * @param augmentations Additional information that may include infoset
391      * augmentations.
392      *
393      * @throws XNIException Thrown by handler to signal an error.
394      */

395 /*
396     public void textDecl(String version, String encoding,
397                          Augmentations augmentations) throws XNIException {
398     }
399 */

400
401     /**
402      * This method notifies the end of a parameter entity. Parameter entity
403      * names begin with a '%' character.
404      *
405      * @param name The name of the parameter entity.
406      * @param augmentations Additional information that may include infoset
407      * augmentations.
408      *
409      * @throws XNIException Thrown by handler to signal an error.
410      */

411     public void endParameterEntity(String JavaDoc name, Augmentations augmentations)
412         throws XNIException {
413     }
414
415     /**
416      * The start of the DTD external subset.
417      *
418      * @param identifier The resource identifier.
419      * @param augmentations
420      * Additional information that may include infoset
421      * augmentations.
422      * @exception XNIException
423      * Thrown by handler to signal an error.
424      */

425     public void startExternalSubset(XMLResourceIdentifier identifier,
426                                     Augmentations augmentations)
427         throws XNIException {
428     }
429
430     /**
431      * The end of the DTD external subset.
432      *
433      * @param augmentations Additional information that may include infoset
434      * augmentations.
435      *
436      * @throws XNIException Thrown by handler to signal an error.
437      */

438     public void endExternalSubset(Augmentations augmentations)
439         throws XNIException {
440     }
441
442     /**
443      * A comment.
444      *
445      * @param text The text in the comment.
446      * @param augmentations Additional information that may include infoset
447      * augmentations.
448      *
449      * @throws XNIException Thrown by application to signal an error.
450      */

451 /*
452     public void comment(XMLString text, Augmentations augmentations)
453         throws XNIException {
454     }
455 */

456
457     /**
458      * A processing instruction. Processing instructions consist of a
459      * target name and, optionally, text data. The data is only meaningful
460      * to the application.
461      * <p>
462      * Typically, a processing instruction's data will contain a series
463      * of pseudo-attributes. These pseudo-attributes follow the form of
464      * element attributes but are <strong>not</strong> parsed or presented
465      * to the application as anything other than text. The application is
466      * responsible for parsing the data.
467      *
468      * @param target The target.
469      * @param data The data or null if none specified.
470      * @param augmentations Additional information that may include infoset
471      * augmentations.
472      *
473      * @throws XNIException Thrown by handler to signal an error.
474      */

475 /*
476     public void processingInstruction(String target, XMLString data,
477                                       Augmentations augmentations)
478         throws XNIException {
479     }
480 */

481
482
483     /**
484      * An element declaration.
485      *
486      * @param name The name of the element.
487      * @param contentModel The element content model.
488      * @param augmentations Additional information that may include infoset
489      * augmentations.
490      *
491      * @throws XNIException Thrown by handler to signal an error.
492      */

493     public void elementDecl(String JavaDoc name, String JavaDoc contentModel,
494                             Augmentations augmentations)
495         throws XNIException {
496     }
497
498     /**
499      * The start of an attribute list.
500      *
501      * @param elementName The name of the element that this attribute
502      * list is associated with.
503      * @param augmentations Additional information that may include infoset
504      * augmentations.
505      *
506      * @throws XNIException Thrown by handler to signal an error.
507      */

508     public void startAttlist(String JavaDoc elementName,
509                              Augmentations augmentations) throws XNIException {
510     }
511
512     /**
513      * An attribute declaration.
514      *
515      * @param elementName The name of the element that this attribute
516      * is associated with.
517      * @param attributeName The name of the attribute.
518      * @param type The attribute type. This value will be one of
519      * the following: "CDATA", "ENTITY", "ENTITIES",
520      * "ENUMERATION", "ID", "IDREF", "IDREFS",
521      * "NMTOKEN", "NMTOKENS", or "NOTATION".
522      * @param enumeration If the type has the value "ENUMERATION" or
523      * "NOTATION", this array holds the allowed attribute
524      * values; otherwise, this array is null.
525      * @param defaultType The attribute default type. This value will be
526      * one of the following: "#FIXED", "#IMPLIED",
527      * "#REQUIRED", or null.
528      * @param defaultValue The attribute default value, or null if no
529      * default value is specified.
530      * @param nonNormalizedDefaultValue The attribute default value with no normalization
531      * performed, or null if no default value is specified.
532      * @param augmentations Additional information that may include infoset
533      * augmentations.
534      *
535      * @throws XNIException Thrown by handler to signal an error.
536      */

537     public void attributeDecl(String JavaDoc elementName, String JavaDoc attributeName,
538                               String JavaDoc type, String JavaDoc[] enumeration,
539                               String JavaDoc defaultType, XMLString defaultValue,
540                               XMLString nonNormalizedDefaultValue, Augmentations augmentations)
541         throws XNIException {
542     }
543
544     /**
545      * The end of an attribute list.
546      *
547      * @param augmentations Additional information that may include infoset
548      * augmentations.
549      *
550      * @throws XNIException Thrown by handler to signal an error.
551      */

552     public void endAttlist(Augmentations augmentations) throws XNIException {
553     }
554
555     /**
556      * An internal entity declaration.
557      *
558      * @param name The name of the entity. Parameter entity names start with
559      * '%', whereas the name of a general entity is just the
560      * entity name.
561      * @param text The value of the entity.
562      * @param nonNormalizedText The non-normalized value of the entity. This
563      * value contains the same sequence of characters that was in
564      * the internal entity declaration, without any entity
565      * references expanded.
566      * @param augmentations Additional information that may include infoset
567      * augmentations.
568      *
569      * @throws XNIException Thrown by handler to signal an error.
570      */

571     public void internalEntityDecl(String JavaDoc name, XMLString text,
572                                    XMLString nonNormalizedText,
573                                    Augmentations augmentations)
574         throws XNIException {
575     }
576
577     /**
578      * An external entity declaration.
579      *
580      * @param name The name of the entity. Parameter entity names start
581      * with '%', whereas the name of a general entity is just
582      * the entity name.
583      * @param identifier An object containing all location information
584      * pertinent to this external entity.
585      * @param augmentations Additional information that may include infoset
586      * augmentations.
587      *
588      * @throws XNIException Thrown by handler to signal an error.
589      */

590     public void externalEntityDecl(String JavaDoc name,
591                                    XMLResourceIdentifier identifier,
592                                    Augmentations augmentations)
593         throws XNIException {
594     }
595
596     /**
597      * An unparsed entity declaration.
598      *
599      * @param name The name of the entity.
600      * @param identifier An object containing all location information
601      * pertinent to this unparsed entity declaration.
602      * @param notation The name of the notation.
603      * @param augmentations Additional information that may include infoset
604      * augmentations.
605      *
606      * @throws XNIException Thrown by handler to signal an error.
607      */

608     public void unparsedEntityDecl(String JavaDoc name,
609                                    XMLResourceIdentifier identifier,
610                                    String JavaDoc notation, Augmentations augmentations)
611         throws XNIException {
612     }
613
614     /**
615      * A notation declaration
616      *
617      * @param name The name of the notation.
618      * @param identifier An object containing all location information
619      * pertinent to this notation.
620      * @param augmentations Additional information that may include infoset
621      * augmentations.
622      *
623      * @throws XNIException Thrown by handler to signal an error.
624      */

625     public void notationDecl(String JavaDoc name, XMLResourceIdentifier identifier,
626                              Augmentations augmentations) throws XNIException {
627     }
628
629     /**
630      * The start of a conditional section.
631      *
632      * @param type The type of the conditional section. This value will
633      * either be CONDITIONAL_INCLUDE or CONDITIONAL_IGNORE.
634      * @param augmentations Additional information that may include infoset
635      * augmentations.
636      *
637      * @throws XNIException Thrown by handler to signal an error.
638      *
639      * @see #CONDITIONAL_INCLUDE
640      * @see #CONDITIONAL_IGNORE
641      */

642     public void startConditional(short type, Augmentations augmentations)
643         throws XNIException {
644     }
645
646     /**
647      * Characters within an IGNORE conditional section.
648      *
649      * @param text The ignored text.
650      * @param augmentations Additional information that may include infoset
651      * augmentations.
652      *
653      * @throws XNIException Thrown by handler to signal an error.
654      */

655     public void ignoredCharacters(XMLString text, Augmentations augmentations)
656         throws XNIException {
657     }
658
659     /**
660      * The end of a conditional section.
661      *
662      * @param augmentations Additional information that may include infoset
663      * augmentations.
664      *
665      * @throws XNIException Thrown by handler to signal an error.
666      */

667     public void endConditional(Augmentations augmentations) throws XNIException {
668     }
669
670     /**
671      * The end of the DTD.
672      *
673      * @param augmentations Additional information that may include infoset
674      * augmentations.
675      *
676      * @throws XNIException Thrown by handler to signal an error.
677      */

678     public void endDTD(Augmentations augmentations) throws XNIException {
679     }
680
681
682     //
683
// XMLDTDContentModelHandler methods
684
//
685

686     /**
687      * The start of a content model. Depending on the type of the content
688      * model, specific methods may be called between the call to the
689      * startContentModel method and the call to the endContentModel method.
690      *
691      * @param elementName The name of the element.
692      * @param augmentations Additional information that may include infoset
693      * augmentations.
694      *
695      * @throws XNIException Thrown by handler to signal an error.
696      */

697     public void startContentModel(String JavaDoc elementName, Augmentations augmentations)
698         throws XNIException {
699     }
700
701     /**
702      * A content model of ANY.
703      *
704      * @param augmentations Additional information that may include infoset
705      * augmentations.
706      *
707      * @throws XNIException Thrown by handler to signal an error.
708      *
709      * @see #empty
710      * @see #startGroup
711      */

712     public void any(Augmentations augmentations) throws XNIException {
713     }
714
715     /**
716      * A content model of EMPTY.
717      *
718      * @throws XNIException Thrown by handler to signal an error.
719      *
720      * @param augmentations Additional information that may include infoset
721      * augmentations.
722      *
723      * @see #any
724      * @see #startGroup
725      */

726     public void empty(Augmentations augmentations) throws XNIException {
727     }
728
729     /**
730      * A start of either a mixed or children content model. A mixed
731      * content model will immediately be followed by a call to the
732      * <code>pcdata()</code> method. A children content model will
733      * contain additional groups and/or elements.
734      *
735      * @param augmentations Additional information that may include infoset
736      * augmentations.
737      *
738      * @throws XNIException Thrown by handler to signal an error.
739      *
740      * @see #any
741      * @see #empty
742      */

743     public void startGroup(Augmentations augmentations) throws XNIException {
744     }
745
746     /**
747      * The appearance of "#PCDATA" within a group signifying a
748      * mixed content model. This method will be the first called
749      * following the content model's <code>startGroup()</code>.
750      *
751      * @param augmentations Additional information that may include infoset
752      * augmentations.
753      *
754      * @throws XNIException Thrown by handler to signal an error.
755      *
756      * @see #startGroup
757      */

758     public void pcdata(Augmentations augmentations) throws XNIException {
759     }
760
761     /**
762      * A referenced element in a mixed or children content model.
763      *
764      * @param elementName The name of the referenced element.
765      * @param augmentations Additional information that may include infoset
766      * augmentations.
767      *
768      * @throws XNIException Thrown by handler to signal an error.
769      */

770     public void element(String JavaDoc elementName, Augmentations augmentations)
771         throws XNIException {
772     }
773
774     /**
775      * The separator between choices or sequences of a mixed or children
776      * content model.
777      *
778      * @param separator The type of children separator.
779      * @param augmentations Additional information that may include infoset
780      * augmentations.
781      *
782      * @throws XNIException Thrown by handler to signal an error.
783      *
784      * @see #SEPARATOR_CHOICE
785      * @see #SEPARATOR_SEQUENCE
786      */

787     public void separator(short separator, Augmentations augmentations)
788         throws XNIException {
789     }
790
791     /**
792      * The occurrence count for a child in a children content model or
793      * for the mixed content model group.
794      *
795      * @param occurrence The occurrence count for the last element
796      * or group.
797      * @param augmentations Additional information that may include infoset
798      * augmentations.
799      *
800      * @throws XNIException Thrown by handler to signal an error.
801      *
802      * @see #OCCURS_ZERO_OR_ONE
803      * @see #OCCURS_ZERO_OR_MORE
804      * @see #OCCURS_ONE_OR_MORE
805      */

806     public void occurrence(short occurrence, Augmentations augmentations)
807         throws XNIException {
808     }
809
810     /**
811      * The end of a group for mixed or children content models.
812      *
813      * @param augmentations Additional information that may include infoset
814      * augmentations.
815      *
816      * @throws XNIException Thrown by handler to signal an error.
817      */

818     public void endGroup(Augmentations augmentations) throws XNIException {
819     }
820
821     /**
822      * The end of a content model.
823      *
824      * @param augmentations Additional information that may include infoset
825      * augmentations.
826      *
827      * @throws XNIException Thrown by handler to signal an error.
828      */

829     public void endContentModel(Augmentations augmentations) throws XNIException {
830     }
831
832     private XMLDocumentSource fDocumentSource;
833
834     /** Sets the document source. */
835     public void setDocumentSource(XMLDocumentSource source) {
836         fDocumentSource = source;
837     }
838
839     /** Returns the document source. */
840     public XMLDocumentSource getDocumentSource() {
841         return fDocumentSource;
842     }
843
844     private XMLDTDSource fDTDSource;
845     
846     // set the source of this handler
847
public void setDTDSource(XMLDTDSource source) {
848         fDTDSource = source;
849     }
850
851     // return the source from which this handler derives its events
852
public XMLDTDSource getDTDSource() {
853         return fDTDSource;
854     }
855
856     private XMLDTDContentModelSource fCMSource;
857
858     // set content model source
859
public void setDTDContentModelSource(XMLDTDContentModelSource source) {
860         fCMSource = source;
861     }
862
863     // get content model source
864
public XMLDTDContentModelSource getDTDContentModelSource() {
865         return fCMSource;
866     }
867     
868 }
Popular Tags