예제 #1
0
 /** regenerate the stream from buffer */
 public void dump(XPathHandler next) {
   int last = byteBuffer.position();
   byteBuffer.position(0);
   while (byteBuffer.position() < last)
     try {
       switch (getByte()) {
         case 0:
           String uri = getString();
           String name = getString();
           String tag = getString();
           AttributesImpl atts = new AttributesImpl();
           int len = getShort();
           for (int i = 0; i < len; i++) atts.addAttribute("", "", getString(), "", getString());
           next.startElement(uri, name, tag, atts);
           break;
         case 1:
           next.endElement(getString(), getString(), getString());
           break;
         case 2:
           char[] text = getChars();
           next.characters(text, 0, text.length);
       }
     } catch (SAXException e) {
       throw new Error(e);
     }
   ;
   byteBuffer.clear();
 }
예제 #2
0
 public void releasePredicate(int pred) { // set the predicate outcome to true
   next.releasePredicate(pred);
 }
예제 #3
0
 /** the end of a predicate */
 public void endPredicate(int pred) {
   next.endPredicate(pred);
 }
예제 #4
0
 /** start a new predicate */
 public void startPredicate(int pred) {
   next.startPredicate(pred);
 }
예제 #5
0
 public void characters(char[] text, int start, int length) throws SAXException {
   next.characters(text, start, length);
   condition.characters(text, start, length);
 }
예제 #6
0
 public void endElement(String nm, String ln, String qn) throws SAXException {
   next.endElement(nm, ln, qn);
   condition.endElement(nm, ln, qn);
   if (--level == 0) next.endPredicate(predicate_id);
 }
예제 #7
0
 public void startElement(String nm, String ln, String qn, Attributes a) throws SAXException {
   if (level++ == 0) next.startPredicate(predicate_id);
   next.startElement(nm, ln, qn, a);
   condition.startElement(nm, ln, qn, a);
 }
예제 #8
0
 public void endDocument() throws SAXException {
   next.endDocument();
   condition.endDocument();
 }
예제 #9
0
 public void startDocument() throws SAXException {
   next.startDocument();
   condition.startDocument();
 }
예제 #10
0
 public void releasePredicate(int pred) {
   next.releasePredicate(pred);
   condition.releasePredicate(pred);
 }
예제 #11
0
 public void endPredicate(int pred) {
   next.endPredicate(pred);
   condition.endPredicate(pred);
 }
예제 #12
0
 public void startPredicate(int pred) {
   next.startPredicate(pred);
   condition.startPredicate(pred);
 }