001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017:
018: package org.apache.xerces.impl.xs.opti;
019:
020: import org.apache.xerces.xni.QName;
021: import org.apache.xerces.xni.XMLString;
022: import org.apache.xerces.xni.NamespaceContext;
023: import org.apache.xerces.xni.XMLLocator;
024: import org.apache.xerces.xni.Augmentations;
025: import org.apache.xerces.xni.XMLAttributes;
026: import org.apache.xerces.xni.XMLDTDHandler;
027: import org.apache.xerces.xni.XMLDocumentHandler;
028: import org.apache.xerces.xni.XMLDTDContentModelHandler;
029: import org.apache.xerces.xni.XMLResourceIdentifier;
030: import org.apache.xerces.xni.parser.XMLDocumentSource;
031: import org.apache.xerces.xni.parser.XMLDTDSource;
032: import org.apache.xerces.xni.parser.XMLDTDContentModelSource;
033:
034: import org.apache.xerces.xni.XNIException;
035:
036: /**
037: * @xerces.internal
038: *
039: * @author Rahul Srivastava, Sun Microsystems Inc.
040: * @author Sandy Gao, IBM
041: *
042: * @version $Id: DefaultXMLDocumentHandler.java 446728 2006-09-15 20:43:46Z mrglavas $
043: */
044: public class DefaultXMLDocumentHandler implements XMLDocumentHandler,
045: XMLDTDHandler, XMLDTDContentModelHandler {
046:
047: /** Default Constructor */
048: public DefaultXMLDocumentHandler() {
049: }
050:
051: //
052: // XMLDocumentHandler methods
053: //
054:
055: /**
056: * The start of the document.
057: *
058: * @param locator The document locator, or null if the document
059: * location cannot be reported during the parsing
060: * of this document. However, it is <em>strongly</em>
061: * recommended that a locator be supplied that can
062: * at least report the system identifier of the
063: * document.
064: * @param encoding The auto-detected IANA encoding name of the entity
065: * stream. This value will be null in those situations
066: * where the entity encoding is not auto-detected (e.g.
067: * internal entities or a document entity that is
068: * parsed from a java.io.Reader).
069: * @param augs Additional information that may include infoset augmentations
070: * @exception XNIException
071: * Thrown by handler to signal an error.
072: */
073: public void startDocument(XMLLocator locator, String encoding,
074: NamespaceContext context, Augmentations augs)
075: throws XNIException {
076: }
077:
078: /**
079: * Notifies of the presence of an XMLDecl line in the document. If
080: * present, this method will be called immediately following the
081: * startDocument call.
082: *
083: * @param version The XML version.
084: * @param encoding The IANA encoding name of the document, or null if
085: * not specified.
086: * @param standalone The standalone value, or null if not specified.
087: * @param augs Additional information that may include infoset augmentations
088: *
089: * @exception XNIException
090: * Thrown by handler to signal an error.
091: */
092: public void xmlDecl(String version, String encoding,
093: String standalone, Augmentations augs) throws XNIException {
094: }
095:
096: /**
097: * Notifies of the presence of the DOCTYPE line in the document.
098: *
099: * @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 rootElement, String publicId,
111: String systemId, Augmentations augs) 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)
124: throws XNIException {
125: }
126:
127: /**
128: * A processing instruction. Processing instructions consist of a
129: * target name and, optionally, text data. The data is only meaningful
130: * to the application.
131: * <p>
132: * Typically, a processing instruction's data will contain a series
133: * of pseudo-attributes. These pseudo-attributes follow the form of
134: * element attributes but are <strong>not</strong> parsed or presented
135: * to the application as anything other than text. The application is
136: * responsible for parsing the data.
137: *
138: * @param target The target.
139: * @param data The data or null if none specified.
140: * @param augs Additional information that may include infoset augmentations
141: *
142: * @exception XNIException
143: * Thrown by handler to signal an error.
144: */
145: public void processingInstruction(String target, XMLString data,
146: Augmentations augs) throws XNIException {
147: }
148:
149: /**
150: * The start of a namespace prefix mapping. This method will only be
151: * called when namespace processing is enabled.
152: *
153: * @param prefix The namespace prefix.
154: * @param uri The URI bound to the prefix.
155: * @param augs Additional information that may include infoset augmentations
156: *
157: * @exception XNIException
158: * Thrown by handler to signal an error.
159: */
160: public void startPrefixMapping(String prefix, String uri,
161: Augmentations augs) throws XNIException {
162: }
163:
164: /**
165: * The start of an element.
166: *
167: * @param element The name of the element.
168: * @param attributes The element attributes.
169: * @param augs Additional information that may include infoset augmentations
170: *
171: * @exception XNIException
172: * Thrown by handler to signal an error.
173: */
174: public void startElement(QName element, XMLAttributes attributes,
175: Augmentations augs) throws XNIException {
176: }
177:
178: /**
179: * An empty element.
180: *
181: * @param element The name of the element.
182: * @param attributes The element attributes.
183: * @param augs Additional information that may include infoset augmentations
184: *
185: * @exception XNIException
186: * Thrown by handler to signal an error.
187: */
188: public void emptyElement(QName element, XMLAttributes attributes,
189: Augmentations augs) throws XNIException {
190: }
191:
192: /**
193: * This method notifies the start of a general entity.
194: * <p>
195: * <strong>Note:</strong> This method is not called for entity references
196: * appearing as part of attribute values.
197: *
198: * @param name The name of the general entity.
199: * @param identifier The resource identifier.
200: * @param encoding The auto-detected IANA encoding name of the entity
201: * stream. This value will be null in those situations
202: * where the entity encoding is not auto-detected (e.g.
203: * internal entities or a document entity that is
204: * parsed from a java.io.Reader).
205: * @param augs Additional information that may include infoset augmentations
206: *
207: * @exception XNIException Thrown by handler to signal an error.
208: */
209: public void startGeneralEntity(String name,
210: XMLResourceIdentifier identifier, String 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 version, String encoding,
233: Augmentations augs) throws XNIException {
234: }
235:
236: /**
237: * This method notifies the end of a general entity.
238: * <p>
239: * <strong>Note:</strong> This method is not called for entity references
240: * appearing as part of attribute values.
241: *
242: * @param name The name of the entity.
243: * @param augs Additional information that may include infoset augmentations
244: *
245: * @exception XNIException
246: * Thrown by handler to signal an error.
247: */
248: public void endGeneralEntity(String name, Augmentations augs)
249: throws XNIException {
250: }
251:
252: /**
253: * Character content.
254: *
255: * @param text The content.
256: * @param augs Additional information that may include infoset augmentations
257: *
258: * @exception XNIException
259: * Thrown by handler to signal an error.
260: */
261: public void characters(XMLString text, Augmentations augs)
262: throws XNIException {
263: }
264:
265: /**
266: * Ignorable whitespace. For this method to be called, the document
267: * source must have some way of determining that the text containing
268: * only whitespace characters should be considered ignorable. For
269: * example, the validator can determine if a length of whitespace
270: * characters in the document are ignorable based on the element
271: * content model.
272: *
273: * @param text The ignorable whitespace.
274: * @param augs Additional information that may include infoset augmentations
275: *
276: * @exception XNIException
277: * Thrown by handler to signal an error.
278: */
279: public void ignorableWhitespace(XMLString text, Augmentations augs)
280: throws XNIException {
281: }
282:
283: /**
284: * The end of an element.
285: *
286: * @param element The name of the element.
287: * @param augs Additional information that may include infoset augmentations
288: *
289: * @exception XNIException
290: * Thrown by handler to signal an error.
291: */
292: public void endElement(QName element, Augmentations augs)
293: throws XNIException {
294: }
295:
296: /**
297: * The end of a namespace prefix mapping. This method will only be
298: * called when namespace processing is enabled.
299: *
300: * @param prefix The namespace prefix.
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 endPrefixMapping(String prefix, Augmentations augs)
307: throws XNIException {
308: }
309:
310: /**
311: * The start of a CDATA section.
312: *
313: * @param augs Additional information that may include infoset augmentations
314: *
315: * @exception XNIException
316: * Thrown by handler to signal an error.
317: */
318: public void startCDATA(Augmentations augs) throws XNIException {
319: }
320:
321: /**
322: * The end of a CDATA section.
323: *
324: * @param augs Additional information that may include infoset augmentations
325: *
326: * @exception XNIException
327: * Thrown by handler to signal an error.
328: */
329: public void endCDATA(Augmentations augs) throws XNIException {
330: }
331:
332: /**
333: * The end of the document.
334: *
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 endDocument(Augmentations augs) throws XNIException {
341: }
342:
343: //
344: // XMLDTDHandler methods
345: //
346:
347: /**
348: * The start of the DTD.
349: *
350: * @param locator The document locator, or null if the document
351: * location cannot be reported during the parsing of
352: * the document DTD. However, it is <em>strongly</em>
353: * recommended that a locator be supplied that can
354: * at least report the base system identifier of the
355: * DTD.
356: * @param augmentations Additional information that may include infoset
357: * augmentations.
358: *
359: * @throws XNIException Thrown by handler to signal an error.
360: */
361: public void startDTD(XMLLocator locator, Augmentations augmentations)
362: throws XNIException {
363: }
364:
365: /**
366: * This method notifies of the start of a parameter entity. The parameter
367: * entity name start with a '%' character.
368: *
369: * @param name The name of the parameter entity.
370: * @param identifier The resource identifier.
371: * @param encoding The auto-detected IANA encoding name of the entity
372: * stream. This value will be null in those situations
373: * where the entity encoding is not auto-detected (e.g.
374: * internal parameter entities).
375: * @param augmentations Additional information that may include infoset
376: * augmentations.
377: *
378: * @throws XNIException Thrown by handler to signal an error.
379: */
380: public void startParameterEntity(String name,
381: XMLResourceIdentifier identifier, String encoding,
382: Augmentations augmentations) throws XNIException {
383: }
384:
385: /**
386: * Notifies of the presence of a TextDecl line in an entity. If present,
387: * this method will be called immediately following the startEntity call.
388: * <p>
389: * <strong>Note:</strong> This method is only called for external
390: * parameter entities referenced in the DTD.
391: *
392: * @param version The XML version, or null if not specified.
393: * @param encoding The IANA encoding name of the entity.
394: * @param augmentations Additional information that may include infoset
395: * augmentations.
396: *
397: * @throws XNIException Thrown by handler to signal an error.
398: */
399: /*
400: public void textDecl(String version, String encoding,
401: Augmentations augmentations) throws XNIException {
402: }
403: */
404:
405: /**
406: * This method notifies the end of a parameter entity. Parameter entity
407: * names begin with a '%' character.
408: *
409: * @param name The name of the parameter entity.
410: * @param augmentations Additional information that may include infoset
411: * augmentations.
412: *
413: * @throws XNIException Thrown by handler to signal an error.
414: */
415: public void endParameterEntity(String name,
416: Augmentations augmentations) throws XNIException {
417: }
418:
419: /**
420: * The start of the DTD external subset.
421: *
422: * @param identifier The resource identifier.
423: * @param augmentations
424: * Additional information that may include infoset
425: * augmentations.
426: * @exception XNIException
427: * Thrown by handler to signal an error.
428: */
429: public void startExternalSubset(XMLResourceIdentifier identifier,
430: Augmentations augmentations) throws XNIException {
431: }
432:
433: /**
434: * The end of the DTD external subset.
435: *
436: * @param augmentations Additional information that may include infoset
437: * augmentations.
438: *
439: * @throws XNIException Thrown by handler to signal an error.
440: */
441: public void endExternalSubset(Augmentations augmentations)
442: throws XNIException {
443: }
444:
445: /**
446: * A comment.
447: *
448: * @param text The text in the comment.
449: * @param augmentations Additional information that may include infoset
450: * augmentations.
451: *
452: * @throws XNIException Thrown by application to signal an error.
453: */
454: /*
455: public void comment(XMLString text, Augmentations augmentations)
456: throws XNIException {
457: }
458: */
459:
460: /**
461: * A processing instruction. Processing instructions consist of a
462: * target name and, optionally, text data. The data is only meaningful
463: * to the application.
464: * <p>
465: * Typically, a processing instruction's data will contain a series
466: * of pseudo-attributes. These pseudo-attributes follow the form of
467: * element attributes but are <strong>not</strong> parsed or presented
468: * to the application as anything other than text. The application is
469: * responsible for parsing the data.
470: *
471: * @param target The target.
472: * @param data The data or null if none specified.
473: * @param augmentations Additional information that may include infoset
474: * augmentations.
475: *
476: * @throws XNIException Thrown by handler to signal an error.
477: */
478: /*
479: public void processingInstruction(String target, XMLString data,
480: Augmentations augmentations)
481: throws XNIException {
482: }
483: */
484:
485: /**
486: * An element declaration.
487: *
488: * @param name The name of the element.
489: * @param contentModel The element content model.
490: * @param augmentations Additional information that may include infoset
491: * augmentations.
492: *
493: * @throws XNIException Thrown by handler to signal an error.
494: */
495: public void elementDecl(String name, String contentModel,
496: Augmentations augmentations) throws XNIException {
497: }
498:
499: /**
500: * The start of an attribute list.
501: *
502: * @param elementName The name of the element that this attribute
503: * list is associated with.
504: * @param augmentations Additional information that may include infoset
505: * augmentations.
506: *
507: * @throws XNIException Thrown by handler to signal an error.
508: */
509: public void startAttlist(String elementName,
510: Augmentations augmentations) throws XNIException {
511: }
512:
513: /**
514: * An attribute declaration.
515: *
516: * @param elementName The name of the element that this attribute
517: * is associated with.
518: * @param attributeName The name of the attribute.
519: * @param type The attribute type. This value will be one of
520: * the following: "CDATA", "ENTITY", "ENTITIES",
521: * "ENUMERATION", "ID", "IDREF", "IDREFS",
522: * "NMTOKEN", "NMTOKENS", or "NOTATION".
523: * @param enumeration If the type has the value "ENUMERATION" or
524: * "NOTATION", this array holds the allowed attribute
525: * values; otherwise, this array is null.
526: * @param defaultType The attribute default type. This value will be
527: * one of the following: "#FIXED", "#IMPLIED",
528: * "#REQUIRED", or null.
529: * @param defaultValue The attribute default value, or null if no
530: * default value is specified.
531: * @param nonNormalizedDefaultValue The attribute default value with no normalization
532: * performed, or null if no default value is specified.
533: * @param augmentations Additional information that may include infoset
534: * augmentations.
535: *
536: * @throws XNIException Thrown by handler to signal an error.
537: */
538: public void attributeDecl(String elementName, String attributeName,
539: String type, String[] enumeration, String defaultType,
540: XMLString defaultValue,
541: XMLString nonNormalizedDefaultValue,
542: Augmentations augmentations) throws XNIException {
543: }
544:
545: /**
546: * The end of an attribute list.
547: *
548: * @param augmentations Additional information that may include infoset
549: * augmentations.
550: *
551: * @throws XNIException Thrown by handler to signal an error.
552: */
553: public void endAttlist(Augmentations augmentations)
554: throws XNIException {
555: }
556:
557: /**
558: * An internal entity declaration.
559: *
560: * @param name The name of the entity. Parameter entity names start with
561: * '%', whereas the name of a general entity is just the
562: * entity name.
563: * @param text The value of the entity.
564: * @param nonNormalizedText The non-normalized value of the entity. This
565: * value contains the same sequence of characters that was in
566: * the internal entity declaration, without any entity
567: * references expanded.
568: * @param augmentations Additional information that may include infoset
569: * augmentations.
570: *
571: * @throws XNIException Thrown by handler to signal an error.
572: */
573: public void internalEntityDecl(String name, XMLString text,
574: XMLString nonNormalizedText, Augmentations augmentations)
575: throws XNIException {
576: }
577:
578: /**
579: * An external entity declaration.
580: *
581: * @param name The name of the entity. Parameter entity names start
582: * with '%', whereas the name of a general entity is just
583: * the entity name.
584: * @param identifier An object containing all location information
585: * pertinent to this external entity.
586: * @param augmentations Additional information that may include infoset
587: * augmentations.
588: *
589: * @throws XNIException Thrown by handler to signal an error.
590: */
591: public void externalEntityDecl(String name,
592: XMLResourceIdentifier identifier,
593: Augmentations augmentations) 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 name,
609: XMLResourceIdentifier identifier, String notation,
610: Augmentations augmentations) throws XNIException {
611: }
612:
613: /**
614: * A notation declaration
615: *
616: * @param name The name of the notation.
617: * @param identifier An object containing all location information
618: * pertinent to this notation.
619: * @param augmentations Additional information that may include infoset
620: * augmentations.
621: *
622: * @throws XNIException Thrown by handler to signal an error.
623: */
624: public void notationDecl(String name,
625: 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,
656: Augmentations augmentations) 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)
668: throws XNIException {
669: }
670:
671: /**
672: * The end of the DTD.
673: *
674: * @param augmentations Additional information that may include infoset
675: * augmentations.
676: *
677: * @throws XNIException Thrown by handler to signal an error.
678: */
679: public void endDTD(Augmentations augmentations) throws XNIException {
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 elementName,
698: Augmentations augmentations) 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)
744: throws XNIException {
745: }
746:
747: /**
748: * The appearance of "#PCDATA" within a group signifying a
749: * mixed content model. This method will be the first called
750: * following the content model's <code>startGroup()</code>.
751: *
752: * @param augmentations Additional information that may include infoset
753: * augmentations.
754: *
755: * @throws XNIException Thrown by handler to signal an error.
756: *
757: * @see #startGroup
758: */
759: public void pcdata(Augmentations augmentations) throws XNIException {
760: }
761:
762: /**
763: * A referenced element in a mixed or children content model.
764: *
765: * @param elementName The name of the referenced element.
766: * @param augmentations Additional information that may include infoset
767: * augmentations.
768: *
769: * @throws XNIException Thrown by handler to signal an error.
770: */
771: public void element(String elementName, Augmentations augmentations)
772: throws XNIException {
773: }
774:
775: /**
776: * The separator between choices or sequences of a mixed or children
777: * content model.
778: *
779: * @param separator The type of children separator.
780: * @param augmentations Additional information that may include infoset
781: * augmentations.
782: *
783: * @throws XNIException Thrown by handler to signal an error.
784: *
785: * @see #SEPARATOR_CHOICE
786: * @see #SEPARATOR_SEQUENCE
787: */
788: public void separator(short separator, Augmentations augmentations)
789: throws XNIException {
790: }
791:
792: /**
793: * The occurrence count for a child in a children content model or
794: * for the mixed content model group.
795: *
796: * @param occurrence The occurrence count for the last element
797: * or group.
798: * @param augmentations Additional information that may include infoset
799: * augmentations.
800: *
801: * @throws XNIException Thrown by handler to signal an error.
802: *
803: * @see #OCCURS_ZERO_OR_ONE
804: * @see #OCCURS_ZERO_OR_MORE
805: * @see #OCCURS_ONE_OR_MORE
806: */
807: public void occurrence(short occurrence, Augmentations augmentations)
808: throws XNIException {
809: }
810:
811: /**
812: * The end of a group for mixed or children content models.
813: *
814: * @param augmentations Additional information that may include infoset
815: * augmentations.
816: *
817: * @throws XNIException Thrown by handler to signal an error.
818: */
819: public void endGroup(Augmentations augmentations)
820: throws XNIException {
821: }
822:
823: /**
824: * The end of a content model.
825: *
826: * @param augmentations Additional information that may include infoset
827: * augmentations.
828: *
829: * @throws XNIException Thrown by handler to signal an error.
830: */
831: public void endContentModel(Augmentations augmentations)
832: throws XNIException {
833: }
834:
835: private XMLDocumentSource fDocumentSource;
836:
837: /** Sets the document source. */
838: public void setDocumentSource(XMLDocumentSource source) {
839: fDocumentSource = source;
840: }
841:
842: /** Returns the document source. */
843: public XMLDocumentSource getDocumentSource() {
844: return fDocumentSource;
845: }
846:
847: private XMLDTDSource fDTDSource;
848:
849: // set the source of this handler
850: public void setDTDSource(XMLDTDSource source) {
851: fDTDSource = source;
852: }
853:
854: // return the source from which this handler derives its events
855: public XMLDTDSource getDTDSource() {
856: return fDTDSource;
857: }
858:
859: private XMLDTDContentModelSource fCMSource;
860:
861: // set content model source
862: public void setDTDContentModelSource(XMLDTDContentModelSource source) {
863: fCMSource = source;
864: }
865:
866: // get content model source
867: public XMLDTDContentModelSource getDTDContentModelSource() {
868: return fCMSource;
869: }
870:
871: }
|