Re: [basex-talk] Basex xquery import module classpath lookup

2015-04-08 Thread Christian Grün
Hi Karel,

In BaseX, modules either need to be located in the module repository,
or the relative path needs to be specified in the import module
statement. Some more information on locating modules can be found in
our Wiki [1].

Hope this helps,
Christian

[1] http://docs.basex.org/wiki/Repository



On Wed, Apr 8, 2015 at 5:56 PM, Karel Hovorka
 wrote:
> Hi,
>
> I am trying to run xquery file on basex, but it depends on xquery module
> located in classpath. I have found parameter "org.basex.QUERYPATH", that
> configures module lookup on filesystem. Is there way to lookup modules in
> classpath?
>
> Thanks,
>
> Karel Hovorka, Semantico LTD


[basex-talk] Basex xquery import module classpath lookup

2015-04-08 Thread Karel Hovorka

Hi,

I am trying to run xquery file on basex, but it depends on xquery module 
located in classpath. I have found parameter "org.basex.QUERYPATH", that 
configures module lookup on filesystem. Is there way to lookup modules 
in classpath?


Thanks,

Karel Hovorka, Semantico LTD


Re: [basex-talk] xpointer

2015-04-08 Thread Liam R. E. Quin
On Wed, 2015-04-08 at 10:37 +0200, Jérôme Chauveau wrote:

> Unfortunatly, the "id" notation fails...
>
> 

Are you validating against a DTD? If not, the "ID-ness" property won't 
be set...
It might work if the document uses xml:id without DTD validation.

Liam




Re: [basex-talk] Bug? Local variable has not been allocated a stack frame slot

2015-04-08 Thread Marc van Grootel
Sure, I'm going to try this evening. If it's indeed Saxon we would
probably need one anyways.
--Marc

On Wed, Apr 8, 2015 at 2:23 PM, Christian Grün
 wrote:
> Hi Marc,
>
> I would tend to say it's a Saxon issue. We have no Saxon-specific code
> in our XSLT functions, and the complete stack trace seems to indicate
> that something is going wrong in Saxon. – However, I can also have a
> look at this if you send me an SSCCE for that bug.
>
> Best,
> Christian
>
>
>
> On Wed, Apr 8, 2015 at 2:18 PM, Marc van Grootel
>  wrote:
>> Hi,
>>
>> I have hit something which is related to Saxon XSLT. The XSLT in
>> question runs fine standalone (via Oxygen). But when hooked up via
>> RESTXQ I get the type of tracebacks (i've listed all traceback from
>> where it enters Saxon code below).
>>
>> Although I don't have a full repro case I did manage to make it run by
>> modyfing the expr inside the "group-starting-with".
>>
>> The code below uses a local variable $i in a predicate. This causes
>> the error below.
>>
>> >   group-starting-with="v[xs:integer(@c) eq $i][text()]">
>> ...
>> 
>>
>> The code below runs without problems. Here it's not accessing the
>> local variable inside the grouping attribute.
>>
>> >   group-starting-with="v[text()]">
>> ...
>> 
>>
>> Any idea if this is Saxon or BaseX issue?
>>
>> --Marc
>>
>> This is the top of the traceback.
>>
>> Version: BaseX 8.1
>> Java: Oracle Corporation, 1.7.0_25
>> OS: Windows 7, amd64
>> Stack Trace:
>> java.lang.ArrayIndexOutOfBoundsException: Local variable $i
>> has not been allocated a stack frame slot
>> at 
>> net.sf.saxon.expr.LocalVariableReference.evaluateVariable(LocalVariableReference.java:102)
>> at 
>> net.sf.saxon.expr.VariableReference.iterate(VariableReference.java:453)
>> at 
>> net.sf.saxon.expr.SingletonAtomizer.evaluateItem(SingletonAtomizer.java:173)
>> at 
>> net.sf.saxon.expr.SingletonAtomizer.evaluateItem(SingletonAtomizer.java:36)
>> at 
>> net.sf.saxon.expr.ValueComparison.effectiveBooleanValue(ValueComparison.java:692)
>> at 
>> net.sf.saxon.pattern.PatternWithPredicate.matches(PatternWithPredicate.java:139)
>> at 
>> net.sf.saxon.pattern.PatternWithPredicate.matches(PatternWithPredicate.java:131)
>> at 
>> net.sf.saxon.expr.sort.GroupStartingIterator.advance(GroupStartingIterator.java:47)
>> at 
>> net.sf.saxon.expr.sort.GroupMatchingIterator.next(GroupMatchingIterator.java:75)
>> at 
>> net.sf.saxon.expr.instruct.ForEachGroup.processLeavingTail(ForEachGroup.java:743)
>> at 
>> net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:875)
>> at 
>> net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:138)
>> at 
>> net.sf.saxon.expr.instruct.UserFunction.process(UserFunction.java:382)
>> at 
>> net.sf.saxon.expr.UserFunctionCall.process(UserFunctionCall.java:507)
>> at 
>> net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:662)
>> at 
>> net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:138)
>> at 
>> net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:431)
>> at 
>> net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:373)
>> at 
>> net.sf.saxon.expr.instruct.Template.applyLeavingTail(Template.java:239)
>> at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:1057)
>> at 
>> net.sf.saxon.expr.instruct.ApplyTemplates$ApplyTemplatesPackage.processLeavingTail(ApplyTemplates.java:519)
>> at 
>> net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:349)
>> at 
>> net.sf.saxon.expr.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:323)
>> at 
>> net.sf.saxon.expr.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:56)
>> at 
>> net.sf.saxon.expr.parser.ExpressionTool.evaluate(ExpressionTool.java:328)
>> at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:398)
>> at 
>> net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:604)
>> at 
>> net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:875)
>> at 
>> net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:613)
>> at 
>> net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:875)
>> at 
>> net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:660)
>> at net.sf.saxon.expr.instruct.Template.expand(Template.java:258)
>> at 
>> net.sf.saxon.expr.instruct.CallTemplate$CallTemplatePackage.processLeavingTail(CallTemplate.java:536)
>> at net.sf.saxon.Controller.transformDocument(Controller.java:2082)
>> at net.sf.saxon.Controller.transform(Controller.java:1903)
>> at org.basex.query.func.xslt.XsltTransform.transform



