Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XQuery, Handle recursive calls #1298

Closed
ChristianGruen opened this issue May 24, 2016 · 0 comments
Closed

XQuery, Handle recursive calls #1298

ChristianGruen opened this issue May 24, 2016 · 0 comments

Comments

@ChristianGruen
Copy link
Member

ChristianGruen commented May 24, 2016

With the XQuery and Async Module, the same function can be recursively called. This currently leads to undesired results:

Query:

import module namespace _ = "_" at "_.xqm";
_:_()

_.xqm (xquery:eval)

module namespace _ = "_";
declare function _:_() {
  xquery:eval('import module namespace _ = "_" at "_.xqm"; _:_()')
};

Result:

Improper use? Potential bug? Your feedback is welcome:
Contact: basex-talk@mailman.uni-konstanz.de
Version: BaseX 8.5 beta
Java: Oracle Corporation, 1.8.0_65
OS: Windows 10, amd64
Stack Trace: 
java.lang.NoClassDefFoundError: Could not initialize class org.basex.query.QueryException
    at org.basex.query.QueryError.get(QueryError.java:1342)
    at org.basex.query.QueryContext.iter(QueryContext.java:372)
    at org.basex.query.func.xquery.XQueryEval.eval(XQueryEval.java:136)
    at org.basex.query.func.xquery.XQueryEval.eval(XQueryEval.java:62)
    at org.basex.query.func.xquery.XQueryEval.iter(XQueryEval.java:47)
    at org.basex.query.MainModule.iter(MainModule.java:119)

_.xqm (async:eval)

module namespace _ = "_";
declare function _:_() {
  async:eval('import module namespace _ = "_" at "_.xqm"; _:_()')
};

Result: Creation of new queries; process cannot be stopped without killing BaseX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant