1 21 22 package nu.xom.xslt; 23 24 import javax.xml.transform.sax.SAXSource ; 25 26 import nu.xom.Document; 27 import nu.xom.Nodes; 28 29 import org.xml.sax.InputSource ; 30 import org.xml.sax.XMLReader ; 31 32 37 class XOMSource extends SAXSource { 38 39 40 private Nodes source; 41 42 43 52 XOMSource(Document source) { 53 this.source = new Nodes(source); 54 } 55 56 57 65 public XOMSource(Nodes source) { 66 this.source = source; 67 } 68 69 70 public InputSource getInputSource() { 71 return new XOMInputSource(source); 72 } 73 74 75 public XMLReader getXMLReader() { 76 return new XOMReader(); 77 } 78 79 80 public String getSystemId() { 81 if (this.source.size() == 0) return null; 82 else return this.source.get(0).getBaseURI(); 83 } 84 85 86 } 87 | Popular Tags |