[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qexo-general] Why isn't this working? Is it a bug?
From: |
Per Bothner |
Subject: |
Re: [Qexo-general] Why isn't this working? Is it a bug? |
Date: |
Tue, 22 Jul 2003 23:28:17 -0700 |
User-agent: |
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4) Gecko/20030612 |
Both Craig's and Froncois's bug are "fixed" with the attached patch.
However, the patch is not correct: First all the 'new TreeList' calls in
getPosNext has not be fixed in the same way. That's easy. Harder is:
(1) It is not ok for gnu.lists to reference classes in gnu.xml - I don't
want gnu.lists to depend on gnu.xml.
(2) Creating a NodeTree is correct when the TreeList is viewed as a
sequence of document fragments, which is presumably going to be teh case
for XQuery, but may not be the correct interpretation for other uses of
Values and TreeList.
So I need to figure ut a clean(er) solution to this problem.
(Note the basic problem is how XQuery optimizes element constructors to
SAX-like "event streams" using a Consumer in a function, and then result
of the function needs to be gathered to an Object.)
--
--Per Bothner
address@hidden http://per.bothner.com/
Index: TreeList.java
===================================================================
RCS file: /cvs/kawa/kawa/gnu/lists/TreeList.java,v
retrieving revision 1.31
diff -u -r1.31 TreeList.java
--- TreeList.java 10 Jul 2003 18:44:07 -0000 1.31
+++ TreeList.java 23 Jul 2003 06:15:47 -0000
@@ -1333,7 +1333,12 @@
return objects[datum-OBJECT_REF_SHORT];
if (datum >= BEGIN_GROUP_SHORT
&& datum <= BEGIN_GROUP_SHORT+BEGIN_GROUP_SHORT_INDEX_MAX)
- return new TreeList(this, index, index + data[index+1] + 2);
+ {
+ gnu.xml.NodeTree nodes = new gnu.xml.NodeTree();
+ consumeIRange(index, index + data[index+1] + 2, nodes);
+ return nodes;
+ //return new TreeList(this, index, index + data[index+1] + 2);
+ }
/*
if ((datum & 0xFF00) == BYTE_PREFIX)
return Sequence.TEXT_BYTE_VALUE;