KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > thaiopensource > xml > sax > ForkDTDHandler


1 package com.thaiopensource.xml.sax;
2
3 import org.xml.sax.DTDHandler JavaDoc;
4 import org.xml.sax.SAXException JavaDoc;
5
6 public class ForkDTDHandler implements DTDHandler JavaDoc {
7   private final DTDHandler JavaDoc dh1;
8   private final DTDHandler JavaDoc dh2;
9
10   public ForkDTDHandler(DTDHandler JavaDoc dh1, DTDHandler JavaDoc dh2) {
11     this.dh1 = dh1;
12     this.dh2 = dh2;
13   }
14
15   public void notationDecl(String JavaDoc name,
16                            String JavaDoc publicId,
17                            String JavaDoc systemId)
18           throws SAXException JavaDoc {
19     dh1.notationDecl(name, publicId, systemId);
20     dh2.notationDecl(name, publicId, systemId);
21   }
22
23   public void unparsedEntityDecl(String JavaDoc name,
24                                  String JavaDoc publicId,
25                                  String JavaDoc systemId,
26                                  String JavaDoc notationName)
27           throws SAXException JavaDoc {
28     dh1.unparsedEntityDecl(name, publicId, systemId, notationName);
29     dh2.unparsedEntityDecl(name, publicId, systemId, notationName);
30   }
31 }
32
Popular Tags