-- 
--Marc


Re: [basex-talk] Bug? Local variable has not been allocated a stack frame slot

2015-04-08 Thread Christian Grün
Hi Marc,

I would tend to say it's a Saxon issue. We have no Saxon-specific code
in our XSLT functions, and the complete stack trace seems to indicate
that something is going wrong in Saxon. – However, I can also have a
look at this if you send me an SSCCE for that bug.

Best,
Christian



On Wed, Apr 8, 2015 at 2:18 PM, Marc van Grootel
 wrote:
> Hi,
>
> I have hit something which is related to Saxon XSLT. The XSLT in
> question runs fine standalone (via Oxygen). But when hooked up via
> RESTXQ I get the type of tracebacks (i've listed all traceback from
> where it enters Saxon code below).
>
> Although I don't have a full repro case I did manage to make it run by
> modyfing the expr inside the "group-starting-with".
>
> The code below uses a local variable $i in a predicate. This causes
> the error below.
>
>group-starting-with="v[xs:integer(@c) eq $i][text()]">
> ...
> 
>
> The code below runs without problems. Here it's not accessing the
> local variable inside the grouping attribute.
>
>group-starting-with="v[text()]">
> ...
> 
>
> Any idea if this is Saxon or BaseX issue?
>
> --Marc
>
> This is the top of the traceback.
>
> Version: BaseX 8.1
> Java: Oracle Corporation, 1.7.0_25
> OS: Windows 7, amd64
> Stack Trace:
> java.lang.ArrayIndexOutOfBoundsException: Local variable $i
> has not been allocated a stack frame slot
> at 
> net.sf.saxon.expr.LocalVariableReference.evaluateVariable(LocalVariableReference.java:102)
> at 
> net.sf.saxon.expr.VariableReference.iterate(VariableReference.java:453)
> at 
> net.sf.saxon.expr.SingletonAtomizer.evaluateItem(SingletonAtomizer.java:173)
> at 
> net.sf.saxon.expr.SingletonAtomizer.evaluateItem(SingletonAtomizer.java:36)
> at 
> net.sf.saxon.expr.ValueComparison.effectiveBooleanValue(ValueComparison.java:692)
> at 
> net.sf.saxon.pattern.PatternWithPredicate.matches(PatternWithPredicate.java:139)
> at 
> net.sf.saxon.pattern.PatternWithPredicate.matches(PatternWithPredicate.java:131)
> at 
> net.sf.saxon.expr.sort.GroupStartingIterator.advance(GroupStartingIterator.java:47)
> at 
> net.sf.saxon.expr.sort.GroupMatchingIterator.next(GroupMatchingIterator.java:75)
> at 
> net.sf.saxon.expr.instruct.ForEachGroup.processLeavingTail(ForEachGroup.java:743)
> at 
> net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:875)
> at 
> net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:138)
> at 
> net.sf.saxon.expr.instruct.UserFunction.process(UserFunction.java:382)
> at 
> net.sf.saxon.expr.UserFunctionCall.process(UserFunctionCall.java:507)
> at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:662)
> at 
> net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:138)
> at 
> net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:431)
> at 
> net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:373)
> at 
> net.sf.saxon.expr.instruct.Template.applyLeavingTail(Template.java:239)
> at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:1057)
> at 
> net.sf.saxon.expr.instruct.ApplyTemplates$ApplyTemplatesPackage.processLeavingTail(ApplyTemplates.java:519)
> at 
> net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:349)
> at 
> net.sf.saxon.expr.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:323)
> at 
> net.sf.saxon.expr.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:56)
> at 
> net.sf.saxon.expr.parser.ExpressionTool.evaluate(ExpressionTool.java:328)
> at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:398)
> at 
> net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:604)
> at 
> net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:875)
> at 
> net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:613)
> at 
> net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:875)
> at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:660)
> at net.sf.saxon.expr.instruct.Template.expand(Template.java:258)
> at 
> net.sf.saxon.expr.instruct.CallTemplate$CallTemplatePackage.processLeavingTail(CallTemplate.java:536)
> at net.sf.saxon.Controller.transformDocument(Controller.java:2082)
> at net.sf.saxon.Controller.transform(Controller.java:1903)
> at org.basex.query.func.xslt.XsltTransform.transform


