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
(12) |
2
(17) |
3
|
4
(2) |
5
|
6
(6) |
7
(13) |
|
8
(11) |
9
(1) |
10
(2) |
11
(1) |
12
(6) |
13
(2) |
14
|
|
15
|
16
|
17
(4) |
18
(1) |
19
|
20
|
21
(2) |
|
22
|
23
(1) |
24
(11) |
25
(4) |
26
(24) |
27
(34) |
28
(9) |
|
29
(13) |
30
(16) |
31
(7) |
|
|
|
|
|
From: Wolfgang M. M. <wol...@us...> - 2005-05-31 10:45:14
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/dom In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30315/src/org/exist/dom Modified Files: ElementImpl.java Log Message: Fixed NullPointerException. Index: ElementImpl.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/dom/ElementImpl.java,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** ElementImpl.java 31 May 2005 09:00:00 -0000 1.65 --- ElementImpl.java 31 May 2005 10:45:04 -0000 1.66 *************** *** 481,485 **** attrib.setGID(gid); attrib.setOwnerDocument(ownerDocument); ! if (ns.equals(XQueryContext.XML_NS)) { // an xml:id attribute. Normalize the attribute and set its type to ID attrib.setValue(StringValue.trimWhitespace(StringValue.collapseWhitespace(attrib.getValue()))); --- 481,485 ---- attrib.setGID(gid); attrib.setOwnerDocument(ownerDocument); ! if (ns != null && ns.equals(XQueryContext.XML_NS)) { // an xml:id attribute. Normalize the attribute and set its type to ID attrib.setValue(StringValue.trimWhitespace(StringValue.collapseWhitespace(attrib.getValue()))); *************** *** 1317,1321 **** "node is not a child of this element"); if (newNode.getNodeType() == Node.ATTRIBUTE_NODE) { ! if (XQueryContext.XML_NS.equals(newNode.getNamespaceURI())) { // an xml:id attribute. Normalize the attribute and set its type to ID AttrImpl attr = (AttrImpl) newNode; --- 1317,1322 ---- "node is not a child of this element"); if (newNode.getNodeType() == Node.ATTRIBUTE_NODE) { ! if (newNode.getNamespaceURI() != null && ! XQueryContext.XML_NS.equals(newNode.getNamespaceURI())) { // an xml:id attribute. Normalize the attribute and set its type to ID AttrImpl attr = (AttrImpl) newNode; |
|
From: Wolfgang M. M. <wol...@us...> - 2005-05-31 09:07:11
|
Update of /cvsroot/exist/eXist-1.0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11111 Modified Files: conf.xml.tmpl conf.xml Log Message: Set indexer setting caseSensitive to "yes" by default. Index: conf.xml =================================================================== RCS file: /cvsroot/exist/eXist-1.0/conf.xml,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -d -r1.73 -r1.74 *** conf.xml 20 Apr 2005 11:15:17 -0000 1.73 --- conf.xml 31 May 2005 09:06:45 -0000 1.74 *************** *** 168,172 **** preserve the white space inside a mixed content node --> ! <indexer stemming="no" caseSensitive="no" suppress-whitespace="both" index-depth="1" tokenizer="org.exist.storage.analysis.SimpleTokenizer" track-term-freq="yes" validation="no" preserve-whitespace-mixed-content="no"> --- 168,172 ---- preserve the white space inside a mixed content node --> ! <indexer stemming="no" caseSensitive="yes" suppress-whitespace="both" index-depth="1" tokenizer="org.exist.storage.analysis.SimpleTokenizer" track-term-freq="yes" validation="no" preserve-whitespace-mixed-content="no"> Index: conf.xml.tmpl =================================================================== RCS file: /cvsroot/exist/eXist-1.0/conf.xml.tmpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** conf.xml.tmpl 20 Apr 2005 11:15:15 -0000 1.4 --- conf.xml.tmpl 31 May 2005 09:06:45 -0000 1.5 *************** *** 168,172 **** preserve the white space inside a mixed content node --> ! <indexer stemming="no" caseSensitive="no" suppress-whitespace="both" index-depth="1" tokenizer="org.exist.storage.analysis.SimpleTokenizer" track-term-freq="yes" validation="no" preserve-whitespace-mixed-content="no"> --- 168,172 ---- preserve the white space inside a mixed content node --> ! <indexer stemming="no" caseSensitive="yes" suppress-whitespace="both" index-depth="1" tokenizer="org.exist.storage.analysis.SimpleTokenizer" track-term-freq="yes" validation="no" preserve-whitespace-mixed-content="no"> |
|
From: Wolfgang M. M. <wol...@us...> - 2005-05-31 09:06:10
|
Update of /cvsroot/exist/eXist-1.0/webapp/WEB-INF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10554/webapp/WEB-INF Modified Files: conf.xml Log Message: Set indexer setting caseSensitive to "yes" by default. Index: conf.xml =================================================================== RCS file: /cvsroot/exist/eXist-1.0/webapp/WEB-INF/conf.xml,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** conf.xml 2 May 2005 08:20:31 -0000 1.29 --- conf.xml 31 May 2005 09:06:01 -0000 1.30 *************** *** 168,172 **** preserve the white space inside a mixed content node --> ! <indexer stemming="no" caseSensitive="no" suppress-whitespace="both" index-depth="1" tokenizer="org.exist.storage.analysis.SimpleTokenizer" track-term-freq="yes" validation="no" preserve-whitespace-mixed-content="no"> --- 168,172 ---- preserve the white space inside a mixed content node --> ! <indexer stemming="no" caseSensitive="yes" suppress-whitespace="both" index-depth="1" tokenizer="org.exist.storage.analysis.SimpleTokenizer" track-term-freq="yes" validation="no" preserve-whitespace-mixed-content="no"> |
|
From: Wolfgang M. M. <wol...@us...> - 2005-05-31 09:00:49
|
Update of /cvsroot/exist/eXist-1.0/samples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7872/samples Modified Files: mondial.xconf Log Message: Index: mondial.xconf =================================================================== RCS file: /cvsroot/exist/eXist-1.0/samples/mondial.xconf,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mondial.xconf 12 Dec 2004 18:09:00 -0000 1.1 --- mondial.xconf 31 May 2005 09:00:39 -0000 1.2 *************** *** 6,13 **** --- 6,16 ---- <index> <fulltext default="all" attributes="yes"/> + <create path="/mondial//population" type="xs:integer"/> <create path="/mondial//population_growth" type="xs:double"/> <create path="/mondial//infant_mortality" type="xs:double"/> <create path="/mondial//inflation" type="xs:double"/> + + <create qname="population" type="xs:integer"/> </index> </collection> |
|
From: Wolfgang M. M. <wol...@us...> - 2005-05-31 09:00:12
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7393/src/org/exist/xquery/test Modified Files: XPathQueryTest.java Log Message: xml:id attribute indexes are now maintained during document updates. Index: XPathQueryTest.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/test/XPathQueryTest.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** XPathQueryTest.java 30 May 2005 15:53:49 -0000 1.25 --- XPathQueryTest.java 31 May 2005 09:00:00 -0000 1.26 *************** *** 364,367 **** --- 364,376 ---- r = result.getResource(0); assertEquals("<name>two</name>", r.getContent().toString()); + + String update = "update insert <t xml:id=\"id3\">Hello</t> into /test"; + queryResource(service, "ids.xml", update, 0); + + queryResource(service, "ids.xml", "id('id3')", 1); + + update = "update value //t/@xml:id with 'id4'"; + queryResource(service, "ids.xml", update, 0); + queryResource(service, "ids.xml", "id('id4')", 1); } catch (XMLDBException e) { System.out.println("testIds(): XMLDBException: "+e); |
|
From: Wolfgang M. M. <wol...@us...> - 2005-05-31 09:00:12
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/dom In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7393/src/org/exist/dom Modified Files: ElementImpl.java Log Message: xml:id attribute indexes are now maintained during document updates. Index: ElementImpl.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/dom/ElementImpl.java,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** ElementImpl.java 30 May 2005 10:03:12 -0000 1.64 --- ElementImpl.java 31 May 2005 09:00:00 -0000 1.65 *************** *** 24,39 **** package org.exist.dom; import org.exist.EXistException; import org.exist.security.PermissionDeniedException; import org.exist.storage.DBBroker; import org.exist.storage.IndexSpec; import org.exist.storage.NodePath; import org.exist.storage.RangeIndexSpec; import org.exist.storage.Signatures; - import org.exist.storage.GeneralRangeIndexSpec; import org.exist.util.ByteArrayPool; import org.exist.util.ByteConversion; import org.exist.util.UTF8; ! import org.w3c.dom.*; import org.xml.sax.ContentHandler; import org.xml.sax.SAXException; --- 24,63 ---- package org.exist.dom; + import java.io.ByteArrayInputStream; + import java.io.ByteArrayOutputStream; + import java.io.DataInputStream; + import java.io.DataOutputStream; + import java.io.IOException; + import java.util.ArrayList; + import java.util.HashMap; + import java.util.Iterator; + import java.util.Map; + import java.util.Set; + import java.util.TreeSet; + import org.exist.EXistException; import org.exist.security.PermissionDeniedException; import org.exist.storage.DBBroker; + import org.exist.storage.GeneralRangeIndexSpec; import org.exist.storage.IndexSpec; import org.exist.storage.NodePath; import org.exist.storage.RangeIndexSpec; import org.exist.storage.Signatures; import org.exist.util.ByteArrayPool; import org.exist.util.ByteConversion; import org.exist.util.UTF8; ! import org.exist.xquery.XQueryContext; ! import org.exist.xquery.value.StringValue; ! import org.w3c.dom.Attr; ! import org.w3c.dom.Comment; ! 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.ProcessingInstruction; ! import org.w3c.dom.Text; ! import org.w3c.dom.TypeInfo; ! import org.w3c.dom.UserDataHandler; import org.xml.sax.ContentHandler; import org.xml.sax.SAXException; *************** *** 41,56 **** import org.xml.sax.helpers.AttributesImpl; - import java.io.ByteArrayInputStream; - import java.io.ByteArrayOutputStream; - import java.io.DataInputStream; - import java.io.DataOutputStream; - import java.io.IOException; - import java.util.ArrayList; - import java.util.HashMap; - import java.util.Iterator; - import java.util.Map; - import java.util.Set; - import java.util.TreeSet; - /** * ElementImpl.java --- 65,68 ---- *************** *** 461,465 **** attr = (Attr) child; ns = attr.getNamespaceURI(); ! prefix = (ns != null && ns.equals("http://www.w3.org/XML/1998/namespace") ? "xml" : attr.getPrefix()); String name = attr.getLocalName(); if (name == null) name = attr.getName(); --- 473,477 ---- attr = (Attr) child; ns = attr.getNamespaceURI(); ! prefix = (ns != null && ns.equals(XQueryContext.XML_NS) ? "xml" : attr.getPrefix()); String name = attr.getLocalName(); if (name == null) name = attr.getName(); *************** *** 469,472 **** --- 481,489 ---- attrib.setGID(gid); attrib.setOwnerDocument(ownerDocument); + if (ns.equals(XQueryContext.XML_NS)) { + // an xml:id attribute. Normalize the attribute and set its type to ID + attrib.setValue(StringValue.trimWhitespace(StringValue.collapseWhitespace(attrib.getValue()))); + attrib.setType(AttrImpl.ID); + } ownerDocument.broker.insertAfter(last.node, attrib); // index now? *************** *** 1299,1302 **** --- 1316,1328 ---- throw new DOMException(DOMException.NOT_FOUND_ERR, "node is not a child of this element"); + if (newNode.getNodeType() == Node.ATTRIBUTE_NODE) { + if (XQueryContext.XML_NS.equals(newNode.getNamespaceURI())) { + // an xml:id attribute. Normalize the attribute and set its type to ID + AttrImpl attr = (AttrImpl) newNode; + attr.setValue(StringValue.trimWhitespace(StringValue.collapseWhitespace(attr.getValue()))); + attr.setType(AttrImpl.ID); + } + } + NodeImpl previous = (NodeImpl) old.getPreviousSibling(); if (previous == null) |
|
From: Wolfgang M. M. <wol...@us...> - 2005-05-31 09:00:12
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7393/src/org/exist/storage Modified Files: NativeBroker.java Log Message: xml:id attribute indexes are now maintained during document updates. Index: NativeBroker.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/NativeBroker.java,v retrieving revision 1.150 retrieving revision 1.151 diff -C2 -d -r1.150 -r1.151 *** NativeBroker.java 30 May 2005 09:41:47 -0000 1.150 --- NativeBroker.java 31 May 2005 09:00:00 -0000 1.151 *************** *** 1249,1253 **** // to the element index as well if (((AttrImpl) node).getType() == AttrImpl.ID) { ! qname = new QName("&" + ((AttrImpl) node).getValue(), "", null); qname.setNameType(ElementValue.ATTRIBUTE_ID); elementIndex.addRow(qname, tempProxy); --- 1249,1254 ---- // to the element index as well if (((AttrImpl) node).getType() == AttrImpl.ID) { ! qname = new QName(((AttrImpl) node).getValue(), "", null); ! //LOG.debug("found ID: " + qname.getLocalName()); qname.setNameType(ElementValue.ATTRIBUTE_ID); elementIndex.addRow(qname, tempProxy); |
|
From: Wolfgang M. M. <wol...@us...> - 2005-05-30 21:20:01
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/backup In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8523/src/org/exist/backup Modified Files: Restore.java Log Message: Make restore a bit more failsafe: continue restore on recoverable exceptions. Index: Restore.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/backup/Restore.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Restore.java 7 May 2005 16:49:19 -0000 1.20 --- Restore.java 30 May 2005 21:19:52 -0000 1.21 *************** *** 5,14 **** import java.io.FileNotFoundException; import java.io.IOException; import java.util.Observable; import java.util.Stack; import java.util.StringTokenizer; - import java.util.Date; import javax.swing.JFrame; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; --- 5,19 ---- import java.io.FileNotFoundException; import java.io.IOException; + import java.util.Date; import java.util.Observable; import java.util.Stack; import java.util.StringTokenizer; + import javax.swing.BorderFactory; + import javax.swing.JDialog; import javax.swing.JFrame; + import javax.swing.JOptionPane; + import javax.swing.JScrollPane; + import javax.swing.JTextArea; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; *************** *** 17,22 **** import org.exist.security.User; import org.exist.xmldb.CollectionImpl; ! import org.exist.xmldb.UserManagementService; import org.exist.xmldb.EXistResource; import org.xml.sax.Attributes; import org.xml.sax.InputSource; --- 22,30 ---- import org.exist.security.User; import org.exist.xmldb.CollectionImpl; ! import org.exist.xmldb.CollectionManagementServiceImpl; import org.exist.xmldb.EXistResource; + import org.exist.xmldb.UserManagementService; + import org.exist.xquery.XPathException; + import org.exist.xquery.value.DateTimeValue; import org.xml.sax.Attributes; import org.xml.sax.InputSource; *************** *** 28,34 **** import org.xmldb.api.base.Resource; import org.xmldb.api.base.XMLDBException; - import org.exist.xmldb.CollectionManagementServiceImpl; - import org.exist.xquery.XPathException; - import org.exist.xquery.value.DateTimeValue; /** --- 36,39 ---- *************** *** 174,178 **** service.chown(u, group); service.chmod(Integer.parseInt(mode, 8)); ! } catch (XMLDBException e) { throw new SAXException(e.getMessage(), e); } --- 179,186 ---- service.chown(u, group); service.chmod(Integer.parseInt(mode, 8)); ! } catch (Exception e) { ! showErrorMessage("An unrecoverable error occurred while restoring\ncollection '" + name + "'. " + ! "Aborting restore!"); ! e.printStackTrace(); throw new SAXException(e.getMessage(), e); } *************** *** 215,220 **** if (filename == null) filename = name; ! if (name == null) ! throw new SAXException("resource requires a name attribute"); final File f = new File( --- 223,232 ---- if (filename == null) filename = name; ! if (name == null) { ! if (dialog != null) ! dialog.displayMessage("Wrong entry in backup descriptor: resource requires a name attribute."); ! else ! System.err.println("Wrong entry in backup descriptor: resource requires a name attribute."); ! } final File f = new File( *************** *** 233,237 **** res.setContent(f); if(dialog == null) ! System.out.println("restoring " + name); Date date_created = null; --- 245,249 ---- res.setContent(f); if(dialog == null) ! System.out.println("Restoring " + name); Date date_created = null; *************** *** 259,271 **** service.chown(res, u, group); } catch (XMLDBException e1) { ! if(dialog != null) ! dialog.displayMessage("failed to change owner on document " + name + "; skipping ..."); } service.chmod(res, Integer.parseInt(perms, 8)); if(dialog != null) dialog.displayMessage("restored " + name); ! } catch (XMLDBException e) { ! e.printStackTrace(); ! throw new SAXException(e); } } --- 271,294 ---- service.chown(res, u, group); } catch (XMLDBException e1) { ! if(dialog != null) { ! dialog.displayMessage("Failed to change owner on document '" + name + "'; skipping ..."); ! } } service.chmod(res, Integer.parseInt(perms, 8)); if(dialog != null) dialog.displayMessage("restored " + name); ! } catch (Exception e) { ! if (dialog != null) { ! dialog.displayMessage("Failed to restore resource '" + name + "'\nfrom file '" + ! f.getAbsolutePath() + "'.\nReason: " + e.getMessage()); ! showErrorMessage( ! "Failed to restore resource '" + name + "' from file: '" + ! f.getAbsolutePath() + "'.\n\nReason: " + e.getMessage() ! ); ! } else { ! System.err.println("Failed to restore resource '" + name + "' from file '" + ! f.getAbsolutePath() + "'"); ! e.printStackTrace(); ! } } } *************** *** 297,299 **** --- 320,337 ---- return (CollectionImpl)current; } + + public static void showErrorMessage(String message) { + JTextArea msgArea = new JTextArea(message); + msgArea.setEditable(false); + msgArea.setBackground(null); + JScrollPane scroll = new JScrollPane(msgArea); + JOptionPane optionPane = new JOptionPane(); + optionPane.setMessage(new Object[]{scroll}); + optionPane.setMessageType(JOptionPane.ERROR_MESSAGE); + JDialog dialog = optionPane.createDialog(null, "Error"); + dialog.setResizable(true); + dialog.pack(); + dialog.setVisible(true); + return; + } } \ No newline at end of file |
|
From: Dannes W. <di...@us...> - 2005-05-30 18:21:47
|
Update of /cvsroot/exist/eXist-1.0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10696 Modified Files: build.bat Log Message: XP: Correct java is used now (selected by %JAVA_HOME%) and EXIST_HOME is set now (if not set before) Index: build.bat =================================================================== RCS file: /cvsroot/exist/eXist-1.0/build.bat,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** build.bat 15 Dec 2003 13:15:09 -0000 1.9 --- build.bat 30 May 2005 18:21:38 -0000 1.10 *************** *** 8,24 **** :gotJavaHome set ANT_HOME=%EXIST_HOME%\tools set _LIBJARS=%CLASSPATH%;%ANT_HOME%\lib\ant-launcher.jar;%ANT_HOME%\lib\junit.jar;%JAVA_HOME%\lib\tools.jar set JAVA_ENDORSED_DIRS=%EXIST_HOME%\lib\endorsed ! set JAVA_OPTS=-Xms32000k -Xmx256000k -Djava.endorsed.dirs=%JAVA_ENDORSED_DIRS% -Dant.home=%ANT_HOME% echo eXist Build echo ------------------- ! ! echo Building with classpath %_LIBJARS% echo Starting Ant... ! java %JAVA_OPTS% -classpath %_LIBJARS% org.apache.tools.ant.launch.Launcher %1 %2 %3 %4 %5 ! --- 8,28 ---- :gotJavaHome + if not "%EXIST_HOME%" == "" goto gotExistHome + set EXIST_HOME=%CD% + + :gotExistHome set ANT_HOME=%EXIST_HOME%\tools set _LIBJARS=%CLASSPATH%;%ANT_HOME%\lib\ant-launcher.jar;%ANT_HOME%\lib\junit.jar;%JAVA_HOME%\lib\tools.jar set JAVA_ENDORSED_DIRS=%EXIST_HOME%\lib\endorsed ! set JAVA_OPTS=-Xms64M -Xmx512M -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -Dant.home="%ANT_HOME%" echo eXist Build echo ------------------- ! echo JAVA_HOME=%JAVA_HOME% ! echo EXIST_HOME=%EXIST_HOME% ! echo _LIBJARS=%_LIBJARS% echo Starting Ant... ! "%JAVA_HOME%\bin\java" %JAVA_OPTS% -classpath "%_LIBJARS%" org.apache.tools.ant.launch.Launcher %1 %2 %3 %4 %5 |
|
From: Dannes W. <di...@us...> - 2005-05-30 17:47:16
|
Update of /cvsroot/exist/eXist-1.0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24566 Modified Files: build.xml Log Message: Modified comment signing jar files. We must compile with build.sh or build.bat instead of ant. Index: build.xml =================================================================== RCS file: /cvsroot/exist/eXist-1.0/build.xml,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -d -r1.86 -r1.87 *** build.xml 29 May 2005 15:06:28 -0000 1.86 --- build.xml 30 May 2005 17:47:07 -0000 1.87 *************** *** 5,19 **** <!-- ======================================================================= --> <project basedir="." default="all" name="exist"> ! ! <property file="build.properties"/> <property name="jetty.dir" value="tools/jetty"/> <property name="src" value="./src"/> <property name="src.webapp" value="./webapp"/> ! <property name="samples" value="./samples"/> ! <property name="bin" value="./bin"/> [...1700 lines suppressed...] ! <target name="sign"> <ant antfile="build-sign.xml" dir="." target="jnlp-sign-exist"/> ! <echo message="!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"/> ! <echo message="!! Please run 'build -f build-sign.xml' "/> <echo message="!! at least once manually for enabling webstart !!"/> <echo message="!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"/> *************** *** 980,984 **** <!-- the core jars can NOT be signed in this build.xml file because --> <!-- the jars are some how locked by ant (classpath.core)--> ! </target> </project> --- 983,987 ---- <!-- the core jars can NOT be signed in this build.xml file because --> <!-- the jars are some how locked by ant (classpath.core)--> ! </target> </project> |
|
From: Jean-Marc V. <jm...@us...> - 2005-05-30 17:27:14
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13413/src/org/exist/storage Modified Files: IndexSpec.java Log Message: exception and message for Configuration error Index: IndexSpec.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/IndexSpec.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** IndexSpec.java 29 May 2005 19:51:29 -0000 1.9 --- IndexSpec.java 30 May 2005 17:27:05 -0000 1.10 *************** *** 110,117 **** QNameRangeIndexSpec qnIdx = new QNameRangeIndexSpec(namespaces, qname, type); qnameSpecs.put(qnIdx.getQName(), qnIdx); ! } else { String path = elem.getAttribute(PATH_ATTRIB); GeneralRangeIndexSpec valueIdx = new GeneralRangeIndexSpec(namespaces, path, type); addValueIndex(valueIdx); } } else if (CREATE_BY_QNAME.equals(node.getLocalName())) { --- 110,121 ---- QNameRangeIndexSpec qnIdx = new QNameRangeIndexSpec(namespaces, qname, type); qnameSpecs.put(qnIdx.getQName(), qnIdx); ! } else if (elem.hasAttribute(PATH_ATTRIB)) { String path = elem.getAttribute(PATH_ATTRIB); GeneralRangeIndexSpec valueIdx = new GeneralRangeIndexSpec(namespaces, path, type); addValueIndex(valueIdx); + } else { + String error_message = "Configuration error: element " + elem.getNodeName() + + " must have attribute " + PATH_ATTRIB + " or " + QNAME_ATTRIB; + throw new DatabaseConfigurationException(error_message); } } else if (CREATE_BY_QNAME.equals(node.getLocalName())) { |
|
From: Wolfgang M. M. <wol...@us...> - 2005-05-30 15:54:01
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery/value In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29665/src/org/exist/xquery/value Modified Files: StringValue.java Log Message: Added preliminary support for xml:id attributes. Index: StringValue.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/value/StringValue.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** StringValue.java 27 May 2005 19:26:43 -0000 1.17 --- StringValue.java 30 May 2005 15:53:49 -0000 1.18 *************** *** 378,381 **** --- 378,398 ---- } + public final static String trimWhitespace(String in) { + if (in.length()==0) { + return in; + } + int first = 0; + int last = in.length()-1; + while (in.charAt(first) <= 0x20) { + if (first++ >= last) { + return ""; + } + } + while (in.charAt(last) <= 0x20) { + last--; + } + return in.substring(first, last+1); + } + public final static String expand(CharSequence seq) throws XPathException { StringBuffer buf = new StringBuffer(seq.length()); |
|
From: Wolfgang M. M. <wol...@us...> - 2005-05-30 15:54:00
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29665/src/org/exist/xquery/test Modified Files: XPathQueryTest.java Log Message: Added preliminary support for xml:id attributes. Index: XPathQueryTest.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/test/XPathQueryTest.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** XPathQueryTest.java 23 Apr 2005 09:55:06 -0000 1.24 --- XPathQueryTest.java 30 May 2005 15:53:49 -0000 1.25 *************** *** 66,73 **** "<!ATTLIST a ref IDREF #IMPLIED>" + "<!ATTLIST b id ID #IMPLIED>]>" + ! "<test>" + "<a ref=\"id1\"/>" + "<a ref=\"id1\"/>" + "<b id=\"id1\"><name>one</name></b>" + "</test>"; --- 66,75 ---- "<!ATTLIST a ref IDREF #IMPLIED>" + "<!ATTLIST b id ID #IMPLIED>]>" + ! "<test xml:space=\"preserve\">" + "<a ref=\"id1\"/>" + "<a ref=\"id1\"/>" + + "<d ref=\"id2\"/>" + "<b id=\"id1\"><name>one</name></b>" + + "<c xml:id=\" id2 \"><name>two</name></c>" + "</test>"; *************** *** 358,361 **** --- 360,367 ---- Resource r = result.getResource(0); assertEquals("<name>one</name>", r.getContent().toString()); + + result = queryResource(service, "ids.xml", "//d/id(@ref)/name", 1); + r = result.getResource(0); + assertEquals("<name>two</name>", r.getContent().toString()); } catch (XMLDBException e) { System.out.println("testIds(): XMLDBException: "+e); |
|
From: Wolfgang M. M. <wol...@us...> - 2005-05-30 15:54:00
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29665/src/org/exist Modified Files: Indexer.java Log Message: Added preliminary support for xml:id attributes. Index: Indexer.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/Indexer.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Indexer.java 30 May 2005 09:41:24 -0000 1.23 --- Indexer.java 30 May 2005 15:53:50 -0000 1.24 *************** *** 47,51 **** --- 47,54 ---- import org.exist.util.Configuration; import org.exist.util.ProgressIndicator; + import org.exist.util.XMLChar; import org.exist.util.XMLString; + import org.exist.xquery.XQueryContext; + import org.exist.xquery.value.StringValue; import org.w3c.dom.Element; import org.xml.sax.Attributes; *************** *** 408,412 **** String name, String qname, ! Attributes attributes) { // calculate number of real attributes: // don't store namespace declarations --- 411,415 ---- String name, String qname, ! Attributes attributes) throws SAXException { // calculate number of real attributes: // don't store namespace declarations *************** *** 523,528 **** attr.setValue(attributes.getValue(i)); attr.setOwnerDocument(document); ! if (attributes.getType(i).equals("ID")) attr.setType(AttrImpl.ID); node.appendChildInternal(attr); if (!validate) --- 526,538 ---- attr.setValue(attributes.getValue(i)); attr.setOwnerDocument(document); ! if (attributes.getType(i).equals("ID")) { attr.setType(AttrImpl.ID); + } else if (attrNS.equals(XQueryContext.XML_NS)) { + // an xml:id attribute. Normalize the attribute and set its type to ID + attr.setValue(StringValue.trimWhitespace(StringValue.collapseWhitespace(attr.getValue()))); + if (!XMLChar.isValidNCName(attr.getValue())) + throw new SAXException("Value of xml:id attribute is not a valid NCName: " + attr.getValue()); + attr.setType(AttrImpl.ID); + } node.appendChildInternal(attr); if (!validate) |
|
From: Wolfgang M. M. <wol...@us...> - 2005-05-30 14:49:09
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29156/src/org/exist/util Modified Files: XMLChar.java Log Message: * Regular expression syntax does now follow the extended XML Schema syntax defined in the functions spec. * Added missing functions: codepoints-to-string and string-to-codepoints Index: XMLChar.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/util/XMLChar.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** XMLChar.java 6 Jan 2004 14:10:18 -0000 1.1 --- XMLChar.java 30 May 2005 14:48:59 -0000 1.2 *************** *** 436,440 **** } ! /** * Returns true if the specified character is valid. This method --- 436,446 ---- } ! /** ! * Return whether a given char (codepoint) is a surrogate (high or low) ! */ ! static public boolean isSurrogate(char c) { ! return (c & 0xF800) == 0xD800; ! } ! /** * Returns true if the specified character is valid. This method |
|
From: Wolfgang M. M. <wol...@us...> - 2005-05-30 14:47:48
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28422/src/org/exist/xquery/functions Modified Files: FunMatches.java FunTokenize.java FunReplace.java ExtRegexp.java ModuleImpl.java Added Files: FunCodepointsToString.java FunStringToCodepoints.java Log Message: * Regular expression syntax does now follow the extended XML Schema syntax defined in the functions spec. * Added missing functions: codepoints-to-string and string-to-codepoints Index: FunMatches.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions/FunMatches.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** FunMatches.java 27 May 2005 19:25:29 -0000 1.11 --- FunMatches.java 30 May 2005 14:47:36 -0000 1.12 *************** *** 44,47 **** --- 44,49 ---- import org.exist.xquery.XPathException; import org.exist.xquery.XQueryContext; + import org.exist.xquery.util.RegexTranslator; + import org.exist.xquery.util.RegexTranslator.RegexSyntaxException; import org.exist.xquery.value.BooleanValue; import org.exist.xquery.value.Item; *************** *** 161,165 **** */ private Sequence evalWithIndex(Sequence contextSequence, Item contextItem, Sequence input) throws XPathException { ! String pattern = getArgument(1).eval(contextSequence, contextItem).getStringValue(); NodeSet nodes = input.toNodeSet(); --- 163,167 ---- */ private Sequence evalWithIndex(Sequence contextSequence, Item contextItem, Sequence input) throws XPathException { ! String pattern = translateRegexp(getArgument(1).eval(contextSequence, contextItem).getStringValue()); NodeSet nodes = input.toNodeSet(); *************** *** 195,198 **** --- 197,219 ---- } + /** + * Translates the regular expression from XPath2 syntax to java regex + * syntax. + * + * @param pattern + * @return + * @throws XPathException + */ + protected String translateRegexp(String pattern) throws XPathException { + // convert pattern to Java regex syntax + try { + pattern = RegexTranslator.translate(pattern, true); + } catch (RegexSyntaxException e) { + throw new XPathException(getASTNode(), "Conversion from XPath2 to Java regular expression " + + "syntax failed: " + e.getMessage(), e); + } + return pattern; + } + /** * @param contextSequence *************** *** 204,208 **** private Sequence evalGeneric(Sequence contextSequence, Item contextItem, Sequence stringArg) throws XPathException { String string = stringArg.getStringValue(); ! String pattern = getArgument(1).eval(contextSequence, contextItem).getStringValue(); int flags = 0; --- 225,229 ---- private Sequence evalGeneric(Sequence contextSequence, Item contextItem, Sequence stringArg) throws XPathException { String string = stringArg.getStringValue(); ! String pattern = translateRegexp(getArgument(1).eval(contextSequence, contextItem).getStringValue()); int flags = 0; Index: ExtRegexp.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions/ExtRegexp.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ExtRegexp.java 2 Nov 2004 22:03:13 -0000 1.10 --- ExtRegexp.java 30 May 2005 14:47:36 -0000 1.11 *************** *** 40,43 **** --- 40,45 ---- import org.exist.xquery.XQueryContext; import org.exist.xquery.XPathException; + import org.exist.xquery.util.RegexTranslator; + import org.exist.xquery.util.RegexTranslator.RegexSyntaxException; import org.exist.xquery.value.Item; import org.exist.xquery.value.Sequence; *************** *** 191,198 **** seq = next.eval(contextSequence); if(seq.getLength() == 1) ! terms.add(seq.itemAt(0).getStringValue()); else { for(SequenceIterator it = seq.iterate(); it.hasNext(); ) { ! terms.add(it.nextItem().getStringValue()); } } --- 193,200 ---- seq = next.eval(contextSequence); if(seq.getLength() == 1) ! terms.add(translateRegexp(seq.itemAt(0).getStringValue())); else { for(SequenceIterator it = seq.iterate(); it.hasNext(); ) { ! terms.add(translateRegexp(it.nextItem().getStringValue())); } } *************** *** 218,220 **** --- 220,241 ---- cached = null; } + + /** + * Translates the regular expression from XPath2 syntax to java regex + * syntax. + * + * @param pattern + * @return + * @throws XPathException + */ + protected String translateRegexp(String pattern) throws XPathException { + // convert pattern to Java regex syntax + try { + pattern = RegexTranslator.translate(pattern, true); + } catch (RegexSyntaxException e) { + throw new XPathException(getASTNode(), "Conversion from XPath2 to Java regular expression " + + "syntax failed: " + e.getMessage(), e); + } + return pattern; + } } Index: FunReplace.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions/FunReplace.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** FunReplace.java 27 May 2005 19:25:29 -0000 1.5 --- FunReplace.java 30 May 2005 14:47:36 -0000 1.6 *************** *** 86,90 **** String string = stringArg.getStringValue(); String pattern = ! getArgument(1).eval(contextSequence, contextItem).getStringValue(); String replace = getArgument(2).eval(contextSequence, contextItem).getStringValue(); --- 86,90 ---- String string = stringArg.getStringValue(); String pattern = ! translateRegexp(getArgument(1).eval(contextSequence, contextItem).getStringValue()); String replace = getArgument(2).eval(contextSequence, contextItem).getStringValue(); Index: ModuleImpl.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions/ModuleImpl.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ModuleImpl.java 24 Apr 2005 13:55:06 -0000 1.14 --- ModuleImpl.java 30 May 2005 14:47:36 -0000 1.15 *************** *** 42,45 **** --- 42,46 ---- new FunctionDef(FunBoolean.signature, FunBoolean.class), new FunctionDef(FunCeiling.signature, FunCeiling.class), + new FunctionDef(FunCodepointsToString.signature, FunCodepointsToString.class), new FunctionDef(FunConcat.signature, FunConcat.class), new FunctionDef(FunContains.signatures[0], FunContains.class), *************** *** 131,134 **** --- 132,136 ---- new FunctionDef(FunStringJoin.signature, FunStringJoin.class), new FunctionDef(FunStringPad.signature, FunStringPad.class), + new FunctionDef(FunStringToCodepoints.signature, FunStringToCodepoints.class), new FunctionDef(FunStrLength.signatures[0], FunStrLength.class), new FunctionDef(FunStrLength.signatures[1], FunStrLength.class), --- NEW FILE: FunStringToCodepoints.java --- /* * eXist Open Source Native XML Database * Copyright (C) 2001-04 The eXist Team * * http://exist-db.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: FunStringToCodepoints.java,v 1.1 2005/05/30 14:47:36 wolfgang_m Exp $ */ package org.exist.xquery.functions; import org.exist.dom.QName; import org.exist.xquery.BasicFunction; import org.exist.xquery.Cardinality; import org.exist.xquery.FunctionSignature; import org.exist.xquery.XPathException; import org.exist.xquery.XQueryContext; import org.exist.xquery.value.IntegerValue; import org.exist.xquery.value.Sequence; import org.exist.xquery.value.SequenceType; import org.exist.xquery.value.Type; import org.exist.xquery.value.ValueSequence; public class FunStringToCodepoints extends BasicFunction { public final static FunctionSignature signature = new FunctionSignature( new QName("string-to-codepoints", ModuleImpl.NAMESPACE_URI, ModuleImpl.PREFIX), "Returns the sequence of code points that constitute an xs:string. If $a is a zero-length " + "string or the empty sequence, the empty sequence is returned.", new SequenceType[] { new SequenceType(Type.STRING, Cardinality.ZERO_OR_ONE), }, new SequenceType(Type.INTEGER, Cardinality.ZERO_OR_MORE)); public FunStringToCodepoints(XQueryContext context) { super(context, signature); } public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathException { if (args[0].getLength() == 0) return Sequence.EMPTY_SEQUENCE; String s = args[0].getStringValue(); ValueSequence codepoints = new ValueSequence(); int ch; IntegerValue next; for (int i = 0; i < s.length(); i++) { ch = s.charAt(i); if (ch >= 55296 && ch <= 56319) { // we'll trust the data to be sound next = new IntegerValue(((ch - 55296) * 1024) + ((int) s.charAt(i++) - 56320) + 65536); } else { next = new IntegerValue(ch); } codepoints.add(next); } return codepoints; } } Index: FunTokenize.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions/FunTokenize.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** FunTokenize.java 27 May 2005 19:25:29 -0000 1.6 --- FunTokenize.java 30 May 2005 14:47:36 -0000 1.7 *************** *** 85,89 **** String string = stringArg.getStringValue(); String pattern = ! getArgument(1).eval(contextSequence, contextItem).getStringValue(); int flags = 0; if (getSignature().getArgumentCount() == 3) --- 85,90 ---- String string = stringArg.getStringValue(); String pattern = ! translateRegexp(getArgument(1).eval(contextSequence, contextItem).getStringValue()); ! int flags = 0; if (getSignature().getArgumentCount() == 3) --- NEW FILE: FunCodepointsToString.java --- /* * eXist Open Source Native XML Database * Copyright (C) 2001-04 The eXist Team * * http://exist-db.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: FunCodepointsToString.java,v 1.1 2005/05/30 14:47:36 wolfgang_m Exp $ */ package org.exist.xquery.functions; import org.exist.dom.QName; import org.exist.util.XMLChar; import org.exist.xquery.BasicFunction; import org.exist.xquery.Cardinality; import org.exist.xquery.FunctionSignature; import org.exist.xquery.XPathException; import org.exist.xquery.XQueryContext; import org.exist.xquery.value.NumericValue; import org.exist.xquery.value.Sequence; import org.exist.xquery.value.SequenceIterator; import org.exist.xquery.value.SequenceType; import org.exist.xquery.value.StringValue; import org.exist.xquery.value.Type; public class FunCodepointsToString extends BasicFunction { public final static FunctionSignature signature = new FunctionSignature( new QName("codepoints-to-string", ModuleImpl.NAMESPACE_URI, ModuleImpl.PREFIX), "Creates an xs:string from a sequence of code points. Returns the zero-length string if " + "$a is the empty sequence. If any of the code points in $a is not a legal XML character, " + "an error is raised", new SequenceType[] { new SequenceType(Type.INTEGER, Cardinality.ZERO_OR_MORE), }, new SequenceType(Type.STRING, Cardinality.EXACTLY_ONE)); public FunCodepointsToString(XQueryContext context) { super(context, signature); } public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathException { if (args[0].getLength() == 0) return StringValue.EMPTY_STRING; StringBuffer buf = new StringBuffer(); long next; for (SequenceIterator i = args[0].iterate(); i.hasNext(); ) { next = ((NumericValue)i.nextItem()).getLong(); if (next > Integer.MAX_VALUE || !XMLChar.isValid((int)next)) { throw new XPathException(getASTNode(), "Codepoint " + next + " is not a valid " + "character."); } if (next<65536) { buf.append((char)next); } else { // output a surrogate pair buf.append(XMLChar.highSurrogate((int)next)); buf.append(XMLChar.lowSurrogate((int)next)); } } return new StringValue(buf.toString()); } } |
|
From: Wolfgang M. M. <wol...@us...> - 2005-05-30 14:47:15
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28068/src/org/exist/xquery/util Added Files: RegexTranslator.java Log Message: * Regular expression syntax does now follow the extended XML Schema syntax defined in the functions spec. * Added missing functions: codepoints-to-string and string-to-codepoints --- NEW FILE: RegexTranslator.java --- package org.exist.xquery.util; import java.math.BigDecimal; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.Vector; import org.exist.util.XMLChar; /** * This class translates XML Schema regex syntax into JDK 1.4 regex syntax. * Copied from Saxon package net.sf.saxon.type without change. The original * author is James Clark. See license. */ public class RegexTranslator { /** [...1641 lines suppressed...] } // // The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License"); // you may not use this file except in compliance with the License. You may obtain a copy of the // License at http://www.mozilla.org/MPL/ // // Software distributed under the License is distributed on an "AS IS" basis, // WITHOUT WARRANTY OF ANY KIND, either express or implied. // See the License for the specific language governing rights and limitations under the License. // // The Original Code is: all this file except changes marked. // // The Initial Developer of the Original Code is James Clark // // Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved. // // Contributor(s): Michael Kay // |
|
From: Jean-Marc V. <jm...@us...> - 2005-05-30 11:57:52
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5606/src/org/exist/xquery/test Modified Files: ValueIndexByQNameTest.java Log Message: add test for attribute index and mixed content Index: ValueIndexByQNameTest.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/test/ValueIndexByQNameTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ValueIndexByQNameTest.java 30 May 2005 08:53:55 -0000 1.1 --- ValueIndexByQNameTest.java 30 May 2005 11:57:38 -0000 1.2 *************** *** 3,8 **** package org.exist.xquery.test; - import org.xmldb.api.base.Resource; - import org.xmldb.api.base.ResourceSet; import org.xmldb.api.modules.XPathQueryService; --- 3,6 ---- *************** *** 12,16 **** public class ValueIndexByQNameTest extends ValueIndexTest { ! private String CONFIG = "<collection xmlns=\"http://exist-db.org/collection-config/1.0\">" + " <index xmlns:x=\"http://www.foo.com\" xmlns:xx=\"http://test.com\">" + --- 10,14 ---- public class ValueIndexByQNameTest extends ValueIndexTest { ! private String config = "<collection xmlns=\"http://exist-db.org/collection-config/1.0\">" + " <index xmlns:x=\"http://www.foo.com\" xmlns:xx=\"http://test.com\">" + *************** *** 19,23 **** " <include path=\"//item/mixed\"/>" + " </fulltext>" + ! // " <create path=\"//item/itemno\" type=\"xs:integer\"/>" + // " <create-by-qname qname=\"//item/name\" type=\"xs:string\"/>" + --- 17,21 ---- " <include path=\"//item/mixed\"/>" + " </fulltext>" + ! " <create qname=\"itemno\" type=\"xs:integer\"/>" + // " <create-by-qname qname=\"//item/name\" type=\"xs:string\"/>" + *************** *** 28,69 **** // " <create path=\"//item/price/@specialprice\" type=\"xs:boolean\"/>" + // " <create path=\"//item/x:rating\" type=\"xs:double\"/>" + ! // " <create path=\"//item/@xx:test\" type=\"xs:integer\"/>" + ! // " <create path=\"//item/mixed\" type=\"xs:string\"/>" + " </index>" + "</collection>"; ! /** ? @see org.exist.xquery.test.ValueIndexTest#testStrings() ! */ public void testStrings() throws Exception { configureCollection(); XPathQueryService service = storeXMLFileAndGetQueryService("items.xml", "src/org/exist/xquery/test/items.xml"); ! ! // queryResource(service, "items.xml", "//item[name = 'Racing Bicycle']", 1); queryResource(service, "items.xml", ! "util:qname-index-lookup( xs:QName('name'), 'Racing Bicycle' ) " , 1 ); ! // "util:qname-index-lookup( xs:QName('name'), 'Racing Bicycle' ) / parent::item" , 1 ); - // queryResource(service, "items.xml", "//item[name > 'Racing Bicycle']", 4); - // queryResource(service, "items.xml", "//item[itemno = 3]", 1); - // ResourceSet result = queryResource(service, "items.xml", "for $i in //item[stock <= 10] return $i/itemno", 5); - // for (long i = 0; i < result.getSize(); i++) { - // Resource res = result.getResource(i); - // System.out.println(res.getContent()); - // } - // - // queryResource(service, "items.xml", "//item[stock > 20]", 1); - // queryResource(service, "items.xml", "declare namespace x=\"http://www.foo.com\"; //item[x:rating > 8.0]", 2); - // queryResource(service, "items.xml", "declare namespace xx=\"http://test.com\"; //item[@xx:test = 123]", 1); // queryResource(service, "items.xml", "//item[name &= 'Racing Bicycle']", 1); // queryResource(service, "items.xml", "//item[mixed = 'uneven']", 1); ! // queryResource(service, "items.xml", "//item[mixed = 'external']", 1); // queryResource(service, "items.xml", "//item[fn:matches(mixed, 'un.*')]", 2); } ! /** ? @see org.exist.xquery.test.ValueIndexTest#getCollectionConfig() ! */ protected String getCollectionConfig() { ! return CONFIG; } - } --- 26,59 ---- // " <create path=\"//item/price/@specialprice\" type=\"xs:boolean\"/>" + // " <create path=\"//item/x:rating\" type=\"xs:double\"/>" + ! " <create qname='xx:test' type='xs:integer' />" + ! " <create path='mixed' type='xs:string' />" + " </index>" + "</collection>"; ! /** @see org.exist.xquery.test.ValueIndexTest#testStrings() */ public void testStrings() throws Exception { configureCollection(); XPathQueryService service = storeXMLFileAndGetQueryService("items.xml", "src/org/exist/xquery/test/items.xml"); ! ! // queryResource(service, "items.xml", "//item[name > 'Racing Bicycle']", 4 ); ! ! queryResource(service, "items.xml", ! "util:qname-index-lookup( xs:QName('name'), 'Racing Bicycle' ) / parent::item" , 1 ); ! queryResource(service, "items.xml", ! "util:qname-index-lookup( xs:QName('itemno'), 3) / parent::item", 1); queryResource(service, "items.xml", ! "declare namespace xx='http://test.com'; " + ! "util:qname-index-lookup( xs:QName('xx:test'), 123) ", 1); // queryResource(service, "items.xml", "//item[name &= 'Racing Bicycle']", 1); // queryResource(service, "items.xml", "//item[mixed = 'uneven']", 1); ! queryResource(service, "items.xml", ! "util:qname-index-lookup( xs:QName('mixed'), 'external' )", 1); // queryResource(service, "items.xml", "//item[fn:matches(mixed, 'un.*')]", 2); } ! /** @see org.exist.xquery.test.ValueIndexTest#getCollectionConfig() */ protected String getCollectionConfig() { ! return config; } } |
|
From: Wolfgang M. M. <wol...@us...> - 2005-05-30 10:03:27
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/dom In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8508/src/org/exist/dom Modified Files: ElementImpl.java Log Message: Fixed: indexer needs to track the element content if a qname-value index is set. Index: ElementImpl.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/dom/ElementImpl.java,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** ElementImpl.java 29 May 2005 19:51:30 -0000 1.63 --- ElementImpl.java 30 May 2005 10:03:12 -0000 1.64 *************** *** 1349,1353 **** if (idxSpec != null) { GeneralRangeIndexSpec spec = idxSpec.getIndexByPath(currentPath); ! if (spec != null) { NodeProxy p = new NodeProxy(node.ownerDocument, node.gid, node.internalAddress); content = ownerDocument.broker.getNodeValue(p, false); --- 1349,1354 ---- if (idxSpec != null) { GeneralRangeIndexSpec spec = idxSpec.getIndexByPath(currentPath); ! RangeIndexSpec qnIdx = idxSpec.getIndexByQName(node.getQName()); ! if (spec != null || qnIdx != null) { NodeProxy p = new NodeProxy(node.ownerDocument, node.gid, node.internalAddress); content = ownerDocument.broker.getNodeValue(p, false); |
|
From: Wolfgang M. M. <wol...@us...> - 2005-05-30 09:42:10
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29618/src/org/exist/storage Modified Files: NativeBroker.java RangeIndexSpec.java Log Message: Fixed: indexer needs to track the element content if a qname-value index is set. Index: RangeIndexSpec.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/RangeIndexSpec.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RangeIndexSpec.java 29 May 2005 19:51:29 -0000 1.1 --- RangeIndexSpec.java 30 May 2005 09:41:47 -0000 1.2 *************** *** 42,48 **** public static final int FLOAT = 4; public static final int BOOLEAN = 5; public static final int MIXED_CONTENT = 0x40; public static final int TEXT = 0x80; ! public static final int RANGE_INDEX_MASK = 0x3F; private static final int[] xpathTypes = { --- 42,68 ---- public static final int FLOAT = 4; public static final int BOOLEAN = 5; + + /** + * Indicates that the node has a qname-value index defined + * on it. + */ + public static final int QNAME_INDEX = 0x20; + + /** + * Bit is set if the node has mixed content. + */ public static final int MIXED_CONTENT = 0x40; + + /** + * Bit is set if the node is fulltext indexed. + */ public static final int TEXT = 0x80; ! ! /** ! * Bit mask to extract the type of the range index. ! */ ! public static final int RANGE_INDEX_MASK = 0x1F; ! ! public static final int HAS_VALUE_INDEX_MASK = 0x3F; private static final int[] xpathTypes = { *************** *** 120,123 **** --- 140,151 ---- } + public static final boolean hasQNameIndex(int type) { + return (type & QNAME_INDEX) != 0; + } + + public static final boolean hasQNameOrValueIndex(int type) { + return (type & HAS_VALUE_INDEX_MASK) > 0; + } + protected int type; Index: NativeBroker.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/NativeBroker.java,v retrieving revision 1.149 retrieving revision 1.150 diff -C2 -d -r1.149 -r1.150 *** NativeBroker.java 29 May 2005 19:51:29 -0000 1.149 --- NativeBroker.java 30 May 2005 09:41:47 -0000 1.150 *************** *** 982,985 **** --- 982,989 ---- if(spec != null) indexType = spec.getIndexType(); + RangeIndexSpec qnIdx = idxSpec.getIndexByQName(node.getQName()); + if (qnIdx != null && qnameValueIndexation) { + indexType |= RangeIndexSpec.QNAME_INDEX; + } } if(ftIdx == null || currentPath == null || ftIdx.match(currentPath)) *************** *** 1196,1199 **** --- 1200,1207 ---- if(spec != null) indexType = spec.getIndexType(); + RangeIndexSpec qnIdx = idxSpec.getIndexByQName(node.getQName()); + if (qnIdx != null && qnameValueIndexation) { + indexType |= RangeIndexSpec.QNAME_INDEX; + } } if(ftIdx == null || currentPath == null || ftIdx.match(currentPath)) *************** *** 2597,2600 **** --- 2605,2612 ---- if(spec != null) indexType = spec.getIndexType(); + RangeIndexSpec qnIdx = idxSpec.getIndexByQName(node.getQName()); + if (qnIdx != null && qnameValueIndexation) { + indexType |= RangeIndexSpec.QNAME_INDEX; + } } if(ftIdx == null || currentPath == null || ftIdx.match(currentPath)) *************** *** 2697,2707 **** } ! if ( qnameValueIndexation && idxSpec != null ) { RangeIndexSpec qnIdx = idxSpec.getIndexByQName(node.getQName()); ! if (qnIdx != null) { ! qnameValueIndex.setDocument(doc); ! qnameValueIndex.storeElement(RangeIndexSpec.indexTypeToXPath(indexType), (ElementImpl) node, content.toString()); - } } --- 2709,2719 ---- } ! if ( RangeIndexSpec.hasQNameIndex(indexType) ) { RangeIndexSpec qnIdx = idxSpec.getIndexByQName(node.getQName()); ! if (content == null) ! content = getNodeValue(tempProxy, false); ! qnameValueIndex.setDocument(doc); ! qnameValueIndex.storeElement(qnIdx.getType(), (ElementImpl) node, content.toString()); } |
|
From: Wolfgang M. M. <wol...@us...> - 2005-05-30 09:41:36
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29392/src/org/exist Modified Files: Indexer.java Log Message: Fixed: indexer needs to track the element content if a qname-value index is set. Index: Indexer.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/Indexer.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Indexer.java 29 May 2005 19:51:30 -0000 1.22 --- Indexer.java 30 May 2005 09:41:24 -0000 1.23 *************** *** 245,249 **** XMLString elemContent = null; ! if (GeneralRangeIndexSpec.hasRangeIndex(last.getIndexType())) { elemContent = (XMLString) nodeContentStack.pop(); } --- 245,249 ---- XMLString elemContent = null; ! if (GeneralRangeIndexSpec.hasQNameOrValueIndex(last.getIndexType())) { elemContent = (XMLString) nodeContentStack.pop(); } *************** *** 559,563 **** broker.store(node, currentPath); node.setChildCount(0); ! if (GeneralRangeIndexSpec.hasRangeIndex(node.getIndexType())) { XMLString contentBuf = new XMLString(); nodeContentStack.push(contentBuf); --- 559,563 ---- broker.store(node, currentPath); node.setChildCount(0); ! if (GeneralRangeIndexSpec.hasQNameOrValueIndex(node.getIndexType())) { XMLString contentBuf = new XMLString(); nodeContentStack.push(contentBuf); |
|
From: Jean-Marc V. <jm...@us...> - 2005-05-30 08:54:15
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4323/src/org/exist/xquery/test Modified Files: ValueIndexTest.java Added Files: ValueIndexByQNameTest.java Log Message: basic test for the new index by qname --- NEW FILE: ValueIndexByQNameTest.java --- /* Created on 30 mai 2005 $Id: ValueIndexByQNameTest.java,v 1.1 2005/05/30 08:53:55 jmvanel Exp $ */ package org.exist.xquery.test; import org.xmldb.api.base.Resource; import org.xmldb.api.base.ResourceSet; import org.xmldb.api.modules.XPathQueryService; /** * @author Jean-Marc Vanel http://jmvanel.free.fr/ */ public class ValueIndexByQNameTest extends ValueIndexTest { private String CONFIG = "<collection xmlns=\"http://exist-db.org/collection-config/1.0\">" + " <index xmlns:x=\"http://www.foo.com\" xmlns:xx=\"http://test.com\">" + " <fulltext default=\"none\">" + " <include path=\"//item/name\"/>" + " <include path=\"//item/mixed\"/>" + " </fulltext>" + // " <create path=\"//item/itemno\" type=\"xs:integer\"/>" + // " <create-by-qname qname=\"//item/name\" type=\"xs:string\"/>" + " <create qname=\"name\" type=\"xs:string\"/>" + // " <create path=\"//item/stock\" type=\"xs:integer\"/>" + // " <create path=\"//item/price\" type=\"xs:double\"/>" + // " <create path=\"//item/price/@specialprice\" type=\"xs:boolean\"/>" + // " <create path=\"//item/x:rating\" type=\"xs:double\"/>" + // " <create path=\"//item/@xx:test\" type=\"xs:integer\"/>" + // " <create path=\"//item/mixed\" type=\"xs:string\"/>" + " </index>" + "</collection>"; /** ? @see org.exist.xquery.test.ValueIndexTest#testStrings() */ public void testStrings() throws Exception { configureCollection(); XPathQueryService service = storeXMLFileAndGetQueryService("items.xml", "src/org/exist/xquery/test/items.xml"); // queryResource(service, "items.xml", "//item[name = 'Racing Bicycle']", 1); queryResource(service, "items.xml", "util:qname-index-lookup( xs:QName('name'), 'Racing Bicycle' ) " , 1 ); // "util:qname-index-lookup( xs:QName('name'), 'Racing Bicycle' ) / parent::item" , 1 ); // queryResource(service, "items.xml", "//item[name > 'Racing Bicycle']", 4); // queryResource(service, "items.xml", "//item[itemno = 3]", 1); // ResourceSet result = queryResource(service, "items.xml", "for $i in //item[stock <= 10] return $i/itemno", 5); // for (long i = 0; i < result.getSize(); i++) { // Resource res = result.getResource(i); // System.out.println(res.getContent()); // } // // queryResource(service, "items.xml", "//item[stock > 20]", 1); // queryResource(service, "items.xml", "declare namespace x=\"http://www.foo.com\"; //item[x:rating > 8.0]", 2); // queryResource(service, "items.xml", "declare namespace xx=\"http://test.com\"; //item[@xx:test = 123]", 1); // queryResource(service, "items.xml", "//item[name &= 'Racing Bicycle']", 1); // queryResource(service, "items.xml", "//item[mixed = 'uneven']", 1); // queryResource(service, "items.xml", "//item[mixed = 'external']", 1); // queryResource(service, "items.xml", "//item[fn:matches(mixed, 'un.*')]", 2); } /** ? @see org.exist.xquery.test.ValueIndexTest#getCollectionConfig() */ protected String getCollectionConfig() { return CONFIG; } } Index: ValueIndexTest.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/test/ValueIndexTest.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ValueIndexTest.java 27 May 2005 19:26:21 -0000 1.10 --- ValueIndexTest.java 30 May 2005 08:53:55 -0000 1.11 *************** *** 45,49 **** private final static String URI = "xmldb:exist:///db"; ! private final static String CONFIG = "<collection xmlns=\"http://exist-db.org/collection-config/1.0\">" + " <index xmlns:x=\"http://www.foo.com\" xmlns:xx=\"http://test.com\">" + --- 45,49 ---- private final static String URI = "xmldb:exist:///db"; ! private String CONFIG = "<collection xmlns=\"http://exist-db.org/collection-config/1.0\">" + " <index xmlns:x=\"http://www.foo.com\" xmlns:xx=\"http://test.com\">" + *************** *** 79,85 **** assertNotNull(testCollection); - IndexQueryService idxConf = (IndexQueryService) - testCollection.getService("IndexQueryService", "1.0"); - idxConf.configureCollection(CONFIG); } catch (ClassNotFoundException e) { } catch (InstantiationException e) { --- 79,82 ---- *************** *** 90,94 **** --- 87,101 ---- } + /** + * @throws XMLDBException + */ + protected void configureCollection() throws XMLDBException { + IndexQueryService idxConf = (IndexQueryService) + testCollection.getService("IndexQueryService", "1.0"); + idxConf.configureCollection(getCollectionConfig()); + } + public void testStrings() throws Exception { + configureCollection(); XPathQueryService service = storeXMLFileAndGetQueryService("items.xml", "src/org/exist/xquery/test/items.xml"); *************** *** 138,142 **** } ! private ResourceSet queryResource(XPathQueryService service, String resource, String query, int expected) throws XMLDBException { return queryResource(service, resource, query, expected, null); --- 145,149 ---- } ! protected ResourceSet queryResource(XPathQueryService service, String resource, String query, int expected) throws XMLDBException { return queryResource(service, resource, query, expected, null); *************** *** 162,166 **** * @throws XMLDBException */ ! private XPathQueryService storeXMLFileAndGetQueryService( String documentName, String path) throws XMLDBException { XMLResource doc = (XMLResource) testCollection.createResource( --- 169,173 ---- * @throws XMLDBException */ ! protected XPathQueryService storeXMLFileAndGetQueryService( String documentName, String path) throws XMLDBException { XMLResource doc = (XMLResource) testCollection.createResource( *************** *** 177,179 **** --- 184,200 ---- junit.textui.TestRunner.run(ValueIndexTest.class); } + + /** + * @param cONFIG The cONFIG to set. + */ + protected void setCollectionConfig(String cONFIG) { + CONFIG = cONFIG; + } + + /** + * @return Returns the cONFIG. + */ + protected String getCollectionConfig() { + return CONFIG; + } } \ No newline at end of file |
|
From: Giulio V. <gva...@us...> - 2005-05-30 08:30:30
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/webstart In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25513/src/org/exist/webstart Modified Files: JnlpHelper.java Log Message: Change _startUrl = _existBaseUrl.replace("http:", "xmldb:exist:") + "/xmlrpc"; into _startUrl = _existBaseUrl.replaceFirst("http:", "xmldb:exist:") + "/xmlrpc"; Index: JnlpHelper.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/webstart/JnlpHelper.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JnlpHelper.java 29 May 2005 15:11:33 -0000 1.1 --- JnlpHelper.java 30 May 2005 08:30:20 -0000 1.2 *************** *** 70,75 **** _href = _currentUrl.substring(position+1); ! // Find URL to connect to with client ! _startUrl = _existBaseUrl.replace("http:", "xmldb:exist:") + "/xmlrpc"; } --- 70,75 ---- _href = _currentUrl.substring(position+1); ! // Find URL to connect to with client ! _startUrl = _existBaseUrl.replaceFirst("http:", "xmldb:exist:") + "/xmlrpc"; } |
|
From: Wolfgang M. M. <wol...@us...> - 2005-05-29 21:49:55
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28958/src/org/exist/storage Modified Files: NativeValueIndexByQName.java Log Message: Use 2-byte short for namespaceId and localNameId. Using just 1 byte is definitely not enough. Index: NativeValueIndexByQName.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/NativeValueIndexByQName.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** NativeValueIndexByQName.java 29 May 2005 19:51:29 -0000 1.11 --- NativeValueIndexByQName.java 29 May 2005 21:49:47 -0000 1.12 *************** *** 21,25 **** package org.exist.storage; - import java.io.EOFException; import java.io.IOException; import java.util.Iterator; --- 21,24 ---- *************** *** 27,45 **** import org.apache.log4j.Logger; import org.dbxml.core.data.Value; - import org.dbxml.core.filer.BTreeCallback; import org.dbxml.core.filer.BTreeException; import org.dbxml.core.indexer.IndexQuery; import org.exist.collections.Collection; import org.exist.dom.AttrImpl; - import org.exist.dom.DocumentImpl; import org.exist.dom.DocumentSet; import org.exist.dom.ElementImpl; import org.exist.dom.ExtArrayNodeSet; import org.exist.dom.NodeImpl; - import org.exist.dom.NodeProxy; import org.exist.dom.NodeSet; import org.exist.dom.QName; import org.exist.dom.SymbolTable; - import org.exist.storage.io.VariableByteInput; import org.exist.storage.store.BFile; import org.exist.util.ByteConversion; --- 26,40 ---- *************** *** 166,170 **** * (collectionId, qname, indexType, indexData) */ public byte[] serialize(short collectionId, boolean caseSensitive) { ! final byte[] data = indexable.serializeValue(4, caseSensitive); ByteConversion.shortToByte(collectionId, data, 0); serializeQName(data, 2 ); --- 161,165 ---- * (collectionId, qname, indexType, indexData) */ public byte[] serialize(short collectionId, boolean caseSensitive) { ! final byte[] data = indexable.serializeValue(6, caseSensitive); ByteConversion.shortToByte(collectionId, data, 0); serializeQName(data, 2 ); *************** *** 177,182 **** short namespaceId = symbols.getNSSymbol(qname.getNamespaceURI()); short localNameId = symbols.getSymbol(qname.getLocalName()); ! data[offset] = (byte)namespaceId; ! data[offset+1] = (byte)localNameId; } --- 172,177 ---- short namespaceId = symbols.getNSSymbol(qname.getNamespaceURI()); short localNameId = symbols.getSymbol(qname.getLocalName()); ! ByteConversion.shortToByte(namespaceId, data, offset); ! ByteConversion.shortToByte(localNameId, data, offset + 2); } |
|
From: Jean-Marc V. <jm...@us...> - 2005-05-29 20:14:46
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10461/src/org/exist/xquery Modified Files: Constants.java Log Message: transform plain comments in javadoc Index: Constants.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/Constants.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Constants.java 21 May 2005 10:30:41 -0000 1.4 --- Constants.java 29 May 2005 20:14:36 -0000 1.5 *************** *** 49,57 **** }; ! /* * XPath axis constants: ! */ ! ! // Reverse axes public final static int ANCESTOR_AXIS = 0; public final static int ANCESTOR_SELF_AXIS = 1; --- 49,57 ---- }; ! /** * XPath axis constants: ! * ! <br> ! * Reverse axes */ public final static int ANCESTOR_AXIS = 0; public final static int ANCESTOR_SELF_AXIS = 1; *************** *** 60,64 **** public final static int PRECEDING_SIBLING_AXIS = 4; ! // Forward axes public final static int CHILD_AXIS = 5; public final static int ATTRIBUTE_AXIS = 6; --- 60,64 ---- public final static int PRECEDING_SIBLING_AXIS = 4; ! /** Forward axes */ public final static int CHILD_AXIS = 5; public final static int ATTRIBUTE_AXIS = 6; *************** *** 86,90 **** public final static short TYPE_UNKNOWN = -1; ! /* * Node types */ --- 86,90 ---- public final static short TYPE_UNKNOWN = -1; ! /** * Node types */ *************** *** 99,103 **** public final static int PROCESSING_NODE = 7; ! /* * Comparison operators */ --- 99,103 ---- public final static int PROCESSING_NODE = 7; ! /** * Comparison operators */ *************** *** 111,115 **** public final static int REGEXP = 7; ! /* * String truncation operators */ --- 111,115 ---- public final static int REGEXP = 7; ! /** * String truncation operators */ *************** *** 119,123 **** public final static int TRUNC_BOTH = 2; ! /* * Arithmetic operators */ --- 119,123 ---- public final static int TRUNC_BOTH = 2; ! /** * Arithmetic operators */ *************** *** 129,133 **** public final static int IDIV = 13; ! /* * Identity operators */ --- 129,133 ---- public final static int IDIV = 13; ! /** * Identity operators */ |