1 22 23 package org.xquark.xquery.xdbc; 24 25 import java.io.IOException ; 26 27 import org.xml.sax.XMLReader ; 28 import org.xquark.xml.xdbc.XMLCollection; 29 import org.xquark.xml.xdbc.XMLDBCException; 30 import org.xquark.xpath.XTree; 31 import org.xquark.xpath.XTreeReader; 32 33 public class PathSetXMLDocument extends AbstractXMLDocument { 34 private static final String RCSRevision = "$Revision: 1.1 $"; 35 private static final String RCSName = "$Name: $"; 36 private XTree pathSet; 37 38 public PathSetXMLDocument(String collectionName, XTree pathSet) 39 { 40 super(collectionName, true); 41 this.pathSet = pathSet; 42 } 43 44 public PathSetXMLDocument(String collectionName, XMLCollection collection, XTree pathSet) 45 { 46 super(collectionName, collection, true); 47 this.pathSet = pathSet; 48 } 49 50 58 public void getAsSAX() throws XMLDBCException, org.xml.sax.SAXException 59 { 60 XMLReader reader = new XTreeReader(pathSet); 61 plugHandlers(reader); 62 try { 63 reader.parse(getIdentifier()); 64 } 65 catch (IOException e) { 66 throw new XMLDBCException("IOException while reading document.", e); 68 } 69 } 70 71 } 72 | Popular Tags |