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