22 package com.sun.org.apache.xerces.internal.util;
23
24 import com.sun.org.apache.xerces.internal.impl.xs.util.SimpleLocator;
25 import com.sun.org.apache.xerces.internal.jaxp.validation.WrappedSAXException;
26 import com.sun.org.apache.xerces.internal.xni.QName;
27 import com.sun.org.apache.xerces.internal.xni.XMLAttributes;
28 import com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler;
29 import com.sun.org.apache.xerces.internal.xni.XMLLocator;
30 import com.sun.org.apache.xerces.internal.xni.XMLString;
31 import com.sun.org.apache.xerces.internal.xni.parser.XMLDocumentSource;
32 import org.xml.sax.Attributes;
33 import org.xml.sax.ContentHandler;
34 import org.xml.sax.Locator;
35 import org.xml.sax.SAXException;
36
37 /**
38 * Receves SAX {@link ContentHandler} events
39 * and produces the equivalent {@link XMLDocumentHandler} events.
40 *
41 * @author
42 * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
43 */
44 public class SAX2XNI implements ContentHandler, XMLDocumentSource {
45 public SAX2XNI( XMLDocumentHandler core ) {
46 this.fCore = core;
47 }
48
49 private XMLDocumentHandler fCore;
50
51 private final NamespaceSupport nsContext = new NamespaceSupport();
52 private final SymbolTable symbolTable = new SymbolTable();
53
54
55 public void setDocumentHandler(XMLDocumentHandler handler) {
56 fCore = handler;
57 }
58
59 public XMLDocumentHandler getDocumentHandler() {
60 return fCore;
61 }
62
|
22 package com.sun.org.apache.xerces.internal.util;
23
24 import com.sun.org.apache.xerces.internal.impl.xs.util.SimpleLocator;
25 import com.sun.org.apache.xerces.internal.jaxp.validation.WrappedSAXException;
26 import com.sun.org.apache.xerces.internal.xni.QName;
27 import com.sun.org.apache.xerces.internal.xni.XMLAttributes;
28 import com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler;
29 import com.sun.org.apache.xerces.internal.xni.XMLLocator;
30 import com.sun.org.apache.xerces.internal.xni.XMLString;
31 import com.sun.org.apache.xerces.internal.xni.parser.XMLDocumentSource;
32 import org.xml.sax.Attributes;
33 import org.xml.sax.ContentHandler;
34 import org.xml.sax.Locator;
35 import org.xml.sax.SAXException;
36
37 /**
38 * Receves SAX {@link ContentHandler} events
39 * and produces the equivalent {@link XMLDocumentHandler} events.
40 *
41 * @author
42 * Kohsuke Kawaguchi
43 */
44 public class SAX2XNI implements ContentHandler, XMLDocumentSource {
45 public SAX2XNI( XMLDocumentHandler core ) {
46 this.fCore = core;
47 }
48
49 private XMLDocumentHandler fCore;
50
51 private final NamespaceSupport nsContext = new NamespaceSupport();
52 private final SymbolTable symbolTable = new SymbolTable();
53
54
55 public void setDocumentHandler(XMLDocumentHandler handler) {
56 fCore = handler;
57 }
58
59 public XMLDocumentHandler getDocumentHandler() {
60 return fCore;
61 }
62
|