You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
(57) |
Apr
(103) |
May
(164) |
Jun
(139) |
Jul
(173) |
Aug
(196) |
Sep
(221) |
Oct
(333) |
Nov
(214) |
Dec
(88) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(163) |
Feb
(165) |
Mar
(98) |
Apr
(93) |
May
(199) |
Jun
(118) |
Jul
(200) |
Aug
(212) |
Sep
(185) |
Oct
(297) |
Nov
(437) |
Dec
(272) |
| 2006 |
Jan
(542) |
Feb
(329) |
Mar
(267) |
Apr
(332) |
May
(267) |
Jun
(130) |
Jul
(161) |
Aug
(348) |
Sep
(166) |
Oct
(305) |
Nov
(173) |
Dec
(173) |
| 2007 |
Jan
(199) |
Feb
(118) |
Mar
(133) |
Apr
(200) |
May
(208) |
Jun
(146) |
Jul
(198) |
Aug
(146) |
Sep
(187) |
Oct
(182) |
Nov
(181) |
Dec
(83) |
| 2008 |
Jan
(252) |
Feb
(124) |
Mar
(124) |
Apr
(101) |
May
(143) |
Jun
(122) |
Jul
(129) |
Aug
(60) |
Sep
(80) |
Oct
(89) |
Nov
(54) |
Dec
(112) |
| 2009 |
Jan
(88) |
Feb
(145) |
Mar
(105) |
Apr
(164) |
May
(123) |
Jun
(154) |
Jul
(374) |
Aug
(341) |
Sep
(219) |
Oct
(137) |
Nov
(373) |
Dec
(240) |
| 2010 |
Jan
(197) |
Feb
(270) |
Mar
(253) |
Apr
(150) |
May
(102) |
Jun
(51) |
Jul
(300) |
Aug
(512) |
Sep
(254) |
Oct
(258) |
Nov
(288) |
Dec
(143) |
| 2011 |
Jan
(238) |
Feb
(179) |
Mar
(253) |
Apr
(332) |
May
(248) |
Jun
(255) |
Jul
(216) |
Aug
(282) |
Sep
(146) |
Oct
(77) |
Nov
(86) |
Dec
(69) |
| 2012 |
Jan
(172) |
Feb
(234) |
Mar
(229) |
Apr
(101) |
May
(212) |
Jun
(267) |
Jul
(129) |
Aug
(210) |
Sep
(239) |
Oct
(271) |
Nov
(368) |
Dec
(220) |
| 2013 |
Jan
(179) |
Feb
(155) |
Mar
(59) |
Apr
(47) |
May
(99) |
Jun
(158) |
Jul
(185) |
Aug
(16) |
Sep
(16) |
Oct
(7) |
Nov
(20) |
Dec
(12) |
| 2014 |
Jan
(21) |
Feb
(17) |
Mar
(18) |
Apr
(13) |
May
(27) |
Jun
(15) |
Jul
(19) |
Aug
(22) |
Sep
(30) |
Oct
(16) |
Nov
(19) |
Dec
(16) |
| 2015 |
Jan
(14) |
Feb
(24) |
Mar
(33) |
Apr
(41) |
May
(14) |
Jun
(80) |
Jul
(53) |
Aug
(8) |
Sep
(7) |
Oct
(15) |
Nov
(13) |
Dec
(2) |
| 2016 |
Jan
(22) |
Feb
(12) |
Mar
(30) |
Apr
(6) |
May
(33) |
Jun
(16) |
Jul
(8) |
Aug
(20) |
Sep
(12) |
Oct
(18) |
Nov
(12) |
Dec
(11) |
| 2017 |
Jan
(24) |
Feb
(26) |
Mar
(47) |
Apr
(23) |
May
(19) |
Jun
(14) |
Jul
(28) |
Aug
(30) |
Sep
(17) |
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
(1) |
Feb
(73) |
Mar
(90) |
Apr
(42) |
May
(116) |
Jun
(90) |
Jul
(127) |
Aug
(103) |
Sep
(56) |
Oct
(42) |
Nov
(95) |
Dec
(58) |
| 2020 |
Jan
(102) |
Feb
(31) |
Mar
(93) |
Apr
(60) |
May
(57) |
Jun
(45) |
Jul
(29) |
Aug
(32) |
Sep
(44) |
Oct
(86) |
Nov
(51) |
Dec
(71) |
| 2021 |
Jan
(44) |
Feb
(25) |
Mar
(78) |
Apr
(130) |
May
(64) |
Jun
(74) |
Jul
(21) |
Aug
(64) |
Sep
(40) |
Oct
(43) |
Nov
(21) |
Dec
(99) |
| 2022 |
Jan
(154) |
Feb
(64) |
Mar
(45) |
Apr
(95) |
May
(62) |
Jun
(48) |
Jul
(73) |
Aug
(37) |
Sep
(71) |
Oct
(27) |
Nov
(40) |
Dec
(65) |
| 2023 |
Jan
(89) |
Feb
(130) |
Mar
(124) |
Apr
(50) |
May
(93) |
Jun
(46) |
Jul
(45) |
Aug
(68) |
Sep
(62) |
Oct
(71) |
Nov
(108) |
Dec
(82) |
| 2024 |
Jan
(53) |
Feb
(76) |
Mar
(64) |
Apr
(75) |
May
(36) |
Jun
(54) |
Jul
(98) |
Aug
(137) |
Sep
(58) |
Oct
(177) |
Nov
(84) |
Dec
(52) |
| 2025 |
Jan
(70) |
Feb
(53) |
Mar
(72) |
Apr
(47) |
May
(88) |
Jun
(49) |
Jul
(86) |
Aug
(51) |
Sep
(65) |
Oct
(91) |
Nov
(18) |
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
1
(5) |
|
2
(7) |
3
(4) |
4
(5) |
5
(3) |
6
(1) |
7
(8) |
8
(7) |
|
9
(1) |
10
(4) |
11
(5) |
12
(2) |
13
(3) |
14
(1) |
15
(1) |
|
16
(1) |
17
(4) |
18
(2) |
19
|
20
|
21
(5) |
22
(6) |
|
23
(6) |
24
(3) |
25
(4) |
26
(9) |
27
|
28
(8) |
29
(12) |
|
30
(5) |
31
(2) |
|
|
|
|
|
|
From: <wol...@us...> - 2008-03-31 19:54:24
|
Revision: 7580
http://exist.svn.sourceforge.net/exist/?rev=7580&view=rev
Author: wolfgang_m
Date: 2008-03-31 12:54:21 -0700 (Mon, 31 Mar 2008)
Log Message:
-----------
[bugfix] when called repeatedly, e.g. in a recursive query or a nested for loop, the XQuery optimizer caused wrong query results and killed performance!
Modified Paths:
--------------
trunk/eXist/src/org/exist/xquery/Optimize.java
Modified: trunk/eXist/src/org/exist/xquery/Optimize.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/Optimize.java 2008-03-31 01:43:22 UTC (rev 7579)
+++ trunk/eXist/src/org/exist/xquery/Optimize.java 2008-03-31 19:54:21 UTC (rev 7580)
@@ -46,7 +46,7 @@
private boolean enabled = true;
private XQueryContext context;
private Optimizable optimizables[];
- private Expression innerExpr;
+ private Expression innerExpr = null;
private LocationStep contextStep = null;
private NodeSet cachedContext = null;
@@ -94,6 +94,7 @@
if (optimize) {
cachedContext = originalContext;
cachedTimestamp = originalContext.getState();
+ cachedOptimize = true;
NodeSet ancestors = null;
NodeSet result = null;
for (int current = 0; current < optimizables.length; current++) {
@@ -158,6 +159,8 @@
}
public void before(XQueryContext context, Expression expression) throws XPathException {
+ if (innerExpr != null)
+ return;
innerExpr = expression;
if (!enabled)
return;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pka...@us...> - 2008-03-31 01:43:25
|
Revision: 7579
http://exist.svn.sourceforge.net/exist/?rev=7579&view=rev
Author: pkaminsk2
Date: 2008-03-30 18:43:22 -0700 (Sun, 30 Mar 2008)
Log Message:
-----------
[bugfix] I changed the way that ElementImpl.appendChild calculates an element's attribute count. The previous calculation didn't make sense, and resulted in a NullPointerException in removeAppendAttributes later if an element had a namespace but did not have any other attributes. This fixed my test that was failing, and doesn't seem to have created new failures in the rest of the JUnit suite. However, I have XQTS tests failing (randomly?) on deserialization of a text node -- this appears unrelated, but who knows?
Modified Paths:
--------------
trunk/eXist/src/org/exist/dom/ElementImpl.java
Modified: trunk/eXist/src/org/exist/dom/ElementImpl.java
===================================================================
--- trunk/eXist/src/org/exist/dom/ElementImpl.java 2008-03-30 21:53:33 UTC (rev 7578)
+++ trunk/eXist/src/org/exist/dom/ElementImpl.java 2008-03-31 01:43:22 UTC (rev 7579)
@@ -489,10 +489,12 @@
elem.setOwnerDocument(owner);
final NodeListImpl ch = new NodeListImpl();
final NamedNodeMap attribs = child.getAttributes();
+ int numActualAttribs = 0;
for (int i = 0; i < attribs.getLength(); i++) {
Attr attr = (Attr) attribs.item(i);
if (!attr.getNodeName().startsWith("xmlns")) {
ch.add(attr);
+ numActualAttribs++;
} else {
String xmlnsDecl = attr.getNodeName();
String prefix = xmlnsDecl.length()==5 ? "" : xmlnsDecl.substring(6);
@@ -506,7 +508,9 @@
ch.add(n);
}
elem.setChildCount(ch.getLength());
- elem.setAttributes((short) (elem.getAttributesCount() + attribs.getLength()));
+ if (numActualAttribs != (short) numActualAttribs)
+ throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "too many attributes");
+ elem.setAttributes((short) numActualAttribs);
lastPath.addComponent(elem.getQName());
// insert the node
getBroker().insertNodeAfter(transaction, last.getNode(), elem);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2008-03-30 21:53:35
|
Revision: 7578
http://exist.svn.sourceforge.net/exist/?rev=7578&view=rev
Author: wolfgang_m
Date: 2008-03-30 14:53:33 -0700 (Sun, 30 Mar 2008)
Log Message:
-----------
[bugfix] parent node of a single attribute in DOM fragment should be null: count((attribute attr {})/..). Fixes XQTS test Constr-compattr-parent-1.
Modified Paths:
--------------
trunk/eXist/src/org/exist/memtree/AttributeImpl.java
Modified: trunk/eXist/src/org/exist/memtree/AttributeImpl.java
===================================================================
--- trunk/eXist/src/org/exist/memtree/AttributeImpl.java 2008-03-30 21:36:37 UTC (rev 7577)
+++ trunk/eXist/src/org/exist/memtree/AttributeImpl.java 2008-03-30 21:53:33 UTC (rev 7578)
@@ -165,8 +165,11 @@
* @see org.w3c.dom.Node#getParentNode()
*/
public Node getParentNode() {
- return document.getNode(document.attrParent[nodeNumber]);
- }
+ int parent = document.attrParent[nodeNumber];
+ if (parent > 0)
+ return document.getNode(parent);
+ return null;
+ }
public Node selectParentNode() {
return getParentNode();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2008-03-30 21:36:40
|
Revision: 7577
http://exist.svn.sourceforge.net/exist/?rev=7577&view=rev
Author: wolfgang_m
Date: 2008-03-30 14:36:37 -0700 (Sun, 30 Mar 2008)
Log Message:
-----------
[bugfix] fix ArrayIndexOutOfRange exception in fn:codepoints-to-string().
Modified Paths:
--------------
trunk/eXist/src/org/exist/xquery/functions/FunCodepointsToString.java
Modified: trunk/eXist/src/org/exist/xquery/functions/FunCodepointsToString.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/FunCodepointsToString.java 2008-03-30 19:21:36 UTC (rev 7576)
+++ trunk/eXist/src/org/exist/xquery/functions/FunCodepointsToString.java 2008-03-30 21:36:37 UTC (rev 7577)
@@ -71,8 +71,8 @@
StringBuffer buf = new StringBuffer();
for (SequenceIterator i = args[0].iterate(); i.hasNext(); ) {
long next = ((NumericValue)i.nextItem()).getLong();
- if (next > Integer.MAX_VALUE || !XMLChar.isValid((int)next)) {
- throw new XPathException(getASTNode(), "Codepoint " + next +
+ if (next < 0 || next > Integer.MAX_VALUE || !XMLChar.isValid((int)next)) {
+ throw new XPathException(getASTNode(), "err:FOCH0001: Codepoint " + next +
" is not a valid character.");
}
if (next < 65536) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pka...@us...> - 2008-03-30 19:21:41
|
Revision: 7576
http://exist.svn.sourceforge.net/exist/?rev=7576&view=rev
Author: pkaminsk2
Date: 2008-03-30 12:21:36 -0700 (Sun, 30 Mar 2008)
Log Message:
-----------
[bugfix] Fixed ordering of memtree nodes (was reversed).
Fluent: changed error message for memtree node modification, since selecting self::* no longer writes out a temporary persistent fragment
Modified Paths:
--------------
trunk/eXist/extensions/fluent/src/org/exist/fluent/Node.java
trunk/eXist/src/org/exist/memtree/NodeImpl.java
Modified: trunk/eXist/extensions/fluent/src/org/exist/fluent/Node.java
===================================================================
--- trunk/eXist/extensions/fluent/src/org/exist/fluent/Node.java 2008-03-30 17:58:32 UTC (rev 7575)
+++ trunk/eXist/extensions/fluent/src/org/exist/fluent/Node.java 2008-03-30 19:21:36 UTC (rev 7576)
@@ -197,7 +197,7 @@
});
} catch (ClassCastException e) {
if (getDOMNode() instanceof org.exist.memtree.NodeImpl) {
- throw new UnsupportedOperationException("appends to in-memory nodes are not yet supported, but calling query().single(\"self::*\").node() on the node will implicitly materialize the result in a temporary area of the database");
+ throw new UnsupportedOperationException("appends to in-memory nodes are not supported");
} else {
throw new UnsupportedOperationException("cannot append to a " + Type.getTypeName(item.getType()));
}
@@ -300,7 +300,7 @@
});
} catch (ClassCastException e) {
if (getDOMNode() instanceof org.exist.memtree.NodeImpl) {
- throw new UnsupportedOperationException("replacement of in-memory nodes is not yet supported, but calling query().single(\"self::*\").node() on the node will implicitly materialize the result in a temporary area of the database");
+ throw new UnsupportedOperationException("replacement of in-memory nodes is not supported");
} else {
throw new UnsupportedOperationException("cannot replace a " + Type.getTypeName(item.getType()));
}
@@ -335,7 +335,7 @@
});
} catch (ClassCastException e) {
if (getDOMNode() instanceof org.exist.memtree.ElementImpl) {
- throw new UnsupportedOperationException("updates on in-memory nodes are not yet supported, but calling query().single(\"self::*\").node() on the node will implicitly materialize the result in a temporary area of the database");
+ throw new UnsupportedOperationException("updates on in-memory nodes are not supported");
} else {
throw new UnsupportedOperationException("cannot update attributes on a " + Type.getTypeName(item.getType()));
}
Modified: trunk/eXist/src/org/exist/memtree/NodeImpl.java
===================================================================
--- trunk/eXist/src/org/exist/memtree/NodeImpl.java 2008-03-30 17:58:32 UTC (rev 7575)
+++ trunk/eXist/src/org/exist/memtree/NodeImpl.java 2008-03-30 19:21:36 UTC (rev 7576)
@@ -249,8 +249,8 @@
*/
public boolean after(NodeValue other, boolean isFollowing) throws XPathException {
if (other.getImplementationType() != NodeValue.IN_MEMORY_NODE)
- throw new XPathException("annot compare persistent node with in-memory node");
- return nodeNumber < ((NodeImpl) other).nodeNumber;
+ throw new XPathException("cannot compare persistent node with in-memory node");
+ return nodeNumber > ((NodeImpl) other).nodeNumber;
}
/* (non-Javadoc)
@@ -258,8 +258,8 @@
*/
public boolean before(NodeValue other, boolean isPreceding) throws XPathException {
if (other.getImplementationType() != NodeValue.IN_MEMORY_NODE)
- throw new XPathException("annot compare persistent node with in-memory node");
- return nodeNumber > ((NodeImpl) other).nodeNumber;
+ throw new XPathException("cannot compare persistent node with in-memory node");
+ return nodeNumber < ((NodeImpl) other).nodeNumber;
}
public int compareTo(Object other) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2008-03-30 17:58:35
|
Revision: 7575
http://exist.svn.sourceforge.net/exist/?rev=7575&view=rev
Author: wolfgang_m
Date: 2008-03-30 10:58:32 -0700 (Sun, 30 Mar 2008)
Log Message:
-----------
[feature] The XQTS test suite can now be run in two modes: with documents stored in the db or in-memory.
Modified Paths:
--------------
trunk/eXist/webapp/xqts/config.xml.tmpl
trunk/eXist/webapp/xqts/report.xql
trunk/eXist/webapp/xqts/xqts.xql
Modified: trunk/eXist/webapp/xqts/config.xml.tmpl
===================================================================
--- trunk/eXist/webapp/xqts/config.xml.tmpl 2008-03-30 17:49:07 UTC (rev 7574)
+++ trunk/eXist/webapp/xqts/config.xml.tmpl 2008-03-30 17:58:32 UTC (rev 7575)
@@ -13,4 +13,9 @@
-->
<basedir>d:/Data/XQTS_1.0.2/</basedir>
+ <!--
+ "database": store source documents in the database (default).
+ "memory": test in-memory processing. Source documents will be kept in memory.
+ -->
+ <mode>database</mode>
</config>
Modified: trunk/eXist/webapp/xqts/report.xql
===================================================================
--- trunk/eXist/webapp/xqts/report.xql 2008-03-30 17:49:07 UTC (rev 7574)
+++ trunk/eXist/webapp/xqts/report.xql 2008-03-30 17:58:32 UTC (rev 7575)
@@ -249,8 +249,8 @@
}
<tr>
<td class="label">Result:</td>
- <td class="{$result/@result}">
- {string($result/@result)}
+ <td class="{$result/@result[1]}">
+ {string($result[1]/@result)}
</td>
</tr>
</table>
Modified: trunk/eXist/webapp/xqts/xqts.xql
===================================================================
--- trunk/eXist/webapp/xqts/xqts.xql 2008-03-30 17:49:07 UTC (rev 7574)
+++ trunk/eXist/webapp/xqts/xqts.xql 2008-03-30 17:58:32 UTC (rev 7575)
@@ -40,8 +40,10 @@
* Run this script with the client.
-------------------------------------------------------------------------- :)
+
declare variable $xqts:CONFIG := xqts:initialize();
declare variable $xqts:XQTS_HOME := xqts:path-to-uri($xqts:CONFIG/basedir/text());
+declare variable $xqts:IN_MEMORY := ($xqts:CONFIG/mode/text() = "memory");
declare function xqts:initialize() as element() {
let $home := system:get-exist-home()
@@ -96,7 +98,7 @@
declare function xqts:create-collections($group as element(catalog:test-group)) as node() {
let $rootColl := xdb:create-collection("/db/XQTS", "test-results")
- let $temp := xdb:create-collection("/db/XQTS", "temp")
+ let $temp := xdb:create-collection("/db/XQTS", "temp")
let $ancestors := reverse(($group/ancestor::catalog:test-group, $group))
let $collection := xqts:create-collections($rootColl, $ancestors, "/db/XQTS/test-results")
let $results := xdb:store($collection, "results.xml", <test-result failed="0" passed="0" error="0"/>)
@@ -131,11 +133,19 @@
let $source := root($input)//catalog:source[@ID = $input/text()]
return
if (empty($source)) then
- concat("no input found: ", $input/text())
+ concat("no input found: ", $input/text())
else
doc(concat("/db/XQTS/", $source/@FileName))
};
+declare function xqts:get-input-value-uri($input as element(catalog:input-file)) as item()* {
+ if ($input eq "emptydoc") then
+ ()
+ else
+ let $source := root($input)//catalog:source[@ID = $input/text()]
+ return concat( $xqts:XQTS_HOME, "/", $source/@FileName )
+};
+
declare function xqts:get-variable($case as element(catalog:test-case), $varName as xs:string) as item()* {
let $filePath := concat($xqts:XQTS_HOME, "Queries/XQuery/", $case/@FilePath, $varName, ".xq")
let $xq-string := util:file-read($filePath, "UTF-8")
@@ -196,7 +206,7 @@
let $source := root($input)//catalog:source[@ID = $input/text()]
return
if (empty($source)) then
- concat("no input found: ", $input/text())
+ concat("no input found: ", $input/text())
else
doc(concat("/db/XQTS/", $source/@FileName))
)
@@ -249,22 +259,28 @@
xqts:normalize-and-expand(util:file-read($outputFilePath, "UTF-8"))
else if ($compare eq "TextAsXML") then
xqts:normalize-and-expand(util:file-read($outputFilePath, "UTF-8"))
- else if ($compare eq "XML") then
- util:catch(
- "java.lang.Exception",
- doc(xdb:store("/db/XQTS/temp", substring-before($output/text(), "."), xs:anyURI($outputFilePath), "text/xml")),
- (: Handle unexpected exceptions :)
- util:log("ERROR", concat("Exception while loading expected result: ", $util:exception-message))
- )
- else if ($compare eq "Fragment") then
- let $xmlFrag := concat("<f>", util:file-read($outputFilePath, "UTF-8"), "</f>")
- return
+ else if ($compare eq "XML") then
+ if ($xqts:IN_MEMORY) then
+ util:parse(util:file-read($outputFilePath, "UTF-8"))
+ else
util:catch(
"java.lang.Exception",
- doc(xdb:store("/db/XQTS/temp", substring-before($output/text(), "."), $xmlFrag, "text/xml")),
+ doc(xdb:store("/db/XQTS/temp", substring-before($output/text(), "."), xs:anyURI($outputFilePath), "text/xml")),
(: Handle unexpected exceptions :)
- util:log("ERROR", concat("Exception while loading expected result fragment: ", $util:exception-message))
+ util:log("ERROR", concat("Exception while loading expected result: ", $util:exception-message))
)
+ else if ($compare eq "Fragment") then
+ let $xmlFrag := concat("<f>", util:file-read($outputFilePath, "UTF-8"), "</f>")
+ return
+ if ($xqts:IN_MEMORY) then
+ util:parse($xmlFrag)
+ else
+ util:catch(
+ "java.lang.Exception",
+ doc(xdb:store("/db/XQTS/temp", substring-before($output/text(), "."), $xmlFrag, "text/xml")),
+ (: Handle unexpected exceptions :)
+ util:log("ERROR", concat("Exception while loading expected result fragment: ", $util:exception-message))
+ )
else
util:log("ERROR", concat("Unknown comparison method: ", $compare))
}
@@ -287,7 +303,10 @@
{
for $input in $testCase/catalog:input-file
return
- <variable name="{$input/@variable}">{xqts:get-input-value($input)}</variable>,
+ if ($xqts:IN_MEMORY) then
+ <variable name="{$input/@variable}" source="{xqts:get-input-value-uri($input)}"/>
+ else
+ <variable name="{$input/@variable}">{xqts:get-input-value($input)}</variable>,
for $var in $testCase/catalog:input-query
return
let $variable := xqts:get-variable($testCase, $var/@name)
@@ -455,7 +474,6 @@
declare function xqts:run-test-group($group as element(catalog:test-group)) as empty() {
(: Create the collection hierarchy for this group and get the results.xml doc to append to. :)
let $resultsDoc := xqts:create-collections($group)
- let $log-resdoc := util:log("DEBUG", ("Creating resdoc collection: ", $resultsDoc))
let $tests := $group/catalog:test-case
return
(
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2008-03-30 17:49:11
|
Revision: 7574
http://exist.svn.sourceforge.net/exist/?rev=7574&view=rev
Author: wolfgang_m
Date: 2008-03-30 10:49:07 -0700 (Sun, 30 Mar 2008)
Log Message:
-----------
[feature] Enable eXist to directly query in-memory XML fragments without storing them into the db first.
This merges the eXist-memproc branch into trunk.
Modified Paths:
--------------
trunk/eXist/src/org/exist/Indexer.java
trunk/eXist/src/org/exist/dom/AbstractNodeSet.java
trunk/eXist/src/org/exist/dom/NodeProxy.java
trunk/eXist/src/org/exist/memtree/AttributeImpl.java
trunk/eXist/src/org/exist/memtree/DocumentImpl.java
trunk/eXist/src/org/exist/memtree/ElementImpl.java
trunk/eXist/src/org/exist/memtree/InMemoryNodeSet.java
trunk/eXist/src/org/exist/memtree/MemTreeBuilder.java
trunk/eXist/src/org/exist/memtree/NodeImpl.java
trunk/eXist/src/org/exist/memtree/SAXAdapter.java
trunk/eXist/src/org/exist/validation/Validator.java
trunk/eXist/src/org/exist/xqj/XQItem.java
trunk/eXist/src/org/exist/xquery/AnyNodeTest.java
trunk/eXist/src/org/exist/xquery/BindingExpression.java
trunk/eXist/src/org/exist/xquery/DeferredFunctionCall.java
trunk/eXist/src/org/exist/xquery/ForExpr.java
trunk/eXist/src/org/exist/xquery/GeneralComparison.java
trunk/eXist/src/org/exist/xquery/Intersection.java
trunk/eXist/src/org/exist/xquery/LocationStep.java
trunk/eXist/src/org/exist/xquery/OpAnd.java
trunk/eXist/src/org/exist/xquery/OpOr.java
trunk/eXist/src/org/exist/xquery/PathExpr.java
trunk/eXist/src/org/exist/xquery/Predicate.java
trunk/eXist/src/org/exist/xquery/SequenceConstructor.java
trunk/eXist/src/org/exist/xquery/Union.java
trunk/eXist/src/org/exist/xquery/XQueryContext.java
trunk/eXist/src/org/exist/xquery/functions/FunId.java
trunk/eXist/src/org/exist/xquery/functions/FunIdRef.java
trunk/eXist/src/org/exist/xquery/functions/FunNormalizeUnicode.java
trunk/eXist/src/org/exist/xquery/functions/FunNot.java
trunk/eXist/src/org/exist/xquery/functions/FunRoot.java
trunk/eXist/src/org/exist/xquery/value/AtomicValue.java
trunk/eXist/src/org/exist/xquery/value/EmptySequence.java
trunk/eXist/src/org/exist/xquery/value/GroupedValueSequence.java
trunk/eXist/src/org/exist/xquery/value/MixedNodeValueComparator.java
trunk/eXist/src/org/exist/xquery/value/OrderedValueSequence.java
trunk/eXist/src/org/exist/xquery/value/PreorderedValueSequence.java
trunk/eXist/src/org/exist/xquery/value/Sequence.java
trunk/eXist/src/org/exist/xquery/value/ValueSequence.java
Added Paths:
-----------
trunk/eXist/src/org/exist/xquery/value/MemoryNodeSet.java
Modified: trunk/eXist/src/org/exist/Indexer.java
===================================================================
--- trunk/eXist/src/org/exist/Indexer.java 2008-03-29 19:51:50 UTC (rev 7573)
+++ trunk/eXist/src/org/exist/Indexer.java 2008-03-30 17:49:07 UTC (rev 7574)
@@ -23,7 +23,16 @@
import org.apache.log4j.Logger;
import org.exist.collections.CollectionConfiguration;
-import org.exist.dom.*;
+import org.exist.dom.AttrImpl;
+import org.exist.dom.CDATASectionImpl;
+import org.exist.dom.CommentImpl;
+import org.exist.dom.DocumentImpl;
+import org.exist.dom.DocumentTypeImpl;
+import org.exist.dom.ElementImpl;
+import org.exist.dom.ProcessingInstructionImpl;
+import org.exist.dom.QName;
+import org.exist.dom.StoredNode;
+import org.exist.dom.TextImpl;
import org.exist.indexing.StreamListener;
import org.exist.storage.DBBroker;
import org.exist.storage.GeneralRangeIndexSpec;
@@ -39,7 +48,14 @@
import org.exist.xquery.value.StringValue;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
-import org.xml.sax.*;
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXNotRecognizedException;
+import org.xml.sax.SAXNotSupportedException;
+import org.xml.sax.SAXParseException;
import org.xml.sax.ext.LexicalHandler;
import javax.xml.parsers.ParserConfigurationException;
@@ -60,9 +76,9 @@
private static final int CACHE_CHILD_COUNT_MAX = 0x10000;
- private static final String ATTR_ID_TYPE = "ID";
- private static final String ATTR_IDREF_TYPE = "IDREF";
- private static final String ATTR_IDREFS_TYPE = "IDREFS";
+ public static final String ATTR_ID_TYPE = "ID";
+ public static final String ATTR_IDREF_TYPE = "IDREF";
+ public static final String ATTR_IDREFS_TYPE = "IDREFS";
private final static Logger LOG = Logger.getLogger(Indexer.class);
Modified: trunk/eXist/src/org/exist/dom/AbstractNodeSet.java
===================================================================
--- trunk/eXist/src/org/exist/dom/AbstractNodeSet.java 2008-03-29 19:51:50 UTC (rev 7573)
+++ trunk/eXist/src/org/exist/dom/AbstractNodeSet.java 2008-03-30 17:49:07 UTC (rev 7574)
@@ -21,8 +21,6 @@
*/
package org.exist.dom;
-import java.util.Iterator;
-
import org.apache.log4j.Logger;
import org.exist.collections.Collection;
import org.exist.numbering.NodeId;
@@ -31,11 +29,14 @@
import org.exist.xquery.XPathException;
import org.exist.xquery.value.AbstractSequence;
import org.exist.xquery.value.Item;
+import org.exist.xquery.value.MemoryNodeSet;
import org.exist.xquery.value.Sequence;
import org.exist.xquery.value.SequenceIterator;
import org.exist.xquery.value.Type;
import org.w3c.dom.Node;
+import java.util.Iterator;
+
/**
* Abstract base class for all node set implementations. A node set is a special type of sequence,
* which contains only nodes. Class NodeSet thus implements the {@link org.exist.xquery.value.Sequence}
@@ -572,6 +573,10 @@
return this;
}
+ public MemoryNodeSet toMemNodeSet() throws XPathException {
+ return null;
+ }
+
/* (non-Javadoc)
* @see org.exist.dom.NodeSet#getState()
*/
Modified: trunk/eXist/src/org/exist/dom/NodeProxy.java
===================================================================
--- trunk/eXist/src/org/exist/dom/NodeProxy.java 2008-03-29 19:51:50 UTC (rev 7573)
+++ trunk/eXist/src/org/exist/dom/NodeProxy.java 2008-03-30 17:49:07 UTC (rev 7574)
@@ -36,6 +36,7 @@
import org.exist.xquery.XPathException;
import org.exist.xquery.value.AtomicValue;
import org.exist.xquery.value.Item;
+import org.exist.xquery.value.MemoryNodeSet;
import org.exist.xquery.value.NodeValue;
import org.exist.xquery.value.Sequence;
import org.exist.xquery.value.SequenceIterator;
@@ -53,35 +54,35 @@
import java.util.Properties;
/**
- * Placeholder class for DOM nodes.
- *
+ * Placeholder class for DOM nodes.
+ *
* NodeProxy is an internal proxy class, acting as a placeholder for all types of persistent XML nodes
- * during query processing. NodeProxy just stores the node's unique id and the document it belongs to.
- * Query processing deals with these proxys most of the time. Using a NodeProxy is much cheaper
+ * during query processing. NodeProxy just stores the node's unique id and the document it belongs to.
+ * Query processing deals with these proxys most of the time. Using a NodeProxy is much cheaper
* than loading the actual node from the database. The real DOM node is only loaded,
- * if further information is required for the evaluation of an XPath expression. To obtain
- * the real node for a proxy, simply call {@link #getNode()}.
- *
- * All sets of type NodeSet operate on NodeProxys. A node set is a special type of
+ * if further information is required for the evaluation of an XPath expression. To obtain
+ * the real node for a proxy, simply call {@link #getNode()}.
+ *
+ * All sets of type NodeSet operate on NodeProxys. A node set is a special type of
* sequence, so NodeProxy does also implement {@link org.exist.xquery.value.Item} and
- * can thus be an item in a sequence. Since, according to XPath 2, a single node is also
+ * can thus be an item in a sequence. Since, according to XPath 2, a single node is also
* a sequence, NodeProxy does itself extend NodeSet. It thus represents a node set containing
* just one, single node.
*
*@author Wolfgang Meier <wol...@ex...>
*/
public class NodeProxy implements NodeSet, NodeValue, DocumentSet, Comparable {
-
- /*
+
+ /*
* Special values for nodes gid :
* Chosen in order to facilitate fast arithmetic computations
*/
- public static final int DOCUMENT_NODE_GID = -1;
- public static final int UNKNOWN_NODE_GID = 0;
+ public static final int DOCUMENT_NODE_GID = -1;
+ public static final int UNKNOWN_NODE_GID = 0;
public static final int DOCUMENT_ELEMENT_GID = 1;
-
- public static final short UNKNOWN_NODE_TYPE = -1;
-
+
+ public static final short UNKNOWN_NODE_TYPE = -1;
+
public static final int UNKNOWN_NODE_LEVEL = -1;
/**
@@ -96,9 +97,9 @@
* @link #UNKNOWN_NODE_ADDRESS
*/
private long internalAddress = StoredNode.UNKNOWN_NODE_IMPL_ADDRESS;
-
+
/**
- * The type of this node (as defined by DOM), if known.
+ * The type of this node (as defined by DOM), if known.
* @link #UNKNOWN_NODE_TYPE
*/
private short nodeType = UNKNOWN_NODE_TYPE;
@@ -106,7 +107,7 @@
/**
* The first {@link Match} object associated with this node.
* Match objects are used to track fulltext hits throughout query processing.
- *
+ *
* Matches are stored as a linked list.
*/
private Match match = null;
@@ -122,7 +123,7 @@
public NodeProxy(DocumentImpl doc, NodeId nodeId) {
this(doc, nodeId, UNKNOWN_NODE_TYPE, StoredNode.UNKNOWN_NODE_IMPL_ADDRESS);
}
-
+
/**
* Creates a new <code>NodeProxy</code> instance.
*
@@ -133,7 +134,7 @@
public NodeProxy(DocumentImpl doc, NodeId nodeId, long address) {
this(doc, nodeId, UNKNOWN_NODE_TYPE, address);
}
-
+
/**
* Creates a new <code>NodeProxy</code> instance.
*
@@ -144,7 +145,7 @@
public NodeProxy(DocumentImpl doc, NodeId nodeId, short nodeType) {
this(doc, nodeId, nodeType, StoredNode.UNKNOWN_NODE_IMPL_ADDRESS);
}
-
+
/**
* Creates a new <code>NodeProxy</code> instance.
*
@@ -159,7 +160,7 @@
this.internalAddress = address;
this.nodeId = nodeId;
}
-
+
/**
* Creates a new <code>NodeProxy</code> instance.
*
@@ -168,7 +169,7 @@
public NodeProxy(NodeProxy p) {
this(p.doc, p.nodeId, p.nodeType, p.internalAddress);
match = p.match;
- //TODO : what about node's context ?
+ //TODO : what about node's context ?
}
/**
@@ -179,7 +180,7 @@
public NodeProxy(StoredNode n) {
this((DocumentImpl)n.getOwnerDocument(), n.getNodeId(), n.getNodeType(), n.getInternalAddress());
}
-
+
/**
* create a proxy to a document node
* @param doc a <code>DocumentImpl</code> value
@@ -205,16 +206,16 @@
public NodeId getNodeId() {
return nodeId;
}
-
+
/* (non-Javadoc)
* @see org.exist.xquery.value.NodeValue#getImplementation()
*/
public int getImplementationType() {
return NodeValue.PERSISTENT_NODE;
}
-
+
/**
- * Ordering first according to document ID; then if equal
+ * Ordering first according to document ID; then if equal
* according to node gid.
* @param other a <code>NodeProxy</code> value
* @return an <code>int</code> value
@@ -225,7 +226,7 @@
return diff;
return nodeId.compareTo(other.nodeId);
}
-
+
/**
* The method <code>compareTo</code>
*
@@ -264,13 +265,13 @@
*/
public boolean equals(NodeValue other) throws XPathException {
if (other.getImplementationType() != NodeValue.PERSISTENT_NODE)
- throw new XPathException("cannot compare persistent node with in-memory node");
+ throw new XPathException("cannot compare persistent node with in-memory node");
NodeProxy otherNode = (NodeProxy) other;
if (otherNode.doc.getDocId() != doc.getDocId())
return false;
return otherNode.nodeId.equals(nodeId);
}
-
+
/**
* The method <code>before</code>
*
@@ -285,10 +286,10 @@
NodeProxy otherNode = (NodeProxy) other;
if (doc.getDocId() != otherNode.doc.getDocId())
//Totally arbitrary
- return doc.getDocId() < otherNode.doc.getDocId();
+ return doc.getDocId() < otherNode.doc.getDocId();
return nodeId.before(otherNode.nodeId, isPreceding);
}
-
+
/**
* The method <code>after</code>
*
@@ -303,7 +304,7 @@
NodeProxy otherNode = (NodeProxy) other;
if (doc.getDocId() != otherNode.doc.getDocId())
//Totally arbitrary
- return doc.getDocId() > otherNode.doc.getDocId();
+ return doc.getDocId() > otherNode.doc.getDocId();
return nodeId.after(otherNode.nodeId, isFollowing);
}
@@ -315,7 +316,7 @@
public Document getOwnerDocument() {
return doc;
}
-
+
/**
* The method <code>getDocument</code>
*
@@ -324,7 +325,7 @@
public final DocumentImpl getDocument() {
return doc;
}
-
+
/**
* The method <code>isDocument</code>
*
@@ -347,7 +348,7 @@
return realNode;
}
}
-
+
public short getNodeType() {
return nodeType;
}
@@ -362,7 +363,7 @@
// throw new IllegalArgumentException("Node type already affected");
this.nodeType = nodeType;
}
-
+
/**
* Returns the storage address of this node in dom.dbx.
* @return long
@@ -373,21 +374,21 @@
/**
* Sets the storage address of this node in dom.dbx.
- *
+ *
* @param internalAddress The internalAddress to set
*/
public void setInternalAddress(long internalAddress) {
this.internalAddress = internalAddress;
}
-
+
public void setIndexType(int type) {
- this.internalAddress = StorageAddress.setIndexType(internalAddress, (short) type);
+ this.internalAddress = StorageAddress.setIndexType(internalAddress, (short) type);
}
public int getIndexType() {
return RangeIndexSpec.indexTypeToXPath(StorageAddress.indexTypeFromPointer(internalAddress));
}
-
+
public boolean hasTextIndex() {
return RangeIndexSpec.hasFulltextIndex(StorageAddress.indexTypeFromPointer(internalAddress));
}
@@ -395,15 +396,15 @@
public boolean hasMixedContent() {
return RangeIndexSpec.hasMixedContent(StorageAddress.indexTypeFromPointer(internalAddress));
}
-
+
public Match getMatches() {
return match;
}
-
+
public void setMatches(Match match) {
this.match = match;
}
-
+
public boolean hasMatch(Match m) {
if (m == null || match == null)
return false;
@@ -447,10 +448,10 @@
/**
* Add a node to the list of context nodes for this node.
- *
- * NodeProxy internally stores the context nodes of the XPath context, for which
+ *
+ * NodeProxy internally stores the context nodes of the XPath context, for which
* this node has been selected during a previous processing step.
- *
+ *
* Since eXist tries to process many expressions in one, single processing step,
* the context information is required to resolve predicate expressions. For
* example, for an expression like //SCENE[SPEECH/SPEAKER='HAMLET'],
@@ -458,7 +459,7 @@
* in the predicate was true. Thus, when evaluating the step SCENE[SPEECH], the
* SCENE nodes become context items of the SPEECH nodes and this context
* information is preserved through all following steps.
- *
+ *
* To process the predicate expression, {@link org.exist.xquery.Predicate} will take the
* context nodes returned by the filter expression and compare them to its context
* node set.
@@ -485,11 +486,11 @@
next = next.getNextDirect();
}
}
-
+
/**
* Add all context nodes from the other NodeProxy to the
* context of this NodeProxy.
- *
+ *
* @param other
*/
public void addContext(NodeProxy other) {
@@ -499,7 +500,7 @@
next = next.getNextDirect();
}
}
-
+
/**
* The method <code>copyContext</code>
*
@@ -508,7 +509,7 @@
public void copyContext(NodeProxy node) {
context = node.getContext();
}
-
+
/**
* The method <code>deepCopyContext</code>
*
@@ -530,7 +531,7 @@
}
// System.out.println(debugContext());
}
-
+
/**
* The method <code>deepCopyContext</code>
*
@@ -542,7 +543,7 @@
deepCopyContext(node);
addContextNode(addContextId, node);
}
-
+
/**
* The method <code>clearContext</code>
*
@@ -572,7 +573,7 @@
// }
// this.context = newContext;
}
-
+
/**
* The method <code>getContext</code>
*
@@ -581,7 +582,7 @@
public ContextItem getContext() {
return context;
}
-
+
/**
* The method <code>debugContext</code>
*
@@ -601,7 +602,7 @@
}
return buf.toString();
}
-
+
// methods of interface Item
/* (non-Javadoc)
@@ -629,7 +630,7 @@
return Type.NODE;
}
}
-
+
/* (non-Javadoc)
* @see org.exist.xquery.value.Sequence#isPersistentSet()
*/
@@ -676,7 +677,7 @@
} else {
return doc.getBroker().getNodeValue(new StoredNode(this), false);
}
- }
+ }
/**
* The method <code>getNodeValueSeparated</code>
@@ -685,7 +686,7 @@
*/
public String getNodeValueSeparated() {
return doc.getBroker().getNodeValue(new StoredNode(this), true);
- }
+ }
/* (non-Javadoc)
* @see org.exist.xquery.value.Item#getStringValue()
@@ -707,7 +708,7 @@
public AtomicValue atomize() throws XPathException {
return new UntypedAtomicValue(getNodeValue());
}
-
+
/* (non-Javadoc)
* @see org.exist.xquery.value.Item#toSAX(org.exist.storage.DBBroker, org.xml.sax.ContentHandler)
*/
@@ -767,7 +768,7 @@
return Integer.MAX_VALUE;
}
-
+
/* (non-Javadoc)
* @see org.exist.xquery.value.Item#toJavaObject(java.lang.Class)
*/
@@ -787,63 +788,67 @@
/*
* Methods of interface Sequence:
*/
-
+
/* (non-Javadoc)
* @see org.exist.xquery.value.Sequence#getItemType()
*/
public int getItemType() {
return getType();
}
-
+
/* (non-Javadoc)
* @see org.exist.xquery.value.Sequence#getCardinality()
*/
public int getCardinality() {
return Cardinality.EXACTLY_ONE;
}
-
+
/* (non-Javadoc)
* @see org.exist.xquery.value.Sequence#isCached()
*/
public boolean isCached() {
return false;
}
-
+
/* (non-Javadoc)
* @see org.exist.xquery.value.Sequence#setIsCached(boolean)
*/
public void setIsCached(boolean cached) {
}
-
+
/* (non-Javadoc)
* @see org.exist.xquery.value.Sequence#toNodeSet()
*/
public NodeSet toNodeSet() throws XPathException {
return this;
}
-
+
+ public MemoryNodeSet toMemNodeSet() throws XPathException {
+ return null;
+ }
+
/* (non-Javadoc)
* @see org.exist.xquery.value.Sequence#effectiveBooleanValue()
*/
public boolean effectiveBooleanValue() throws XPathException {
return true;
}
-
+
/* (non-Javadoc)
* @see org.exist.xquery.value.Sequence#removeDuplicates()
*/
public void removeDuplicates() {
// single node: no duplicates
}
-
+
/* (non-Javadoc)
* @see org.exist.xquery.value.Sequence#setSelfAsContext()
*/
public void setSelfAsContext(int contextId) {
addContextNode(contextId, this);
}
-
-
+
+
/* -----------------------------------------------*
* Methods of class NodeSet
* -----------------------------------------------*/
@@ -861,7 +866,7 @@
public SequenceIterator iterate() throws XPathException {
return new SingleNodeIterator(this);
}
-
+
/* (non-Javadoc)
* @see org.exist.xquery.value.Sequence#unorderedIterator()
*/
@@ -879,14 +884,14 @@
return false;
return true;
}
-
+
/* (non-Javadoc)
* @see org.exist.dom.NodeSet#addAll(org.exist.dom.NodeSet)
*/
public void addAll(NodeSet other) {
throw new RuntimeException("Method not supported");
}
-
+
/**
* The method <code>isEmpty</code>
*
@@ -913,7 +918,7 @@
public boolean hasMany() {
return false;
}
-
+
/* (non-Javadoc)
* @see org.exist.dom.NodeSet#add(org.exist.dom.NodeProxy)
*/
@@ -927,30 +932,30 @@
public void add(Item item) throws XPathException {
throw new RuntimeException("Method not supported");
}
-
+
/* (non-Javadoc)
* @see org.exist.dom.NodeSet#add(org.exist.dom.NodeProxy, int)
*/
public void add(NodeProxy proxy, int sizeHint) {
throw new RuntimeException("Method not supported");
}
-
+
/* (non-Javadoc)
* @see org.exist.xquery.value.Sequence#addAll(org.exist.xquery.value.Sequence)
*/
public void addAll(Sequence other) throws XPathException {
throw new RuntimeException("Method not supported");
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.NodeList#getLength()
*/
public int getLength() {
//TODO : how to delegate to the real node implementation's getLength() ?
return 1;
- }
-
- //TODO : evaluate both semantics
+ }
+
+ //TODO : evaluate both semantics
public int getItemCount() {
return 1;
}
@@ -1029,7 +1034,7 @@
}
return null;
}
-
+
/* (non-Javadoc)
* @see org.exist.dom.NodeSet#getContextNodes(boolean)
*/
@@ -1049,21 +1054,21 @@
}
return result;
}
-
+
/* (non-Javadoc)
* @see org.exist.dom.NodeSet#getState()
*/
public int getState() {
return 1;
}
-
+
/* (non-Javadoc)
* @see org.exist.dom.NodeSet#hasChanged(int)
*/
public boolean hasChanged(int previousState) {
return false;
}
-
+
/* (non-Javadoc)
* @see org.exist.dom.NodeSet#getSizeHint(org.exist.dom.DocumentImpl)
*/
@@ -1073,7 +1078,7 @@
else
return Constants.NO_SIZE_HINT;
}
-
+
/* (non-Javadoc)
* @see org.exist.dom.NodeSet#getDocumentSet()
*/
@@ -1118,7 +1123,7 @@
else
return NodeSet.EMPTY_SET;
}
-
+
/* (non-Javadoc)
* @see org.exist.dom.NodeSet#deepIntersection(org.exist.dom.NodeSet)
*/
@@ -1130,7 +1135,7 @@
p.addMatches(this);
return p;
}
-
+
/* (non-Javadoc)
* @see org.exist.dom.NodeSet#union(org.exist.dom.NodeSet)
*/
@@ -1177,14 +1182,14 @@
*/
public boolean getProcessInReverseOrder() {
return false;
- }
-
+ }
+
/* (non-Javadoc)
* @see org.exist.dom.NodeSet#getParents(boolean)
- */
+ */
public NodeSet getParents(int contextId) {
NodeId pid = nodeId.getParentId();
- if (pid == null || pid == NodeId.DOCUMENT_NODE)
+ if (pid == null || pid == NodeId.DOCUMENT_NODE)
return NodeSet.EMPTY_SET;
NodeProxy parent = new NodeProxy(doc, pid, Node.ELEMENT_NODE);
if (contextId != Expression.NO_CONTEXT_ID)
@@ -1193,7 +1198,7 @@
parent.copyContext(this);
return parent;
}
-
+
/**
* The method <code>getAncestors</code>
*
@@ -1201,11 +1206,11 @@
* @param includeSelf a <code>boolean</code> value
* @return a <code>NodeSet</code> value
*/
- public NodeSet getAncestors(int contextId, boolean includeSelf) {
+ public NodeSet getAncestors(int contextId, boolean includeSelf) {
NodeSet ancestors = new ExtArrayNodeSet();
if (includeSelf)
ancestors.add(this);
- NodeId pid = nodeId.getParentId();
+ NodeId pid = nodeId.getParentId();
while(pid != null) {
NodeProxy parent = new NodeProxy(getDocument(), pid, Node.ELEMENT_NODE);
if (contextId != Expression.NO_CONTEXT_ID)
@@ -1213,60 +1218,60 @@
else
parent.copyContext(this);
ancestors.add(parent);
- pid = pid.getParentId();
+ pid = pid.getParentId();
}
- return ancestors;
- }
-
+ return ancestors;
+ }
+
/* (non-Javadoc)
* @see org.exist.dom.NodeSet#selectParentChild(org.exist.dom.NodeSet, int)
*/
public NodeSet selectParentChild(NodeSet al, int mode) {
return selectParentChild(al, mode, Expression.NO_CONTEXT_ID);
}
-
+
/* (non-Javadoc)
* @see org.exist.dom.NodeSet#selectParentChild(org.exist.dom.NodeSet, int, boolean)
*/
public NodeSet selectParentChild(NodeSet al, int mode, int contextId) {
return NodeSetHelper.selectParentChild(this, al, mode, contextId);
}
-
+
/* (non-Javadoc)
* @see org.exist.dom.NodeSet#selectAncestors(org.exist.dom.NodeSet, boolean, int)
*/
public NodeSet selectAncestors(NodeSet al, boolean includeSelf, int contextId) {
return NodeSetHelper.selectAncestors(this, al, includeSelf, contextId);
- }
-
+ }
+
/* (non-Javadoc)
* @see org.exist.dom.NodeSet#selectPrecedingSiblings(org.exist.dom.NodeSet, int)
*/
public NodeSet selectPrecedingSiblings(NodeSet siblings, int contextId) {
return NodeSetHelper.selectPrecedingSiblings(this, siblings, contextId);
}
-
+
/* (non-Javadoc)
* @see org.exist.dom.NodeSet#selectFollowingSiblings(org.exist.dom.NodeSet, int)
*/
public NodeSet selectFollowingSiblings(NodeSet siblings, int contextId) {
return NodeSetHelper.selectFollowingSiblings(this, siblings, contextId);
- }
-
+ }
+
/* (non-Javadoc)
* @see org.exist.dom.NodeSet#selectAncestorDescendant(org.exist.dom.NodeSet, int, boolean, int)
*/
public NodeSet selectAncestorDescendant(NodeSet al, int mode, boolean includeSelf, int contextId) {
return NodeSetHelper.selectAncestorDescendant(this, al, mode, includeSelf, contextId);
}
-
+
/* (non-Javadoc)
* @see org.exist.dom.NodeSet#selectFollowing(org.exist.dom.NodeSet)
*/
public NodeSet selectPreceding(NodeSet preceding) throws XPathException {
return NodeSetHelper.selectPreceding(this, preceding);
}
-
+
/**
* The method <code>selectFollowing</code>
*
@@ -1276,8 +1281,8 @@
*/
public NodeSet selectFollowing(NodeSet following) throws XPathException {
return NodeSetHelper.selectFollowing(this, following);
- }
-
+ }
+
/**
* The method <code>directSelectAttribute</code>
*
@@ -1341,8 +1346,8 @@
return "Document node for " + doc.getDocId();
else
return doc.getNode(nodeId).toString();
- }
-
+ }
+
private final static class SingleNodeIterator implements NodeSetIterator, SequenceIterator {
private boolean hasNext = true;
@@ -1357,7 +1362,7 @@
}
public Object next() {
- if (!hasNext)
+ if (!hasNext)
return null;
hasNext = false;
return node;
@@ -1366,8 +1371,8 @@
public NodeProxy peekNode() {
return node;
}
-
- public void remove() {
+
+ public void remove() {
throw new RuntimeException("Method not supported");
}
@@ -1378,7 +1383,7 @@
if (!hasNext)
return null;
hasNext = false;
- return node;
+ return node;
}
public void setPosition(NodeProxy proxy) {
Modified: trunk/eXist/src/org/exist/memtree/AttributeImpl.java
===================================================================
--- trunk/eXist/src/org/exist/memtree/AttributeImpl.java 2008-03-29 19:51:50 UTC (rev 7573)
+++ trunk/eXist/src/org/exist/memtree/AttributeImpl.java 2008-03-30 17:49:07 UTC (rev 7574)
@@ -24,6 +24,10 @@
import org.exist.dom.QName;
import org.exist.dom.QNameable;
+import org.exist.numbering.NodeId;
+import org.exist.xquery.NodeTest;
+import org.exist.xquery.XPathException;
+import org.exist.xquery.value.Sequence;
import org.exist.xquery.value.Type;
import org.w3c.dom.Attr;
import org.w3c.dom.DOMException;
@@ -33,7 +37,12 @@
public class AttributeImpl extends NodeImpl implements Attr, QNameable {
- /**
+ public static final int ATTR_CDATA_TYPE = 0;
+ public static final int ATTR_ID_TYPE = 1;
+ public static final int ATTR_IDREF_TYPE = 2;
+ public static final int ATTR_IDREFS_TYPE = 3;
+
+ /**
* @param doc
* @param nodeNumber
*/
@@ -41,7 +50,11 @@
super(doc, nodeNumber);
}
- public QName getQName() {
+ public NodeId getNodeId() {
+ return document.attrNodeId[nodeNumber];
+ }
+
+ public QName getQName() {
return (QName)document.namePool.get(document.attrName[nodeNumber]);
}
@@ -138,14 +151,28 @@
return (Element)document.getNode(document.attrParent[nodeNumber]);
}
- /* (non-Javadoc)
+ public void selectAttributes(NodeTest test, Sequence result) throws XPathException {
+ if (test.matches(this))
+ result.add(this);
+ }
+
+ public void selectDescendantAttributes(NodeTest test, Sequence result) throws XPathException {
+ if (test.matches(this))
+ result.add(this);
+ }
+
+ /* (non-Javadoc)
* @see org.w3c.dom.Node#getParentNode()
*/
public Node getParentNode() {
- return null;
+ return document.getNode(document.attrParent[nodeNumber]);
}
- /** ? @see org.w3c.dom.Attr#getSchemaTypeInfo()
+ public Node selectParentNode() {
+ return getParentNode();
+ }
+
+ /** ? @see org.w3c.dom.Attr#getSchemaTypeInfo()
*/
public TypeInfo getSchemaTypeInfo() {
// maybe TODO - new DOM interfaces - Java 5.0
@@ -155,8 +182,7 @@
/** ? @see org.w3c.dom.Attr#isId()
*/
public boolean isId() {
- // maybe TODO - new DOM interfaces - Java 5.0
- return false;
+ return document.attrType[nodeNumber] == ATTR_ID_TYPE;
}
public int getItemType() {
Modified: trunk/eXist/src/org/exist/memtree/DocumentImpl.java
===================================================================
--- trunk/eXist/src/org/exist/memtree/DocumentImpl.java 2008-03-29 19:51:50 UTC (rev 7573)
+++ trunk/eXist/src/org/exist/memtree/DocumentImpl.java 2008-03-30 17:49:07 UTC (rev 7574)
@@ -36,7 +36,21 @@
import org.exist.xquery.XQueryContext;
import org.exist.xquery.value.Sequence;
import org.exist.xquery.value.Type;
-import org.w3c.dom.*;
+import org.w3c.dom.Attr;
+import org.w3c.dom.CDATASection;
+import org.w3c.dom.Comment;
+import org.w3c.dom.DOMConfiguration;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.Document;
+import org.w3c.dom.DocumentFragment;
+import org.w3c.dom.DocumentType;
+import org.w3c.dom.Element;
+import org.w3c.dom.EntityReference;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.ProcessingInstruction;
+import org.w3c.dom.Text;
import org.xml.sax.SAXException;
import java.util.Arrays;
@@ -54,7 +68,7 @@
*/
public class DocumentImpl extends NodeImpl implements Document {
- protected XQueryContext context;
+ protected XQueryContext context;
protected NamePool namePool = new NamePool();
@@ -83,6 +97,8 @@
// attributes
protected int[] attrName;
+ protected int[] attrType;
+
protected NodeId[] attrNodeId;
protected int[] attrParent;
@@ -102,14 +118,14 @@
protected int size = 1;
protected int documentRootNode = -1;
-
+
protected String documentURI = null;
// reference nodes (link to an external, persistent document fragment)
protected NodeProxy references[];
protected int nextRef = 0;
-
+
private final static int NODE_SIZE = 128;
private final static int ATTR_SIZE = 64;
private final static int CHAR_BUF_SIZE = 1024;
@@ -136,6 +152,7 @@
attrName = new int[ATTR_SIZE];
attrParent = new int[ATTR_SIZE];
attrValue = new String[ATTR_SIZE];
+ attrType = new int[ATTR_SIZE];
attrNodeId = new NodeId[NODE_SIZE];
namespaceCode = new int[5];
@@ -243,7 +260,11 @@
addChars(nodeNr, ch);
}
- public int addAttribute(int nodeNr, QName qname, String value)
+ public boolean hasReferenceNodes() {
+ return references != null && references[0] != null;
+ }
+
+ public int addAttribute(int nodeNr, QName qname, String value, int type)
throws DOMException {
if (nodeKind == null) init();
if (nodeNr > 0 && nodeKind[nodeNr] != Node.ELEMENT_NODE)
@@ -262,6 +283,7 @@
attrParent[nextAttr] = nodeNr;
attrName[nextAttr] = namePool.add(qname);
attrValue[nextAttr] = value;
+ attrType[nextAttr] = type;
if (alpha[nodeNr] < 0) alpha[nodeNr] = nextAttr;
return nextAttr++;
}
@@ -284,7 +306,11 @@
public int getLastNode() {
return size - 1;
}
-
+
+ public DocumentImpl getDocument() {
+ return this;
+ }
+
public short getNodeType(int nodeNr) {
if (nodeKind == null || nodeNr < 0)
return -1;
@@ -341,6 +367,10 @@
System.arraycopy(attrValue, 0, newAttrValue, 0, size);
attrValue = newAttrValue;
+ int[] newAttrType = new int[newSize];
+ System.arraycopy(attrType, 0, newAttrType, 0, size);
+ attrType = newAttrType;
+
NodeId[] newNodeId = new NodeId[newSize];
System.arraycopy(attrNodeId, 0, newNodeId, 0, size);
attrNodeId = newNodeId;
@@ -413,6 +443,7 @@
return null;
return new AttributeImpl(this, nextAttr - 1);
}
+
/*
* (non-Javadoc)
*
@@ -556,6 +587,8 @@
}
public void selectDescendants(boolean includeSelf, NodeTest test, Sequence result) throws XPathException {
+ if (includeSelf && test.matches(this))
+ result.add(this);
if (size == 1) return;
NodeImpl next = (NodeImpl) getFirstChild();
while (next != null) {
@@ -566,6 +599,78 @@
}
}
+ public void selectDescendantAttributes(NodeTest test, Sequence result) throws XPathException {
+ if (size == 1) return;
+ NodeImpl next = (NodeImpl) getFirstChild();
+ while (next != null) {
+ if (test.matches(next))
+ result.add(next);
+ next.selectDescendantAttributes(test, result);
+ next = (NodeImpl) next.getNextSibling();
+ }
+ }
+
+ public NodeImpl selectById(String id) throws XPathException {
+ if (size == 1) return null;
+ ElementImpl root = (ElementImpl) getDocumentElement();
+ if (hasIdAttribute(root.getNodeNumber(), id))
+ return root;
+ int treeLevel = this.treeLevel[root.getNodeNumber()];
+ int nextNode = root.getNodeNumber();
+ while (++nextNode < document.size && document.treeLevel[nextNode] > treeLevel) {
+ if (document.nodeKind[nextNode] == Node.ELEMENT_NODE &&
+ hasIdAttribute(nextNode, id))
+ return getNode(nextNode);
+ }
+ return null;
+ }
+
+ public NodeImpl selectByIdref(String id) throws XPathException {
+ if (size == 1) return null;
+ ElementImpl root = (ElementImpl) getDocumentElement();
+ AttributeImpl attr = getIdrefAttribute(root.getNodeNumber(), id);
+ if (attr != null)
+ return attr;
+ int treeLevel = this.treeLevel[root.getNodeNumber()];
+ int nextNode = root.getNodeNumber();
+ while (++nextNode < document.size && document.treeLevel[nextNode] > treeLevel) {
+ if (document.nodeKind[nextNode] == Node.ELEMENT_NODE) {
+ attr = getIdrefAttribute(nextNode, id);
+ if (attr != null)
+ return attr;
+ }
+ }
+ return null;
+ }
+
+ private boolean hasIdAttribute(int nodeNumber, String id) {
+ int attr = document.alpha[nodeNumber];
+ if (-1 < attr) {
+ while (attr < document.nextAttr
+ && document.attrParent[attr] == nodeNumber) {
+ if (document.attrType[attr] == AttributeImpl.ATTR_ID_TYPE &&
+ id.equals(document.attrValue[attr]))
+ return true;
+ ++attr;
+ }
+ }
+ return false;
+ }
+
+ private AttributeImpl getIdrefAttribute(int nodeNumber, String id) {
+ int attr = document.alpha[nodeNumber];
+ if (-1 < attr) {
+ while (attr < document.nextAttr
+ && document.attrParent[attr] == nodeNumber) {
+ if (document.attrType[attr] == AttributeImpl.ATTR_IDREF_TYPE &&
+ id.equals(document.attrValue[attr]))
+ return new AttributeImpl(this, attr);
+ ++attr;
+ }
+ }
+ return null;
+ }
+
/*
* (non-Javadoc)
*
@@ -852,6 +957,8 @@
* reference nodes.
*/
public void expand() throws DOMException {
+ if (size == 0)
+ return;
DocumentImpl newDoc = expandRefs(null);
copyDocContents(newDoc);
}
Modified: trunk/eXist/src/org/exist/memtree/ElementImpl.java
===================================================================
--- trunk/eXist/src/org/exist/memtree/ElementImpl.java 2008-03-29 19:51:50 UTC (rev 7573)
+++ trunk/eXist/src/org/exist/memtree/ElementImpl.java 2008-03-30 17:49:07 UTC (rev 7574)
@@ -30,7 +30,13 @@
import org.exist.xquery.XPathException;
import org.exist.xquery.value.Sequence;
import org.exist.xquery.value.Type;
-import org.w3c.dom.*;
+import org.w3c.dom.Attr;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.TypeInfo;
import java.util.HashMap;
import java.util.HashSet;
@@ -256,6 +262,18 @@
}
}
+ public void selectDescendantAttributes(NodeTest test, Sequence result) throws XPathException {
+ int treeLevel = document.treeLevel[nodeNumber];
+ int nextNode = nodeNumber;
+ NodeImpl n = document.getNode(nextNode);
+ n.selectAttributes(test, result);
+ while (++nextNode < document.size && document.treeLevel[nextNode] > treeLevel) {
+ n = document.getNode(nextNode);
+ if (n.getNodeType() == Node.ELEMENT_NODE)
+ n.selectAttributes(test, result);
+ }
+ }
+
public void selectChildren(NodeTest test, Sequence result) throws XPathException {
int nextNode = document.getFirstChildFor(nodeNumber);
while (nextNode > nodeNumber) {
@@ -266,6 +284,21 @@
}
}
+ public void selectDescendants(boolean includeSelf, NodeTest test, Sequence result) throws XPathException {
+ int treeLevel = document.treeLevel[nodeNumber];
+ int nextNode = nodeNumber;
+ if (includeSelf) {
+ NodeImpl n = document.getNode(nextNode);
+ if (test.matches(n))
+ result.add(n);
+ }
+ while (++nextNode < document.size && document.treeLevel[nextNode] > treeLevel) {
+ NodeImpl n = document.getNode(nextNode);
+ if (test.matches(n))
+ result.add(n);
+ }
+ }
+
/* (non-Javadoc)
* @see org.w3c.dom.Element#getElementsByTagName(java.lang.String)
*/
Modified: trunk/eXist/src/org/exist/memtree/InMemoryNodeSet.java
===================================================================
--- trunk/eXist/src/org/exist/memtree/InMemoryNodeSet.java 2008-03-29 19:51:50 UTC (rev 7573)
+++ trunk/eXist/src/org/exist/memtree/InMemoryNodeSet.java 2008-03-30 17:49:07 UTC (rev 7574)
@@ -13,6 +13,8 @@
*/
public class InMemoryNodeSet extends ValueSequence {
+ public final static InMemoryNodeSet EMPTY = new InMemoryNodeSet(0);
+
public InMemoryNodeSet() {
super();
}
@@ -43,6 +45,15 @@
return nodes;
}
+ public Sequence getDescendantAttributes(NodeTest test) throws XPathException {
+ InMemoryNodeSet nodes = new InMemoryNodeSet();
+ for (int i = 0; i <= size; i++) {
+ NodeImpl node = (NodeImpl) values[i];
+ node.selectDescendantAttributes(test, nodes);
+ }
+ return nodes;
+ }
+
public Sequence getChildren(NodeTest test) throws XPathException {
InMemoryNodeSet nodes = new InMemoryNodeSet();
for (int i = 0; i <= size; i++) {
@@ -51,4 +62,61 @@
}
return nodes;
}
+
+ public Sequence getDescendants(boolean includeSelf, NodeTest test) throws XPathException {
+ InMemoryNodeSet nodes = new InMemoryNodeSet();
+ for (int i = 0; i <= size; i++) {
+ NodeImpl node = (NodeImpl) values[i];
+ node.selectDescendants(includeSelf, test, nodes);
+ }
+ return nodes;
+ }
+
+ public Sequence getAncestors(boolean includeSelf, NodeTest test) throws XPathException {
+ InMemoryNodeSet nodes = new InMemoryNodeSet();
+ for (int i = 0; i <= size; i++) {
+ NodeImpl node = (NodeImpl) values[i];
+ node.selectAncestors(includeSelf, test, nodes);
+ }
+ return nodes;
+ }
+
+ public Sequence getParents(NodeTest test) throws XPathException {
+ InMemoryNodeSet nodes = new InMemoryNodeSet();
+ for (int i = 0; i <= size; i++) {
+ NodeImpl node = (NodeImpl) values[i];
+ NodeImpl parent = (NodeImpl) node.selectParentNode();
+ if (parent != null && test.matches(parent))
+ nodes.add(parent);
+ }
+ return nodes;
+ }
+
+ public Sequence getSelf(NodeTest test) throws XPathException {
+ InMemoryNodeSet nodes = new InMemoryNodeSet();
+ for (int i = 0; i <= size; i++) {
+ NodeImpl node = (NodeImpl) values[i];
+ if (test.matches(node))
+ nodes.add(node);
+ }
+ return nodes;
+ }
+
+ public Sequence getPrecedingSiblings(NodeTest test) throws XPathException {
+ InMemoryNodeSet nodes = new InMemoryNodeSet();
+ for (int i = 0; i <= size; i++) {
+ NodeImpl node = (NodeImpl) values[i];
+ node.selectPrecedingSiblings(test, nodes);
+ }
+ return nodes;
+ }
+
+ public Sequence getFollowingSiblings(NodeTest test) throws XPathException {
+ InMemoryNodeSet nodes = new InMemoryNodeSet();
+ for (int i = 0; i <= size; i++) {
+ NodeImpl node = (NodeImpl) values[i];
+ node.selectFollowingSiblings(test, nodes);
+ }
+ return nodes;
+ }
}
Modified: trunk/eXist/src/org/exist/memtree/MemTreeBuilder.java
===================================================================
--- trunk/eXist/src/org/exist/memtree/MemTreeBuilder.java 2008-03-29 19:51:50 UTC (rev 7573)
+++ trunk/eXist/src/org/exist/memtree/MemTreeBuilder.java 2008-03-30 17:49:07 UTC (rev 7574)
@@ -22,6 +22,8 @@
*/
package org.exist.memtree;
+import org.exist.Indexer;
+import org.exist.Namespaces;
import org.exist.dom.NodeProxy;
import org.exist.dom.QName;
import org.exist.xquery.Constants;
@@ -114,14 +116,15 @@
String attrNS = attributes.getURI(i);
String attrLocalName = attributes.getLocalName(i);
String attrQName = attributes.getQName(i);
- // skip xmlns-attributes and attributes in eXist's namespace
+ // skip xmlns-attributes and attributes in eXist's namespace
if (!(attrQName.startsWith("xmlns"))) {
// || attrNS.equals(Namespaces.EXIST_NS))) {
int p = attrQName.indexOf(':');
String attrPrefix = (p != Constants.STRING_NOT_FOUND) ? attrQName.substring(0, p) : null;
QName attrQn = new QName(attrLocalName, attrNS, attrPrefix);
- doc.addAttribute(nodeNr, attrQn, attributes.getValue(i));
- }
+ int type = getAttribType(attrQn, attributes.getType(i));
+ doc.addAttribute(nodeNr, attrQn, attributes.getValue(i), type);
+ }
}
}
// update links
@@ -139,7 +142,22 @@
return nodeNr;
}
- /**
+ private int getAttribType(QName qname, String type) {
+ if (qname.equalsSimple(Namespaces.XML_ID_QNAME)) {
+ // an xml:id attribute.
+ return AttributeImpl.ATTR_CDATA_TYPE;
+ }
+ if (type.equals(Indexer.ATTR_ID_TYPE))
+ return AttributeImpl.ATTR_ID_TYPE;
+ else if (type.equals(Indexer.ATTR_IDREF_TYPE))
+ return AttributeImpl.ATTR_IDREF_TYPE;
+ else if (type.equals(Indexer.ATTR_IDREFS_TYPE))
+ return AttributeImpl.ATTR_IDREFS_TYPE;
+ else
+ return AttributeImpl.ATTR_CDATA_TYPE;
+ }
+
+ /**
* Close the last element created.
*/
public void endElement() {
@@ -183,7 +201,7 @@
//} else {
//lastNode = doc.addAttribute(lastNode, qname, value);
//}
- int nodeNr = doc.addAttribute(lastNode, qname, value);
+ int nodeNr = doc.addAttribute(lastNode, qname, value, AttributeImpl.ATTR_CDATA_TYPE);
//TODO :
//1) call linkNode(nodeNr); ?
//2) is there a relationship between lastNode and nodeNr ?
Modified: trunk/eXist/src/org/exist/memtree/NodeImpl.java
===================================================================
--- trunk/eXist/src/org/exist/memtree/NodeImpl.java 2008-03-29 19:51:50 UTC (rev 7573)
+++ trunk/eXist/src/org/exist/memtree/NodeImpl.java 2008-03-30 17:49:07 UTC (rev 7574)
@@ -22,7 +22,12 @@
*/
package org.exist.memtree;
-import org.exist.dom.*;
+import org.exist.dom.DocumentSet;
+import org.exist.dom.EmptyNodeSet;
+import org.exist.dom.NodeSet;
+import org.exist.dom.QName;
+import org.exist.dom.QNameable;
+import org.exist.dom.StoredNode;
import org.exist.numbering.NodeId;
import org.exist.storage.DBBroker;
import org.exist.storage.serializers.Serializer;
@@ -33,8 +38,22 @@
import org.exist.xquery.Constants;
import org.exist.xquery.NodeTest;
import org.exist.xquery.XPathException;
-import org.exist.xquery.value.*;
-import org.w3c.dom.*;
+import org.exist.xquery.value.AtomicValue;
+import org.exist.xquery.value.Item;
+import org.exist.xquery.value.MemoryNodeSet;
+import org.exist.xquery.value.NodeValue;
+import org.exist.xquery.value.Sequence;
+import org.exist.xquery.value.SequenceIterator;
+import org.exist.xquery.value.StringValue;
+import org.exist.xquery.value.Type;
+import org.exist.xquery.value.UntypedAtomicValue;
+import org.exist.xquery.value.ValueSequence;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Document;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.UserDataHandler;
import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;
import org.xml.sax.ext.LexicalHandler;
@@ -188,6 +207,19 @@
return document.getNode(next);
}
+ public Node selectParentNode() {
+ // as getParentNode() but doesn't return the document itself
+ if (nodeNumber == 0)
+ return null;
+ int next = document.next[nodeNumber];
+ while (next > nodeNumber) {
+ next = document.next[next];
+ }
+ if (next <= 0)
+ return null;
+ return document.getNode(next);
+ }
+
public void addContextNode(int contextId, NodeValue node) {
throw new RuntimeException("Can not call addContextNode() on node type " + this.getNodeType());
}
@@ -198,7 +230,8 @@
public boolean equals(Object obj) {
if(!(obj instanceof NodeImpl))
return false;
- return nodeNumber == ((NodeImpl) obj).nodeNumber;
+ NodeImpl o = (NodeImpl) obj;
+ return document == o.document && nodeNumber == o.nodeNumber;
}
/* (non-Javadoc)
@@ -207,7 +240,8 @@
public boolean equals(NodeValue other) throws XPathException {
if (other.getImplementationType() != NodeValue.IN_MEMORY_NODE)
return false;
- return nodeNumber == ((NodeImpl) other).nodeNumber;
+ NodeImpl o = (NodeImpl) other;
+ return document == o.document && nodeNumber == o.nodeNumber;
}
/* (non-Javadoc)
@@ -576,8 +610,8 @@
return seq.toNodeSet();
}
- public InMemoryNodeSet toMemNodeSet() throws XPathException {
- return new InMemoryNodeSet(this);
+ public MemoryNodeSet toMemNodeSet() throws XPathException {
+ return new ValueSequence(this).toMemNodeSet();
}
private final static class SingleNodeIterator implements SequenceIterator {
@@ -734,12 +768,17 @@
// do nothing
}
+ public void selectDescendantAttributes(NodeTest test, Sequence result) throws XPathException {
+ // do nothing
+ }
+
public void selectChildren(NodeTest test, Sequence result) throws XPathException {
// do nothing
}
public void selectDescendants(boolean includeSelf, NodeTest test, Sequence result) throws XPathException {
- // do nothing
+ if (includeSelf && test.matches(this))
+ result.add(this);
}
public void selectAncestors(boolean includeSelf, NodeTest test, Sequence result) throws XPathException {
@@ -770,6 +809,14 @@
}
}
+ public void selectPreceding(NodeTest test, Sequence result) throws XPathException {
+ for (int i = nodeNumber - 1; i > 0; i--) {
+ NodeImpl n = document.getNode(i);
+ if (test.matches(n))
+ result.add(n);
+ }
+ }
+
public void selectFollowingSiblings(NodeTest test, Sequence result) throws XPathException {
int parent = document.getParentNodeFor(nodeNumber);
if (parent == 0) {
@@ -795,6 +842,31 @@
}
}
+ public void selectFollowing(NodeTest test, Sequence result) throws XPathException {
+ int parent = document.getParentNodeFor(nodeNumber);
+ if (parent == 0) {
+ // parent is the document node
+ if (getNodeType() == Node.ELEMENT_NODE)
+ return;
+ NodeImpl next = (NodeImpl) getNextSibling();
+ while (next != null) {
+ if (test.matches(next))
+ next.selectDescendants(true, test, result);
+ if (next.getNodeType() == Node.ELEMENT_NODE)
+ break;
+ next = (NodeImpl) next.getNextSibling();
+ }
+ } else {
+ int nextNode = document.getFirstChildFor(parent);
+ while (nextNode < document.size) {
+ NodeImpl n = document.getNode(nextNode);
+ if (nextNode > nodeNumber && test.matches(n))
+ result.add(n);
+ nextNode++;
+ }
+ }
+ }
+
/** ? @see org.w3c.dom.Node#compareDocumentPosition(org.w3c.dom.Node)
*/
public short compareDocumentPosition(Node other) throws DOMException {
Modified: trunk/eXist/src/org/exist/memtree/SAXAdapter.java
===================================================================
--- trunk/eXist/src/org/exist/memtree/SAXAdapter.java 2008-03-29 19:51:50 UTC (rev 7573)
+++ trunk/eXist/src/org/exist/memtree/SAXAdapter.java 2008-03-30 17:49:07 UTC (rev 7574)
@@ -22,10 +22,6 @@
*/
package org.exist.memtree;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
import org.exist.xquery.XQueryContext;
import org.w3c.dom.Document;
import org.xml.sax.Attributes;
@@ -34,6 +30,10 @@
import org.xml.sax.SAXException;
import org.xml.sax.ext.LexicalHandler;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
/**
* Adapter class to build an internal, in-memory DOM from a SAX stream.
*
@@ -81,7 +81,8 @@
* @see org.xml.sax.ContentHandler#ignorableWhitespace(char[], int, int)
*/
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
- }
+ builder.characters(ch, start, length);
+ }
/* (non-Javadoc)
* @see org.xml.sax.ContentHandler#endPrefixMapping(java.lang.String)
@@ -140,7 +141,7 @@
if(atts.getQName(i).startsWith("xmlns")) {
String prefix = atts.getLocalName(i);
String uri = atts.getValue(i);
- if(!namespaces.containsKey(prefix))
+ if(!namespaces.containsKey(prefix))
builder.namespaceNode(prefix, uri);
}
}
Modified: trunk/eXist/src/org/exist/validation/Validator.java
===================================================================
--- trunk/eXist/src/org/exist/validation/Validator.java 2008-03-29 19:51:50 UTC (rev 7573)
+++ trunk/eXist/src/org/exist/validation/Validator.java 2008-03-30 17:49:07 UTC (rev 7574)
@@ -26,30 +26,26 @@
import com.thaiopensource.validate.ValidateProperty;
import com.thaiopensource.validate.ValidationDriver;
import com.thaiopensource.validate.rng.CompactSchemaReader;
-
-import java.io.InputStream;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-
import org.apache.log4j.Logger;
-
import org.exist.Namespaces;
import org.exist.storage.BrokerPool;
import org.exist.storage.io.ExistIOException;
import org.exist.util.Configuration;
import org.exist.util.XMLReaderObjectFactory;
-import org.exist.validation.resolver.SearchResourceResolver;
import org.exist.validation.resolver.AnyUriResolver;
+import org.exist.validation.resolver.SearchResourceResolver;
import org.exist.validation.resolver.eXistXMLCatalogResolver;
-
import org.xml.sax.ContentHandler;
import org.xml.sax.ErrorHandler;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import java.io.InputStream;
+
/**
* Validate XML documents with their grammars (DTD's and Schemas).
*
Modified: trunk/eXist/src/org/exist/xqj/XQItem.java
===================================================================
--- trunk/eXist/src/org/exist/xqj/XQItem.java 2008-03-29 19:51:50 UTC (rev 7573)
+++ trunk/eXist/src/org/exist/xqj/XQItem.java 2008-03-30 17:49:07 UTC (rev 7574)
@@ -3,18 +3,6 @@
*/
package org.exist.xqj;
-import java.io.OutputStream;
-import java.io.Writer;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Properties;
-
-import javax.xml.xquery.XQCommonHandler;
-import javax.xml.xquery.XQException;
-import javax.xml.xquery.XQItemType;
-
import org.exist.dom.QName;
import org.exist.xquery.XPathException;
import org.exist.xquery.value.BooleanValue;
@@ -28,6 +16,17 @@
import org.w3c.dom.Node;
import org.xml.sax.ContentHandler;
+import javax.xml.xquery.XQCommonHandler;
+import javax.xml.xquery.XQException;
+import javax.xml.xquery.XQItemType;
+import java.io.OutputStream;
+import java.io.Writer;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.Properties;
+
/**
* @author Adam Retter <ada...@de...>
*
Modified: trunk/eXist/src/org/exist/xquery/AnyNodeTest.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/AnyNodeTest.java 2008-03-29 19:51:50 UTC (rev 7573)
+++ trunk/eXist/src/org/exist/xquery/AnyNodeTest.java 2008-03-30 17:49:07 UTC (rev 7574)
@@ -53,7 +53,7 @@
* @see org.exist.xquery.NodeTest#matches(org.w3c.dom.Node)
*/
public boolean matches(Node node) {
- return (node.getNodeType() != Node.ATTRIBUTE_NODE);
+ return (node.getNodeType() != Node.ATTRIBUTE_NODE);
}
/* (non-Javadoc)
Modified: trunk/eXist/src/org/exist/xquery/BindingExpression.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/BindingExpression.java 2008-03-29 19:51:50 UTC (rev 7573)
+++ trunk/eXist/src/org/exist/xquery/BindingExpression.java 2008-03-30 17:49:07 UTC (rev 7574)
@@ -23,10 +23,24 @@
package org.exist.xquery;
import org.apache.log4j.Logger;
-import org.exist.dom.*;
+import org.exist.dom.ContextItem;
+import org.exist.dom.DocumentImpl;
+import org.exist.dom.DocumentSet;
+import org.exist.dom.ExtArrayNodeSet;
+import org.exist.dom.NodeProxy;
+import org.exist.dom.NodeSet;
+import org.exist.dom.StoredNode;
+import org.exist.dom.VirtualNodeSet;
import org.exist.numbering.NodeId;
import org.exist.storage.UpdateListener;
-import org.exist.xquery.value.*;
+import org.exist.xquery.value.BooleanValue;
+import org.exist.xquery.value.GroupedValueSequenceTable;
+import org.exist.xquery.value.Item;
+import org.exist.xquery.value.Sequence;
+import org.exist.xquery.value.SequenceIterator;
+import org.exist.xquery.value.SequenceType;
+import org.exist.xquery.value.Type;
+import org.exist.xquery.value.ValueSequence;
import java.util.Iterator;
@@ -154,7 +168,8 @@
protected Sequence applyWhereExpression(Sequence contextSequence) throws XPathException {
if (contextSequence != null &&
Type.subTypeOf(contextSequence.getItemType(), Type.NODE) &&
- //We might not be sure of the return type at this level
+ contextSequence.isPersistentSet() &&
+ //We might not be sure of the return type at this level
Type.subTypeOf(whereExpr.returnsType(), Type.ITEM)) {
Sequence seq = whereExpr.eval(contextSequence);
//But *now*, we are ;-)
Modified: trunk/eXist/src/org/exist/xquery/DeferredFunctionCall.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/DeferredFunctionCall.java 2008-03-29 19:51:50 UTC (rev 7573)
+++ trunk/eXist/src/org/exist/xquery/DeferredFunctionCall.java 2008-03-30 17:49:07 UTC (rev 7574)
@@ -21,8 +21,6 @@
*/
package org.exist.xquery;
-import java.util.Iterator;
-
import org.apache.log4j.Logger;
import org.exist.dom.DocumentSet;
import org.exist.dom.NodeSet;
@@ -30,10 +28,13 @@
import org.exist.numbering.NodeId;
import org.exist.xquery.value.AtomicValue;
import org.exist.xquery.value.Item;
+import org.exist.xquery.value.MemoryNodeSet;
import org.exist.xquery.value.Sequence;
import org.exist.xquery.value.SequenceIterator;
import org.exist.xquery.value.Type;
+import java.util.Iterator;
+
public abstract class DeferredFunctionCall implements Sequence {
private final static Logger LOG = Logger.getLogger(DeferredFunctionCall.class);
@@ -244,6 +245,11 @@
return sequence.toNodeSet();
}
+ public MemoryNodeSet toMemNodeSet() throws XPathException {
+ realize();
+ return sequence.toMemNodeSet();
+ }
+
public SequenceIterator unorderedIterator() {
try {
realize();
Modified: trunk/eXist/src/org/exist/xquery/ForExpr.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/ForExpr.java 2008-03-29 19:51:50 UTC (rev 7573)
+++ trunk/eXist/src/org/exist/xquery/ForExpr.java 2008-03-30 17:49:07 UTC (rev 7574)
@@ -26,7 +26,16 @@
import org.exist.dom.NodeSet;
import org.exist.dom.QName;
import org.exist.xquery.util.ExpressionDumper;
-import org.exist.xquery.value.*;
+import org.exist.xquery.value.GroupedValueSequence;
+import org.exist.xquery.value.GroupedValueSequenceTable;
+import org.exist.xquery.value.IntegerValue;
+import org.exist.xquery.value.Item;
+import org.exist.xquery.value.OrderedValueSequence;
+import org.exist.xquery.value.PreorderedValueSequence;
+import org.exist.xquery.value.Sequence;
+import org.exist.xquery.value.SequenceIterator;
+import org.exist.xquery.value.Type;
+import org.exist.xquery.value.ValueSequence;
import java.util.Iterator;
@@ -211,7 +220,8 @@
boolean fastExec =
whereExpr != null && at == null &&
!Dependency.dependsOn(whereExpr, Dependency.CONTEXT_ITEM) &&
- Type.subTypeOf(in.getItemType(), Type.NODE);
+ in.isPersistentSet() &&
+ Type.subTypeOf(in.getItemType(), Type.NODE);
// If possible, apply the where expression ahead of the iterati...
[truncated message content] |
|
From: <wol...@us...> - 2008-03-29 19:51:52
|
Revision: 7573
http://exist.svn.sourceforge.net/exist/?rev=7573&view=rev
Author: wolfgang_m
Date: 2008-03-29 12:51:50 -0700 (Sat, 29 Mar 2008)
Log Message:
-----------
[bugfix] show error if an attribute is added to an element after other child nodes. Port of rev 7563.
Revision Links:
--------------
http://exist.svn.sourceforge.net/exist/?rev=7563&view=rev
Modified Paths:
--------------
branches/eXist-stable-1.2/src/org/exist/memtree/DocumentBuilderReceiver.java
branches/eXist-stable-1.2/src/org/exist/memtree/DocumentImpl.java
Modified: branches/eXist-stable-1.2/src/org/exist/memtree/DocumentBuilderReceiver.java
===================================================================
--- branches/eXist-stable-1.2/src/org/exist/memtree/DocumentBuilderReceiver.java 2008-03-29 19:50:51 UTC (rev 7572)
+++ branches/eXist-stable-1.2/src/org/exist/memtree/DocumentBuilderReceiver.java 2008-03-29 19:51:50 UTC (rev 7573)
@@ -149,7 +149,7 @@
try {
builder.addAttribute(qname, value);
} catch (DOMException e) {
- throw new SAXException("Error XQDY0025: element has more than one attribute '" + qname + "'");
+ throw new SAXException(e.getMessage());
}
}
Modified: branches/eXist-stable-1.2/src/org/exist/memtree/DocumentImpl.java
===================================================================
--- branches/eXist-stable-1.2/src/org/exist/memtree/DocumentImpl.java 2008-03-29 19:50:51 UTC (rev 7572)
+++ branches/eXist-stable-1.2/src/org/exist/memtree/DocumentImpl.java 2008-03-29 19:51:50 UTC (rev 7573)
@@ -257,6 +257,9 @@
public int addAttribute(int nodeNr, QName qname, String value)
throws DOMException {
if (nodeKind == null) init();
+ if (nodeNr > 0 && nodeKind[nodeNr] != Node.ELEMENT_NODE)
+ throw new DOMException(DOMException.INUSE_ATTRIBUTE_ERR,
+ "XQTY0024: An attribute node cannot follow a node that is not an attribute node.");
int prevAttr = nextAttr - 1;
// check if an attribute with the same qname exists in the parent element
while (nodeNr > 0 && prevAttr > -1 && attrParent[prevAttr] == nodeNr) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2008-03-29 19:50:52
|
Revision: 7572
http://exist.svn.sourceforge.net/exist/?rev=7572&view=rev
Author: wolfgang_m
Date: 2008-03-29 12:50:51 -0700 (Sat, 29 Mar 2008)
Log Message:
-----------
[bugfix] added missing support for Node.getPreviousSibling() to in-memory DOM. Port of rev 7562.
Revision Links:
--------------
http://exist.svn.sourceforge.net/exist/?rev=7562&view=rev
Modified Paths:
--------------
branches/eXist-stable-1.2/src/org/exist/memtree/NodeImpl.java
Modified: branches/eXist-stable-1.2/src/org/exist/memtree/NodeImpl.java
===================================================================
--- branches/eXist-stable-1.2/src/org/exist/memtree/NodeImpl.java 2008-03-29 19:48:17 UTC (rev 7571)
+++ branches/eXist-stable-1.2/src/org/exist/memtree/NodeImpl.java 2008-03-29 19:50:51 UTC (rev 7572)
@@ -59,6 +59,9 @@
import org.xml.sax.SAXException;
import org.xml.sax.ext.LexicalHandler;
+import java.util.Iterator;
+import java.util.Properties;
+
public class NodeImpl implements Node, NodeValue, QNameable, Comparable {
public final static short REFERENCE_NODE = 100;
@@ -282,9 +285,18 @@
* @see org.w3c.dom.Node#getPreviousSibling()
*/
public Node getPreviousSibling() {
- //TODO : we have a getNextSibling() method !
- throw new RuntimeException("Can not call getPreviousSibling() on node type " + this.getNodeType());
- }
+ if (nodeNumber == 0)
+ return null;
+ int parent = document.getParentNodeFor(nodeNumber);
+ int nextNode = document.getFirstChildFor(parent);
+ while (nextNode >= parent && nextNode < nodeNumber) {
+ int following = document.next[nextNode];
+ if (following == nodeNumber)
+ return document.getNode(nextNode);
+ nextNode = following;
+ }
+ return null;
+ }
/* (non-Javadoc)
* @see org.w3c.dom.Node#getNextSibling()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2008-03-29 19:48:19
|
Revision: 7571
http://exist.svn.sourceforge.net/exist/?rev=7571&view=rev
Author: wolfgang_m
Date: 2008-03-29 12:48:17 -0700 (Sat, 29 Mar 2008)
Log Message:
-----------
[bugfix] an attribute may not be added to an element after an atomic value. See XQTS test Constr-cont-attr-1. Port of rev 7561.
Revision Links:
--------------
http://exist.svn.sourceforge.net/exist/?rev=7561&view=rev
Modified Paths:
--------------
branches/eXist-stable-1.2/src/org/exist/xquery/EnclosedExpr.java
Modified: branches/eXist-stable-1.2/src/org/exist/xquery/EnclosedExpr.java
===================================================================
--- branches/eXist-stable-1.2/src/org/exist/xquery/EnclosedExpr.java 2008-03-29 19:46:17 UTC (rev 7570)
+++ branches/eXist-stable-1.2/src/org/exist/xquery/EnclosedExpr.java 2008-03-29 19:48:17 UTC (rev 7571)
@@ -86,8 +86,9 @@
else if (buf.length() > 0)
buf.append(' ');
buf.append(next.getStringValue());
- next = i.nextItem();
- // if item is a node, flush any collected character data and
+ allowAttribs = false;
+ next = i.nextItem();
+ // if item is a node, flush any collected character data and
// copy the node to the target doc.
} else if (Type.subTypeOf(next.getType(), Type.NODE)) {
if (buf != null && buf.length() > 0) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2008-03-29 19:46:25
|
Revision: 7570
http://exist.svn.sourceforge.net/exist/?rev=7570&view=rev
Author: wolfgang_m
Date: 2008-03-29 12:46:17 -0700 (Sat, 29 Mar 2008)
Log Message:
-----------
[bugfix] a dynamically constructed text node with empty content does not count as a node. See XQTS test Constr-text-count-5. Port of rev 7560.
Revision Links:
--------------
http://exist.svn.sourceforge.net/exist/?rev=7560&view=rev
Modified Paths:
--------------
branches/eXist-stable-1.2/src/org/exist/xquery/DynamicTextConstructor.java
Modified: branches/eXist-stable-1.2/src/org/exist/xquery/DynamicTextConstructor.java
===================================================================
--- branches/eXist-stable-1.2/src/org/exist/xquery/DynamicTextConstructor.java 2008-03-29 19:43:43 UTC (rev 7569)
+++ branches/eXist-stable-1.2/src/org/exist/xquery/DynamicTextConstructor.java 2008-03-29 19:46:17 UTC (rev 7570)
@@ -22,7 +22,6 @@
*/
package org.exist.xquery;
-import org.exist.memtree.DocumentImpl;
import org.exist.memtree.MemTreeBuilder;
import org.exist.xquery.util.ExpressionDumper;
import org.exist.xquery.value.Item;
@@ -91,8 +90,12 @@
buf.append(' ');
buf.append(next.toString());
}
- int nodeNr = builder.characters(buf);
- result = ((DocumentImpl)builder.getDocument()).getNode(nodeNr);
+ if (buf.length() == 0)
+ result = Sequence.EMPTY_SEQUENCE;
+ else {
+ int nodeNr = builder.characters(buf);
+ result = builder.getDocument().getNode(nodeNr);
+ }
}
if (context.getProfiler().isEnabled())
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2008-03-29 19:43:46
|
Revision: 7569
http://exist.svn.sourceforge.net/exist/?rev=7569&view=rev
Author: wolfgang_m
Date: 2008-03-29 12:43:43 -0700 (Sat, 29 Mar 2008)
Log Message:
-----------
[bugfix] show error if an attribute is added to an element after other child nodes: element elem {element a {}, $input-context//west/@mark}. Port of rev 7559.
Revision Links:
--------------
http://exist.svn.sourceforge.net/exist/?rev=7559&view=rev
Modified Paths:
--------------
branches/eXist-stable-1.2/src/org/exist/xquery/EnclosedExpr.java
Modified: branches/eXist-stable-1.2/src/org/exist/xquery/EnclosedExpr.java
===================================================================
--- branches/eXist-stable-1.2/src/org/exist/xquery/EnclosedExpr.java 2008-03-29 19:36:41 UTC (rev 7568)
+++ branches/eXist-stable-1.2/src/org/exist/xquery/EnclosedExpr.java 2008-03-29 19:43:43 UTC (rev 7569)
@@ -75,7 +75,8 @@
SequenceIterator i = result.iterate();
Item next = i.nextItem();
StringBuffer buf = null;
- while (next != null) {
+ boolean allowAttribs = true;
+ while (next != null) {
context.proceed(this, builder);
// if item is an atomic value, collect the string values of all
// following atomic values and seperate them by a space.
@@ -89,12 +90,16 @@
// if item is a node, flush any collected character data and
// copy the node to the target doc.
} else if (Type.subTypeOf(next.getType(), Type.NODE)) {
- if (buf != null && buf.length() > 0) {
+ if (buf != null && buf.length() > 0) {
receiver.characters(buf);
buf.setLength(0);
}
- next.copyTo(context.getBroker(), receiver);
- next = i.nextItem();
+ if (next.getType() == Type.ATTRIBUTE && !allowAttribs)
+ throw new XPathException(getASTNode(), "XQTY0024: An attribute may not appear after " +
+ "another child node.");
+ next.copyTo(context.getBroker(), receiver);
+ allowAttribs = next.getType() == Type.ATTRIBUTE;
+ next = i.nextItem();
}
}
// flush remaining character data
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2008-03-29 19:36:44
|
Revision: 7568
http://exist.svn.sourceforge.net/exist/?rev=7568&view=rev
Author: wolfgang_m
Date: 2008-03-29 12:36:41 -0700 (Sat, 29 Mar 2008)
Log Message:
-----------
[bugfix] show error if an attribute is added to an element after other child nodes. Port of rev 7563.
Revision Links:
--------------
http://exist.svn.sourceforge.net/exist/?rev=7563&view=rev
Modified Paths:
--------------
trunk/eXist/src/org/exist/memtree/DocumentBuilderReceiver.java
trunk/eXist/src/org/exist/memtree/DocumentImpl.java
Modified: trunk/eXist/src/org/exist/memtree/DocumentBuilderReceiver.java
===================================================================
--- trunk/eXist/src/org/exist/memtree/DocumentBuilderReceiver.java 2008-03-29 19:34:59 UTC (rev 7567)
+++ trunk/eXist/src/org/exist/memtree/DocumentBuilderReceiver.java 2008-03-29 19:36:41 UTC (rev 7568)
@@ -149,7 +149,7 @@
try {
builder.addAttribute(qname, value);
} catch (DOMException e) {
- throw new SAXException("Error XQDY0025: element has more than one attribute '" + qname + "'");
+ throw new SAXException(e.getMessage());
}
}
Modified: trunk/eXist/src/org/exist/memtree/DocumentImpl.java
===================================================================
--- trunk/eXist/src/org/exist/memtree/DocumentImpl.java 2008-03-29 19:34:59 UTC (rev 7567)
+++ trunk/eXist/src/org/exist/memtree/DocumentImpl.java 2008-03-29 19:36:41 UTC (rev 7568)
@@ -246,6 +246,9 @@
public int addAttribute(int nodeNr, QName qname, String value)
throws DOMException {
if (nodeKind == null) init();
+ if (nodeNr > 0 && nodeKind[nodeNr] != Node.ELEMENT_NODE)
+ throw new DOMException(DOMException.INUSE_ATTRIBUTE_ERR,
+ "XQTY0024: An attribute node cannot follow a node that is not an attribute node.");
int prevAttr = nextAttr - 1;
// check if an attribute with the same qname exists in the parent element
while (nodeNr > 0 && prevAttr > -1 && attrParent[prevAttr] == nodeNr) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2008-03-29 19:35:04
|
Revision: 7567
http://exist.svn.sourceforge.net/exist/?rev=7567&view=rev
Author: wolfgang_m
Date: 2008-03-29 12:34:59 -0700 (Sat, 29 Mar 2008)
Log Message:
-----------
[bugfix] added missing support for Node.getPreviousSibling() to in-memory DOM. Port of rev 7562.
Revision Links:
--------------
http://exist.svn.sourceforge.net/exist/?rev=7562&view=rev
Modified Paths:
--------------
trunk/eXist/src/org/exist/memtree/NodeImpl.java
Modified: trunk/eXist/src/org/exist/memtree/NodeImpl.java
===================================================================
--- trunk/eXist/src/org/exist/memtree/NodeImpl.java 2008-03-29 19:30:48 UTC (rev 7566)
+++ trunk/eXist/src/org/exist/memtree/NodeImpl.java 2008-03-29 19:34:59 UTC (rev 7567)
@@ -37,10 +37,10 @@
import org.w3c.dom.*;
import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;
+import org.xml.sax.ext.LexicalHandler;
import java.util.Iterator;
import java.util.Properties;
-import org.xml.sax.ext.LexicalHandler;
public class NodeImpl implements Node, NodeValue, QNameable, Comparable {
@@ -269,9 +269,18 @@
* @see org.w3c.dom.Node#getPreviousSibling()
*/
public Node getPreviousSibling() {
- //TODO : we have a getNextSibling() method !
- throw new RuntimeException("Can not call getPreviousSibling() on node type " + this.getNodeType());
- }
+ if (nodeNumber == 0)
+ return null;
+ int parent = document.getParentNodeFor(nodeNumber);
+ int nextNode = document.getFirstChildFor(parent);
+ while (nextNode >= parent && nextNode < nodeNumber) {
+ int following = document.next[nextNode];
+ if (following == nodeNumber)
+ return document.getNode(nextNode);
+ nextNode = following;
+ }
+ return null;
+ }
/* (non-Javadoc)
* @see org.w3c.dom.Node#getNextSibling()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2008-03-29 19:30:56
|
Revision: 7566
http://exist.svn.sourceforge.net/exist/?rev=7566&view=rev
Author: wolfgang_m
Date: 2008-03-29 12:30:48 -0700 (Sat, 29 Mar 2008)
Log Message:
-----------
[bugfix] an attribute may not be added to an element after an atomic value. See XQTS test Constr-cont-attr-1. Port of rev 7561.
Revision Links:
--------------
http://exist.svn.sourceforge.net/exist/?rev=7561&view=rev
Modified Paths:
--------------
trunk/eXist/src/org/exist/xquery/EnclosedExpr.java
Modified: trunk/eXist/src/org/exist/xquery/EnclosedExpr.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/EnclosedExpr.java 2008-03-29 19:29:18 UTC (rev 7565)
+++ trunk/eXist/src/org/exist/xquery/EnclosedExpr.java 2008-03-29 19:30:48 UTC (rev 7566)
@@ -90,8 +90,9 @@
else if (buf.length() > 0)
buf.append(' ');
buf.append(next.getStringValue());
- next = i.nextItem();
- // if item is a node, flush any collected character data and
+ allowAttribs = false;
+ next = i.nextItem();
+ // if item is a node, flush any collected character data and
// copy the node to the target doc.
} else if (Type.subTypeOf(next.getType(), Type.NODE)) {
if (buf != null && buf.length() > 0) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2008-03-29 19:29:20
|
Revision: 7565
http://exist.svn.sourceforge.net/exist/?rev=7565&view=rev
Author: wolfgang_m
Date: 2008-03-29 12:29:18 -0700 (Sat, 29 Mar 2008)
Log Message:
-----------
[bugfix] a dynamically constructed text node with empty content does not count as a node. See XQTS test Constr-text-count-5. Port of rev 7560.
Revision Links:
--------------
http://exist.svn.sourceforge.net/exist/?rev=7560&view=rev
Modified Paths:
--------------
trunk/eXist/src/org/exist/xquery/DynamicTextConstructor.java
Modified: trunk/eXist/src/org/exist/xquery/DynamicTextConstructor.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/DynamicTextConstructor.java 2008-03-29 19:27:47 UTC (rev 7564)
+++ trunk/eXist/src/org/exist/xquery/DynamicTextConstructor.java 2008-03-29 19:29:18 UTC (rev 7565)
@@ -22,7 +22,6 @@
*/
package org.exist.xquery;
-import org.exist.memtree.DocumentImpl;
import org.exist.memtree.MemTreeBuilder;
import org.exist.xquery.util.ExpressionDumper;
import org.exist.xquery.value.Item;
@@ -91,8 +90,12 @@
buf.append(' ');
buf.append(next.toString());
}
- int nodeNr = builder.characters(buf);
- result = ((DocumentImpl)builder.getDocument()).getNode(nodeNr);
+ if (buf.length() == 0)
+ result = Sequence.EMPTY_SEQUENCE;
+ else {
+ int nodeNr = builder.characters(buf);
+ result = builder.getDocument().getNode(nodeNr);
+ }
}
if (context.getProfiler().isEnabled())
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2008-03-29 19:27:50
|
Revision: 7564
http://exist.svn.sourceforge.net/exist/?rev=7564&view=rev
Author: wolfgang_m
Date: 2008-03-29 12:27:47 -0700 (Sat, 29 Mar 2008)
Log Message:
-----------
[bugfix] show error if an attribute is added to an element after other child nodes: element elem {element a {}, $input-context//west/@mark}. Port of rev 7559.
Revision Links:
--------------
http://exist.svn.sourceforge.net/exist/?rev=7559&view=rev
Modified Paths:
--------------
trunk/eXist/src/org/exist/xquery/EnclosedExpr.java
Modified: trunk/eXist/src/org/exist/xquery/EnclosedExpr.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/EnclosedExpr.java 2008-03-29 11:02:37 UTC (rev 7563)
+++ trunk/eXist/src/org/exist/xquery/EnclosedExpr.java 2008-03-29 19:27:47 UTC (rev 7564)
@@ -79,7 +79,8 @@
SequenceIterator i = result.iterate();
Item next = i.nextItem();
StringBuffer buf = null;
- while (next != null) {
+ boolean allowAttribs = true;
+ while (next != null) {
context.proceed(this, builder);
// if item is an atomic value, collect the string values of all
// following atomic values and seperate them by a space.
@@ -93,12 +94,16 @@
// if item is a node, flush any collected character data and
// copy the node to the target doc.
} else if (Type.subTypeOf(next.getType(), Type.NODE)) {
- if (buf != null && buf.length() > 0) {
+ if (buf != null && buf.length() > 0) {
receiver.characters(buf);
buf.setLength(0);
}
- next.copyTo(context.getBroker(), receiver);
- next = i.nextItem();
+ if (next.getType() == Type.ATTRIBUTE && !allowAttribs)
+ throw new XPathException(getASTNode(), "XQTY0024: An attribute may not appear after " +
+ "another child node.");
+ next.copyTo(context.getBroker(), receiver);
+ allowAttribs = next.getType() == Type.ATTRIBUTE;
+ next = i.nextItem();
}
}
// flush remaining character data
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2008-03-29 11:02:44
|
Revision: 7563
http://exist.svn.sourceforge.net/exist/?rev=7563&view=rev
Author: wolfgang_m
Date: 2008-03-29 04:02:37 -0700 (Sat, 29 Mar 2008)
Log Message:
-----------
[bugfix] show error if an attribute is added to an element after other child nodes
Modified Paths:
--------------
branches/eXist-memproc/src/org/exist/memtree/DocumentBuilderReceiver.java
branches/eXist-memproc/src/org/exist/memtree/DocumentImpl.java
Modified: branches/eXist-memproc/src/org/exist/memtree/DocumentBuilderReceiver.java
===================================================================
--- branches/eXist-memproc/src/org/exist/memtree/DocumentBuilderReceiver.java 2008-03-28 22:00:47 UTC (rev 7562)
+++ branches/eXist-memproc/src/org/exist/memtree/DocumentBuilderReceiver.java 2008-03-29 11:02:37 UTC (rev 7563)
@@ -149,7 +149,7 @@
try {
builder.addAttribute(qname, value);
} catch (DOMException e) {
- throw new SAXException("Error XQDY0025: element has more than one attribute '" + qname + "'");
+ throw new SAXException(e.getMessage());
}
}
Modified: branches/eXist-memproc/src/org/exist/memtree/DocumentImpl.java
===================================================================
--- branches/eXist-memproc/src/org/exist/memtree/DocumentImpl.java 2008-03-28 22:00:47 UTC (rev 7562)
+++ branches/eXist-memproc/src/org/exist/memtree/DocumentImpl.java 2008-03-29 11:02:37 UTC (rev 7563)
@@ -267,6 +267,9 @@
public int addAttribute(int nodeNr, QName qname, String value, int type)
throws DOMException {
if (nodeKind == null) init();
+ if (nodeNr > 0 && nodeKind[nodeNr] != Node.ELEMENT_NODE)
+ throw new DOMException(DOMException.INUSE_ATTRIBUTE_ERR,
+ "XQTY0024: An attribute node cannot follow a node that is not an attribute node.");
int prevAttr = nextAttr - 1;
// check if an attribute with the same qname exists in the parent element
while (nodeNr > 0 && prevAttr > -1 && attrParent[prevAttr] == nodeNr) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Pierrick B. <pie...@fr...> - 2008-03-29 07:48:50
|
Hi, janaka priyadarshana a écrit : > I want to know can I submit the project proposal before 31^st of March > 2008? > Is this the right place to ask questions? Follow the guidelines provided by Google, use our IRC channel and... the correct mailing-list (i.e. *not* this one). Cheers, p.b. |
|
From: <wol...@us...> - 2008-03-28 22:00:49
|
Revision: 7562
http://exist.svn.sourceforge.net/exist/?rev=7562&view=rev
Author: wolfgang_m
Date: 2008-03-28 15:00:47 -0700 (Fri, 28 Mar 2008)
Log Message:
-----------
[bugfix] added missing support for Node.getPreviousSibling() to in-memory DOM.
Modified Paths:
--------------
branches/eXist-memproc/src/org/exist/memtree/NodeImpl.java
branches/eXist-memproc/test/src/org/exist/memtree/DOMTest.java
Modified: branches/eXist-memproc/src/org/exist/memtree/NodeImpl.java
===================================================================
--- branches/eXist-memproc/src/org/exist/memtree/NodeImpl.java 2008-03-28 21:40:31 UTC (rev 7561)
+++ branches/eXist-memproc/src/org/exist/memtree/NodeImpl.java 2008-03-28 22:00:47 UTC (rev 7562)
@@ -56,10 +56,10 @@
import org.w3c.dom.UserDataHandler;
import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;
+import org.xml.sax.ext.LexicalHandler;
import java.util.Iterator;
import java.util.Properties;
-import org.xml.sax.ext.LexicalHandler;
public class NodeImpl implements Node, NodeValue, QNameable, Comparable {
@@ -303,9 +303,18 @@
* @see org.w3c.dom.Node#getPreviousSibling()
*/
public Node getPreviousSibling() {
- //TODO : we have a getNextSibling() method !
- throw new RuntimeException("Can not call getPreviousSibling() on node type " + this.getNodeType());
- }
+ if (nodeNumber == 0)
+ return null;
+ int parent = document.getParentNodeFor(nodeNumber);
+ int nextNode = document.getFirstChildFor(parent);
+ while (nextNode >= parent && nextNode < nodeNumber) {
+ int following = document.next[nextNode];
+ if (following == nodeNumber)
+ return document.getNode(nextNode);
+ nextNode = following;
+ }
+ return null;
+ }
/* (non-Javadoc)
* @see org.w3c.dom.Node#getNextSibling()
Modified: branches/eXist-memproc/test/src/org/exist/memtree/DOMTest.java
===================================================================
--- branches/eXist-memproc/test/src/org/exist/memtree/DOMTest.java 2008-03-28 21:40:31 UTC (rev 7561)
+++ branches/eXist-memproc/test/src/org/exist/memtree/DOMTest.java 2008-03-28 22:00:47 UTC (rev 7562)
@@ -6,13 +6,7 @@
*/
package org.exist.memtree;
-import java.io.StringReader;
-import java.io.StringWriter;
-
-import javax.xml.parsers.SAXParserFactory;
-
import junit.framework.TestCase;
-
import org.exist.dom.QName;
import org.exist.util.serializer.DOMSerializer;
import org.w3c.dom.Document;
@@ -20,6 +14,10 @@
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;
+import javax.xml.parsers.SAXParserFactory;
+import java.io.StringReader;
+import java.io.StringWriter;
+
/**
* @author wolf
*
@@ -42,17 +40,7 @@
public void testDocumentBuilder() {
try {
- DocumentBuilderReceiver receiver = new DocumentBuilderReceiver();
- SAXParserFactory factory = SAXParserFactory.newInstance();
- factory.setNamespaceAware(true);
- XMLReader reader = factory.newSAXParser().getXMLReader();
- reader.setContentHandler(receiver);
- reader.parse(new InputSource(new StringReader(XML)));
-
- Document doc = receiver.getDocument();
- Node node = doc.getFirstChild();
- assertNotNull(node);
-
+ Node node = parse(XML);
StringWriter writer = new StringWriter();
DOMSerializer serializer = new DOMSerializer(writer, null);
serializer.serialize(node);
@@ -93,7 +81,43 @@
assertEquals(2, top.getChildNodes().getLength());
}
- public void print(Node node) {
+ public void testGetSiblingNodes() {
+ Node top = parse("<root><a/><b/></root>");
+ assertNotNull(top);
+ Node firstChild = top.getFirstChild();
+ assertNotNull(firstChild);
+ assertEquals("a", firstChild.getNodeName());
+ Node prevChild = firstChild.getPreviousSibling();
+ assertNull(prevChild);
+ Node next = firstChild.getNextSibling();
+ assertNotNull(next);
+ assertEquals("b", next.getNodeName());
+ prevChild = next.getPreviousSibling();
+ assertNotNull(prevChild);
+ assertEquals(firstChild, prevChild);
+ }
+
+ private NodeImpl parse(String xml) {
+ try {
+ DocumentBuilderReceiver receiver = new DocumentBuilderReceiver();
+ SAXParserFactory factory = SAXParserFactory.newInstance();
+ factory.setNamespaceAware(true);
+ XMLReader reader = factory.newSAXParser().getXMLReader();
+ reader.setContentHandler(receiver);
+ reader.parse(new InputSource(new StringReader(xml)));
+
+ Document doc = receiver.getDocument();
+ NodeImpl node = (NodeImpl) doc.getFirstChild();
+ assertNotNull(node);
+ return node;
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail(e.getMessage());
+ }
+ return null;
+ }
+
+ public void print(Node node) {
while (node != null) {
switch (node.getNodeType()) {
case Node.ELEMENT_NODE :
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2008-03-28 21:40:32
|
Revision: 7561
http://exist.svn.sourceforge.net/exist/?rev=7561&view=rev
Author: wolfgang_m
Date: 2008-03-28 14:40:31 -0700 (Fri, 28 Mar 2008)
Log Message:
-----------
[bugfix] an attribute may not be added to an element after an atomic value. See XQTS test Constr-cont-attr-1.
Modified Paths:
--------------
branches/eXist-memproc/src/org/exist/xquery/EnclosedExpr.java
Modified: branches/eXist-memproc/src/org/exist/xquery/EnclosedExpr.java
===================================================================
--- branches/eXist-memproc/src/org/exist/xquery/EnclosedExpr.java 2008-03-28 21:35:12 UTC (rev 7560)
+++ branches/eXist-memproc/src/org/exist/xquery/EnclosedExpr.java 2008-03-28 21:40:31 UTC (rev 7561)
@@ -90,8 +90,9 @@
else if (buf.length() > 0)
buf.append(' ');
buf.append(next.getStringValue());
- next = i.nextItem();
- // if item is a node, flush any collected character data and
+ allowAttribs = false;
+ next = i.nextItem();
+ // if item is a node, flush any collected character data and
// copy the node to the target doc.
} else if (Type.subTypeOf(next.getType(), Type.NODE)) {
if (buf != null && buf.length() > 0) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2008-03-28 21:35:15
|
Revision: 7560
http://exist.svn.sourceforge.net/exist/?rev=7560&view=rev
Author: wolfgang_m
Date: 2008-03-28 14:35:12 -0700 (Fri, 28 Mar 2008)
Log Message:
-----------
[bugfix] a dynamically constructed text node with empty content does not count as a node. See XQTS test Constr-text-count-5
Modified Paths:
--------------
branches/eXist-memproc/src/org/exist/xquery/DynamicTextConstructor.java
Modified: branches/eXist-memproc/src/org/exist/xquery/DynamicTextConstructor.java
===================================================================
--- branches/eXist-memproc/src/org/exist/xquery/DynamicTextConstructor.java 2008-03-28 21:30:31 UTC (rev 7559)
+++ branches/eXist-memproc/src/org/exist/xquery/DynamicTextConstructor.java 2008-03-28 21:35:12 UTC (rev 7560)
@@ -22,7 +22,6 @@
*/
package org.exist.xquery;
-import org.exist.memtree.DocumentImpl;
import org.exist.memtree.MemTreeBuilder;
import org.exist.xquery.util.ExpressionDumper;
import org.exist.xquery.value.Item;
@@ -91,8 +90,12 @@
buf.append(' ');
buf.append(next.toString());
}
- int nodeNr = builder.characters(buf);
- result = ((DocumentImpl)builder.getDocument()).getNode(nodeNr);
+ if (buf.length() == 0)
+ result = Sequence.EMPTY_SEQUENCE;
+ else {
+ int nodeNr = builder.characters(buf);
+ result = builder.getDocument().getNode(nodeNr);
+ }
}
if (context.getProfiler().isEnabled())
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2008-03-28 21:30:34
|
Revision: 7559
http://exist.svn.sourceforge.net/exist/?rev=7559&view=rev
Author: wolfgang_m
Date: 2008-03-28 14:30:31 -0700 (Fri, 28 Mar 2008)
Log Message:
-----------
[bugfix] show error if an attribute is added to an element after other child nodes: element elem {element a {}, $input-context//west/@mark}
Modified Paths:
--------------
branches/eXist-memproc/src/org/exist/xquery/EnclosedExpr.java
Modified: branches/eXist-memproc/src/org/exist/xquery/EnclosedExpr.java
===================================================================
--- branches/eXist-memproc/src/org/exist/xquery/EnclosedExpr.java 2008-03-28 21:07:00 UTC (rev 7558)
+++ branches/eXist-memproc/src/org/exist/xquery/EnclosedExpr.java 2008-03-28 21:30:31 UTC (rev 7559)
@@ -79,7 +79,8 @@
SequenceIterator i = result.iterate();
Item next = i.nextItem();
StringBuffer buf = null;
- while (next != null) {
+ boolean allowAttribs = true;
+ while (next != null) {
context.proceed(this, builder);
// if item is an atomic value, collect the string values of all
// following atomic values and seperate them by a space.
@@ -93,12 +94,16 @@
// if item is a node, flush any collected character data and
// copy the node to the target doc.
} else if (Type.subTypeOf(next.getType(), Type.NODE)) {
- if (buf != null && buf.length() > 0) {
+ if (buf != null && buf.length() > 0) {
receiver.characters(buf);
buf.setLength(0);
}
- next.copyTo(context.getBroker(), receiver);
- next = i.nextItem();
+ if (next.getType() == Type.ATTRIBUTE && !allowAttribs)
+ throw new XPathException(getASTNode(), "XQTY0024: An attribute may not appear after " +
+ "another child node.");
+ next.copyTo(context.getBroker(), receiver);
+ allowAttribs = next.getType() == Type.ATTRIBUTE;
+ next = i.nextItem();
}
}
// flush remaining character data
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2008-03-28 21:07:04
|
Revision: 7558
http://exist.svn.sourceforge.net/exist/?rev=7558&view=rev
Author: wolfgang_m
Date: 2008-03-28 14:07:00 -0700 (Fri, 28 Mar 2008)
Log Message:
-----------
[bugfix] fixed: selecting the parent of an attribute: $x/@attr/..
Modified Paths:
--------------
branches/eXist-memproc/src/org/exist/memtree/AttributeImpl.java
Modified: branches/eXist-memproc/src/org/exist/memtree/AttributeImpl.java
===================================================================
--- branches/eXist-memproc/src/org/exist/memtree/AttributeImpl.java 2008-03-28 20:15:56 UTC (rev 7557)
+++ branches/eXist-memproc/src/org/exist/memtree/AttributeImpl.java 2008-03-28 21:07:00 UTC (rev 7558)
@@ -168,7 +168,11 @@
return document.getNode(document.attrParent[nodeNumber]);
}
- /** ? @see org.w3c.dom.Attr#getSchemaTypeInfo()
+ public Node selectParentNode() {
+ return getParentNode();
+ }
+
+ /** ? @see org.w3c.dom.Attr#getSchemaTypeInfo()
*/
public TypeInfo getSchemaTypeInfo() {
// maybe TODO - new DOM interfaces - Java 5.0
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: janaka p. <gvj...@gm...> - 2008-03-28 20:36:58
|
Hello, I'm Janaka Priyadarshana doing Computer Science and Engineering at the Department Of Computer Science and Engineering(http://www.cse.mrt.ac.lk), University Of Moratuwa, Sri Lanka. Currently I'm studying the final year, second semester. When I was going through GSOC projects this year I was looking for a project that interests me and a project that I can contribute with my knowledge area. In my training period, I had involved with Election Ontario project( http://www.elections.on.ca/ ) in the Navantis IT (Pvt) Ltd ( http://www.navantis.com/ <" rel="nofollow">http://www.navantis.com/english/default.asp> ), which is the Elections Management System provides an integrated system to manage election-related processes for Elections Ontario. That project involved on certain technologies and several existing Microsoft Windows Server System products. The technologies and methodologies involved HTML, XML, XSLT, XQuery, XPath, Web Service, Object Oriented Design and Programming. I followed Advance Database System in the university, where I studied XPath and XQuery. For the assignments I used the Open Source Native XML Database and applied learn theories. Then I have a fair knowledge about the HTML, XML, XSLT s, XQuery , XPath, that I learned through out my academic career and in training period. I found out about your organization and your Open Source Native XML Database project is a really interesting one and I'm expecting to apply for the I*mplement an XSLT 2.0 Processor**.* I want to know can I submit the project proposal before 31st of March 2008? Where it Is mentioned as 26th of March in the eXist Developer's Blog. Is this the right place to ask questions? I am looking forward to have someone to mentor me in this project. Thank you. Regards, Janaka Priyadarshana http://gvjanaka.blogspot.com |