Giter Club home page Giter Club logo

basexdb / basex Goto Github PK

View Code? Open in Web Editor NEW
655.0 60.0 266.0 121.21 MB

BaseX Main Repository.

Home Page: http://basex.org

License: BSD 3-Clause "New" or "Revised" License

Shell 0.04% ActionScript 0.10% C# 0.15% Makefile 0.01% C 0.20% Haskell 0.04% Java 90.96% Common Lisp 0.03% Perl 0.08% PHP 0.15% Python 0.17% QMake 0.01% C++ 0.08% Rebol 0.05% XQuery 2.69% Ruby 0.08% Scala 0.13% CSS 0.15% XSLT 0.01% JavaScript 4.86%
xquery xpath xml-database xml basex

basex's People

Contributors

adrianber avatar amazingphil avatar andria009 avatar carlosmarcos avatar cfoster avatar charles-dyfis-net avatar christiangruen avatar daveaglick avatar dimitarp avatar dirkk avatar donaldjohn avatar fauxfaux avatar guntherrademacher avatar hhv avatar holu avatar igneus avatar jb8748 avatar jdoe-id1 avatar jenserat avatar jfinckh avatar jonherrmann avatar kissdanigh avatar leowoerteler avatar lukask avatar masoumeh avatar micheee avatar siahr avatar smallfriex avatar stweil avatar vcestone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

basex's Issues

Updates: Reduce memory consumption

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.

File module: write-binary

Check if result of this function is correct:

file:write-binary("file.out",
  xs:base64Binary(xs:hexBinary("484950")))

Malformed documents

Skip single malformed documents if collections are parsed, and output names of erroneous docs.

Path resolution for query modules

Start from directory of main query to resolve module paths.
Otherwise, exceptions are thrown, à la...

[XQST0059] Module not found: ".../query.xqm".

Recursive FLWOR

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.

Input Field: XPath Suggestions

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, ...

GUI eats attributes

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):

PRE DIS SIZ ATS NS KIND CONTENT

0 1 3 1 0 DOC
1 1 2 2 0 ELEM root
2 1 1 1 0 ATTR feed=""

Full-Text, Index Rewritings

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.

Bug in format-number() function

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

Reset FLWOR variables after each call

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.

Import: createfilter doesn't support multiple dots in filenames

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

JAX-RX: Revise port bindings

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

EXPath module

zip:entries("*.docx") doesnt show the real paths for the entries

Various feature requests

…sent in via the mailing list:

  1. Double click on the blue bar to get a full view (All other views are send to the background. When double clicking the other views appear again)
  2. Put a close button on the blue bar
  3. Folder view; add entry in the right-click menu to collapse in or out all nodes
  4. Add support for intelligent xpath autocompletion in the search bar
  5. Possibility in the right click menu to duplicate a node
  6. Possibility to place a node in comment /uncomment
  7. In text mode highlight a node when the cursor is standing on an opening or ending tag, so that the corresponding pair will be remark
  8. Make "Enter" equal to double clicking when navigation in a xml
  9. Option to show line numbers in text mode
  10. Launch a xml in a browser, xml editor or IDE from the menu

Long run:

  1. A XML Grid View (like xmlSpy or Stylus Studio)
  2. XSD support for validating and generating schemas
  3. XSLT support for transforming a xml db into another xml db and alternative query posibillities
  4. Visualizing differences between two databases
  5. Export xml to text, csv, xls, json etc
  6. XQuery Documentation Generator (XQDoc Support)
  7. Use colors to show structure of an xml in the visualization views (this option can be turned on and off)
  8. Support for forms (Create forms as a front end for basex and distribute this together with the xml db as a jar file)
  9. XML editing mode and read only mode (xacml)
  10. Focus on support for adding thousands of xml files into one db

Revise index access on collections

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).

XQuery 3.0 Functions

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()

API: COPY command

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]

Full-text queries with default options…

…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.

Command-Line help: version information

Include version information in command-line help texts, à la

 BaseX 6.5.1 [Standalone]
 Usage: BaseX [-bdiosuvVwz] [-cq] [file]
 [file]     Execute XQuery file
 ...

Date type calculations

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")

Utilize path index to speed up location steps

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]

Full-text, index rewritings with LANGUAGE option

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...

  • using/recognizing English as default setting
  • giving some more user (yet concise) feedback in the GUI Properties dialog

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.

Text Compress IOOB

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)

generalize prefix construction

The following snippet creates invalid XML:

element test {
    attribute {QName('foo', 'foo')} { 'bar' },
    attribute {QName('bar', 'bar')} { 'baz' }
}

Exclamation mark char deletes content of xquery edit box

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)

XQuery Editor: multiple tabs

Especially helpful for the development of XQuery modules. Some conceptual questions have to be answered as well, e.g.:

  • which query is to be evaluated if several tabs are opened?
  • which query is to be evaluated if the current tab contains a module?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.