[basex-talk] Bug? Local variable has not been allocated a stack frame slot

2015-04-08 Thread Marc van Grootel
Hi,

I have hit something which is related to Saxon XSLT. The XSLT in
question runs fine standalone (via Oxygen). But when hooked up via
RESTXQ I get the type of tracebacks (i've listed all traceback from
where it enters Saxon code below).

Although I don't have a full repro case I did manage to make it run by
modyfing the expr inside the "group-starting-with".

The code below uses a local variable $i in a predicate. This causes
the error below.


...


The code below runs without problems. Here it's not accessing the
local variable inside the grouping attribute.


...


Any idea if this is Saxon or BaseX issue?

--Marc

This is the top of the traceback.

Version: BaseX 8.1
Java: Oracle Corporation, 1.7.0_25
OS: Windows 7, amd64
Stack Trace:
java.lang.ArrayIndexOutOfBoundsException: Local variable $i
has not been allocated a stack frame slot
at 
net.sf.saxon.expr.LocalVariableReference.evaluateVariable(LocalVariableReference.java:102)
at 
net.sf.saxon.expr.VariableReference.iterate(VariableReference.java:453)
at 
net.sf.saxon.expr.SingletonAtomizer.evaluateItem(SingletonAtomizer.java:173)
at 
net.sf.saxon.expr.SingletonAtomizer.evaluateItem(SingletonAtomizer.java:36)
at 
net.sf.saxon.expr.ValueComparison.effectiveBooleanValue(ValueComparison.java:692)
at 
net.sf.saxon.pattern.PatternWithPredicate.matches(PatternWithPredicate.java:139)
at 
net.sf.saxon.pattern.PatternWithPredicate.matches(PatternWithPredicate.java:131)
at 
net.sf.saxon.expr.sort.GroupStartingIterator.advance(GroupStartingIterator.java:47)
at 
net.sf.saxon.expr.sort.GroupMatchingIterator.next(GroupMatchingIterator.java:75)
at 
net.sf.saxon.expr.instruct.ForEachGroup.processLeavingTail(ForEachGroup.java:743)
at net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:875)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:138)
at 
net.sf.saxon.expr.instruct.UserFunction.process(UserFunction.java:382)
at net.sf.saxon.expr.UserFunctionCall.process(UserFunctionCall.java:507)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:662)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:138)
at 
net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:431)
at 
net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:373)
at 
net.sf.saxon.expr.instruct.Template.applyLeavingTail(Template.java:239)
at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:1057)
at 
net.sf.saxon.expr.instruct.ApplyTemplates$ApplyTemplatesPackage.processLeavingTail(ApplyTemplates.java:519)
at 
net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:349)
at 
net.sf.saxon.expr.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:323)
at 
net.sf.saxon.expr.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:56)
at 
net.sf.saxon.expr.parser.ExpressionTool.evaluate(ExpressionTool.java:328)
at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:398)
at 
net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:604)
at net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:875)
at 
net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:613)
at net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:875)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:660)
at net.sf.saxon.expr.instruct.Template.expand(Template.java:258)
at 
net.sf.saxon.expr.instruct.CallTemplate$CallTemplatePackage.processLeavingTail(CallTemplate.java:536)
at net.sf.saxon.Controller.transformDocument(Controller.java:2082)
at net.sf.saxon.Controller.transform(Controller.java:1903)
at org.basex.query.func.xslt.XsltTransform.transform


Re: [basex-talk] BaseX 8.1 cannot be deployed in a resin server

2015-04-08 Thread Jérôme Chauveau

Same problem with tomcat7 and BaseX8.1, but fixed with the latest snapshot.
Thanks.
Jérôme.

Le 08/04/2015 10:19, George Karakatsiotis a écrit :

I've just tried the latest snapshot and it was deployed successfully

Thanks!

Gk

On Tue, Apr 7, 2015 at 12:46 PM, Christian Grün 
mailto:christian.gr...@gmail.com>> wrote:


And once more… Hi George, please try the latest snapshot and give us
feedback if the problem has not been solved.

Thanks,
Christian

[1] http://files.basex.org/releases/latest



On Wed, Apr 1, 2015 at 5:50 PM, Dirk Kirsten mailto:d...@basex.org>> wrote:
> Hi George,
>
> yes, I think there is something wrong with the Servlet. We tried
to fix some things to get BaseX to close more gracefully on
Tomcat, but seems like something is going wrong now. On Tomcat I
can't deploy the 8.1. WAR file anymore, it fails with "SEVERE:
Error listenerStart"
>
> I guess Christian is going to tackle this issue next week when
hes back from his vacation.
>
> Cheers
> Dirk
>
> On 04/01/2015 03:01 PM, George Karakatsiotis wrote:
>> Hi,
>> While I have been able to deploy basex7.9+ to a resin web
server, Basex 8.1
>> fails with a "Custom bean class 'org.basex.http.ServletListener' is
>> abstract.  Bean classes must be public, concrete, and have a
zero-argument
>> constructor." error message. Is there a reason why
>> org.basex.http.ServletListener is abstract? I don't see any
abstract
>> methods and no other class is extending it.
>>
>> Thank you for your time,
>> George Karakatsiotis
>>
>
> --
> Dirk Kirsten, BaseX GmbH, http://basexgmbh.de
> |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz
> |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer:
> | Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle
> `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22
>





--
Jérôme Chauveau - SAIC-CERTIC - Campus 4
Université de Caen Basse-Normandie



Re: [basex-talk] xpointer

2015-04-08 Thread Jérôme Chauveau

Hi,

thank you for your answer. It was helpfull.
Java XInclude support seems to not fully handle XPointer attributes.
One solution consists in using the "element" scheme with the "descendant 
path" notation:




Unfortunatly, the "id" notation fails...




Regards,

Jérôme.


Le 07/04/2015 12:38, Christian Grün a écrit :

Hi Jérôme,

We currently rely on default Java XInclude support [1]. I assume that
it does not properly handle XPointer attributes?

Cheers,
Christian

[1] 
https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/build/xml/SAXWrapper.java#L64


On Fri, Apr 3, 2015 at 9:49 AM, Jerome Chauveau
 wrote:

Hi,

Are xpointer implemented in BaseX 8?
I tried to add an xpointer attribute in an xinclude element but it failed.

[a] 
[b] 

[a] works fine but [b] fails (Fallback is called).

Thanks for help,

Jérôme.



--
Jérôme Chauveau - SAIC-CERTIC - Campus 4
Université de Caen Basse-Normandie



Re: [basex-talk] BaseX 8.1 cannot be deployed in a resin server

2015-04-08 Thread George Karakatsiotis
I've just tried the latest snapshot and it was deployed successfully

Thanks!

Gk

On Tue, Apr 7, 2015 at 12:46 PM, Christian Grün 
wrote:

> And once more… Hi George, please try the latest snapshot and give us
> feedback if the problem has not been solved.
>
> Thanks,
> Christian
>
> [1] http://files.basex.org/releases/latest
>
>
>
> On Wed, Apr 1, 2015 at 5:50 PM, Dirk Kirsten  wrote:
> > Hi George,
> >
> > yes, I think there is something wrong with the Servlet. We tried to fix
> some things to get BaseX to close more gracefully on Tomcat, but seems like
> something is going wrong now. On Tomcat I can't deploy the 8.1. WAR file
> anymore, it fails with "SEVERE: Error listenerStart"
> >
> > I guess Christian is going to tackle this issue next week when hes back
> from his vacation.
> >
> > Cheers
> > Dirk
> >
> > On 04/01/2015 03:01 PM, George Karakatsiotis wrote:
> >> Hi,
> >> While I have been able to deploy basex7.9+ to a resin web server, Basex
> 8.1
> >> fails with a "Custom bean class 'org.basex.http.ServletListener' is
> >> abstract.  Bean classes must be public, concrete, and have a
> zero-argument
> >> constructor." error message. Is there a reason why
> >> org.basex.http.ServletListener is abstract? I don't see any abstract
> >> methods and no other class is extending it.
> >>
> >> Thank you for your time,
> >> George Karakatsiotis
> >>
> >
> > --
> > Dirk Kirsten, BaseX GmbH, http://basexgmbh.de
> > |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz
> > |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer:
> > | Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle
> > `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22
> >
>