basexdb / basex Goto Github PK
View Code? Open in Web Editor NEWBaseX Main Repository.
Home Page: http://basex.org
License: BSD 3-Clause "New" or "Revised" License
BaseX Main Repository.
Home Page: http://basex.org
License: BSD 3-Clause "New" or "Revised" License
Example:
delete node //*[position() <= 10000000]
might create 10 mio temporary entries in the pending update list, the mem. consumption of which should be further reduced.
Implement WebDAV binding for BaseX: http://www.webdav.org/specs/rfc4918.html
eXist's solution: http://exist.sourceforge.net/webdav.html
Check if result of this function is correct:
file:write-binary("file.out", xs:base64Binary(xs:hexBinary("484950")))
Skip single malformed documents if collections are parsed, and output names of erroneous docs.
Support context item declarations in query prolog:
http://www.w3.org/TR/xquery-30/#id-context-item-declarations
Start from directory of main query to resolve module paths.
Otherwise, exceptions are thrown, à la...
[XQST0059] Module not found: ".../query.xqm".
Query:
declare function local:rec($x) { if($x) then for $a in 1 to $x order by $a return (local:rec($x - 1), $a) else 0 }; local:rec(2)
Problem: Wrong result; may as well apply to GFLWOR queries.
Reason:: Same Order.vl
instance is used (and overwritten) by recursive calls.
Some XPath suggestions are shown in the input field, even if typed in path will yield no more results.
Document: factbook.xml
Input: /m/
Suggestions: continent, country, ...
BaseX 6.5.1 on Windows XP SP3 and classical Czech keyboard as seen here http://freepages.genealogy.rootsweb.ancestry.com/~elainetmaddox/czech_keyboard.jpg
The cursor does not move at all
Steps to reproduce:
public static void main(final String[] args) throws BaseXException {
final Context ctx = new Context();
new CreateDB("test",
"<?xml version=\"1.0\"?><root feed=\"http://www.example.com/index.rss\" />")
.execute(ctx);
System.out.println(new XQuery("/root").execute(ctx));
}
and then open the db in the GUI -- it will show the following db:
info table yields (in the GUI):
0 1 3 1 0 DOC
1 1 2 2 0 ELEM root
2 1 1 1 0 ATTR feed=""
The following query..
for $x in //buch where $x//autor//text() contains text 'Krieger' return $x
..is rewritten to..
FTIndexAccess("ams", "Krieger")/ancestor::*:autor/ parent::*:lieferinfo/parent::*:abschnitt/ parent::*:buch/parent::*:buch [ancestor::document-node()]
parent::*:buch
should only occur once.
Example:
let $numbers := (1234.567, 789, 1234567.765)
for $i in $numbers return format-number($i, "#,###.##")
BaseX output:
1,234.57 789 1234,567.76
Should output:
1,234.57 789 1,234,567.76
Entries are missing in the log, so these steps can't be reviewed.
Explore GUI and/or Web version.
…are not detected in the XQuery editor.
Example:
for $a in for $a in <a>1</a> return $a/text() return <x>{ $a }</x>
Currently, inner variable $a shadows outer variables – which is wrong. Instead, inner variable declaration should be reset after each evaluation of RETURN.
The following glob filter for creating files...
SET CREATEFILTER *.xml
...won't accept files with multiple dots, such as...
a.b.xml
This is because a trailing dot...
SET CREATEFILTER *.
...is rewritten to a pattern that is supposed to find files without any dots, such as
a
Support for notification triggers for clients; to be added in 6.7
Settings in configuration file for SERVERPORT and JAXRXPORT might clash with default settings in Java classes command line settings:
...WARN::failed [email protected]:7998: java.net.BindException: Address already in use ...WARN::failed Server@1e0bc08: java.net.BindException: Address already in use
GUI Language cannot be changed in 6.6 (still working in 6.5.1, and on command line)
zip:entries("*.docx") doesnt show the real paths for the entries
dbnotify: Like inotify/FSEvents on FS side.
Relates to GUI external events update?
Example:
…sent in via the mailing list:
Long run:
Currently, the query compiler makes no difference between the current context item and the data instance(s), which is/are valid in the current context. This complicates optimizations, e.g. index access on collections, as a collection, which is bound as current context, may point to several db's.
Proposed solution: Add current data instance in analogy with the context item; update reference whenever necessary/appropriate (e.g. in mixed location steps).
Missing:
- fn:function-name(...) - fn:function-arity(...) - fn:map(...) - fn:filter(...) - fn:fold-left(...) - fn:fold-right(...) - fn:map-pairs(...)
Partially Supported:
fn:format-integer() fn:format-number() fn:format-dateTime() fn:format-date() fn:format-time()
A command is needed to mirror (i.e., create copies of existing) databases. Such a command can be applied to perform updates on the database copy and keep the main instance available for read-only requests.
Syntax:
COPY DB [name] [newname]
Howto reproduce:
Start BaseX
Open the Query Editor
Enter some text, + {A,X,C,V} is ignored
…are now rewritten to always use the index, no matter if the index terms have been stemmed, etc. As a consequence, the following query
doc("input")//li[ text() contains text "Exercise" ]
returns no results anymore. Solution: index match options have to be applied to query terms.
Include version information in command-line help texts, à la
BaseX 6.5.1 [Standalone] Usage: BaseX [-bdiosuvVwz] [-cq] [file] [file] Execute XQuery file ...
Should not be allowed (XPTY0004):
xs:date("2000-07-01") + xs:duration("P1Y")
Wrong result ("0000-07-01", expected: "-0001-07-01"):
xs:date("2000-07-01") - xs:yearMonthDuration("P2000Y")
Runtime exception:
xs:date("2000-07-01") - xs:yearMonthDuration("P2000Y") - xs:yearMonthDuration("P2000Y")
If the path index can evaluate how many results a location path will return, it could be wrapped with a positional filter predicate:
Old: /a/b/c
New: (/a/b/c)[position() <= max]
Improve placement of fn:trace() output.
Index will not be used for queries such as the following...
//*[ text() contains text 'term' ]
...if a language has been chosen. Index will be applied to the following query instead:
declare ft-option using language 'English';
//*[text() contains text 'specific']
This is kinda counter intuitive and should be handled by...
An even more far reaching approach would be to use the index options as default for evaluating full-text requests. This would be the most intuitive solution, but it could conflict with the specs, test cases, etc. Another problem could be that the database to be touched is not always known at compile time.
it takes random text snippets out of the db as db title
sample db can be found here:
http://students.fachschaft.inf.uni-konstanz.de/~krause/spiegel.zip
for $ n in //product//edition_no where $n/data() > 100 return insert node text {'- greater 100'} into $n on ****otek.xml java.lang.ArrayIndexOutOfBoundsException: 66 org.basex.util.Compress.pull(Compress.java:143) org.basex.util.Compress.unpack(Compress.java:109) org.basex.data.DiskData.txt(DiskData.java:207) org.basex.data.DiskData.text(DiskData.java:174) org.basex.data.Serializer.node(Serializer.java:298) org.basex.data.Nodes.serialize(Nodes.java:230) org.basex.data.Nodes.serialize(Nodes.java:224) org.basex.gui.view.text.TextView.setText(TextView.java:155) org.basex.gui.view.text.TextView.refreshContext(TextView.java:116) org.basex.gui.view.text.TextView.refreshUpdate(TextView.java:127) org.basex.gui.view.ViewNotifier.update(ViewNotifier.java:220) org.basex.gui.GUI.exec(GUI.java:441) org.basex.gui.GUI$5.run(GUI.java:351)
Example
replace value of node db:open-pre('probit', 511) with 'x'
delete node db:open-pre('probit', 511)
add "Hello World!"
"null" (Line 1): The element type "x" must be terminated by the matching end-tag "".
Check if w3 test suite issues remain to be fixed.
Conceptual: XQuery functions vs. importers/exporters?
Invalid XML with 2 Namespaces in an element.
as proposed by lukas
The following snippet creates invalid XML:
element test {
attribute {QName('foo', 'foo')} { 'bar' },
attribute {QName('bar', 'bar')} { 'baz' }
}
BaseX 6.5.1 on Windows XP SP3 and classical Czech keyboard as seen here http://freepages.genealogy.rootsweb.ancestry.com/~elainetmaddox/czech_keyboard.jpg
type some text into xquery edit box and then use Shift-§ key (key beside enter key) to write exclamation mark - all content gets deleted and only the exclamation mark remains.
In past I reported similar problem with problem to write $ by means of AltGr-ů (second key left to enter - see https://mailman.uni-konstanz.de/pipermail/basex-talk/2011-February/001184.html)
Especially helpful for the development of XQuery modules. Some conceptual questions have to be answered as well, e.g.:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.