Re: [basex-talk] RESTXQ custom response

2017-08-18 Thread Tim Thompson
Actually, I was wrong. The issue seems to be with the 401 Unauthorized status needed with Digest authentication. I can control the header value using both methods when the status is 200 OK, but BaseX does not allow me to modify the WWW-Authenticate header when the status is 401. Is this something

Re: [basex-talk] RESTXQ custom response

2017-08-18 Thread Tim Thompson
Christian, Here is a minimal example to try to illustrate what I am referring to: https://bibfram.es/basex/static/header-test.xhtml The first case (using the web:response-header() function) produces the desired response. You should see something like this after clicking "Test" (at least the

Re: [basex-talk] RESTXQ custom response

2017-08-18 Thread Christian Grün
Hm, I still need to understand: Why can't you set WWW-Authenticate via standard response elements if you can do it with web:response-header (which simply generates elements that you could write by yourself)? Am 19.08.2017 1:04 vorm. schrieb "Tim Thompson" : Yes, but that

Re: [basex-talk] RESTXQ custom response

2017-08-18 Thread Tim Thompson
Yes, but that brings me back to my original issue. The standard RESTXQ response headers let me set the HTTP status, but they don't let me override some default header values: namely, WWW-Authenticate when BaseX is configured for "Custom" authentication. The web:response-header function does let me

Re: [basex-talk] RESTXQ custom response

2017-08-18 Thread Christian Grün
True. In many cases, you are probably more flexible by using the standard RESTXQ response headers. On Fri, Aug 18, 2017 at 4:37 PM, Tim Thompson wrote: > Right, the status can be set when using the http:response element directly, > but the web:response-header function does

Re: [basex-talk] Implement read lock and write lock

2017-08-18 Thread Christian Grün
Hi Kendall, I see the documentation of the custom XQuery locks repeatedly leads to misunderstandings. I hope my recent edits will clarify the semantics: http://docs.basex.org/wiki/Transaction_Management#Query_Options Best, Christian On Fri, Aug 18, 2017 at 10:18 PM, Kendall Shaw

Re: [basex-talk] Implement read lock and write lock

2017-08-18 Thread Kendall Shaw
I would like to know what the read-lock and write-lock parameters mean. The documentation says they are in a different namespace than database names, so “factbook” doesn’t refer to the “factbook” database. What do the parameters refer to? For Dharmendra’s questions, if

Re: [basex-talk] Keep the comments when parsing HTML?

2017-08-18 Thread Graydon Saunders
HI Christian -- There's no query! This is about loading the files into a DB with the GUI. I've attached two files. If I load them as Database->New with "input format" HTML, the comments go away. If I load them the same way but with "lexical" as a TagSoup parser option, the comments go away.

Re: [basex-talk] RESTXQ custom response

2017-08-18 Thread Tim Thompson
Right, the status can be set when using the http:response element directly, but the web:response-header function does not seem to provide access to that. It only allows one to set new headers, not set the status of the response. -- Tim A. Thompson Discovery Metadata Librarian Yale University

Re: [basex-talk] RESTXQ custom response

2017-08-18 Thread Christian Grün
Hi Tim, That should be possible as well: Cheers, Christian On Fri, Aug 18, 2017 at 3:20 PM, Tim Thompson wrote: > Hi, Christian, > > Yes, it does. The only issue is that there doesn't seem to be a way to set > the HTTP status and message via

Re: [basex-talk] RESTXQ custom response

2017-08-18 Thread Tim Thompson
Hi, Christian, Yes, it does. The only issue is that there doesn't seem to be a way to set the HTTP status and message via web:response-header, is that right? This would be a great feature to have :) Tim -- Tim A. Thompson Discovery Metadata Librarian Yale University Library On Fri, Aug 18,

Re: [basex-talk] Keep the comments when parsing HTML?

2017-08-18 Thread Christian Grün
Hi Graydon, A little example query and input file would be great (the smaller, the better). Thanks in advance, Christian On Fri, Aug 18, 2017 at 2:40 PM, Graydon Saunders wrote: > Hello -- > > So I have a pile of near-XML HTML with semantically significant comments to >

[basex-talk] Keep the comments when parsing HTML?

2017-08-18 Thread Graydon Saunders
Hello -- So I have a pile of near-XML HTML with semantically significant comments to deal with. (I must have been sinning much more than I realized!) Using BaseX866-20170818.124137, BaseX will parse the content but all the comments go away. This is with passing the "lexical" option on the

Re: [basex-talk] Reading JSON

2017-08-18 Thread Christian Grün
Hi Giuseppe, as you indicated in your last e-mail (in private), it was the debugging output that slowed down the execution of the unparse-text(...) function (the full text strings was added to both the query optimization info and the query plan). I have introduced a size limit [1]. Thanks for

Re: [basex-talk] value compare in namespace

2017-08-18 Thread Leo Studer
Hello Radim Your WHERE clause is either true or false depending whether “Failed” is in $FailedTests sequence or not. With ‘=‘ you compare sequences and not values. If one item matches it is true. let $FailedTests:=… return count($FailedTests[. eq ‘Failed’]) Cheers Leo > On 18 Aug 2017, at

Re: [basex-talk] value compare in namespace

2017-08-18 Thread Christian Grün
Hi Radim (and thanks to Michael in our team for noting this), It’s actually your query that needs to be fixed. $FailedTests contains all data values, and you are counting this total number in the last step. You will need to rewrite your query to… return count( for $FailedTests in

Re: [basex-talk] value compare in namespace

2017-08-18 Thread Christian Grün
Hi Radim, could you please provide me with a little test document that allows us to reproduce the behavior? The GUI InfoView output (or the output triggered by -V on command-line) would be helpful, too. Thanks in advance, Christian On Fri, Aug 18, 2017 at 10:49 AM,

[basex-talk] value compare in namespace

2017-08-18 Thread radim-havlicek
Hello, I want to count failed reports in DB, it means where outcome value of report is "Failed". declare namespace TestResults='urn:IEEE-1671:2009.04:TestResults'; declare namespace Common='urn:IEEE-1671:2010:Common'; let $DocumentNames := (db:list("ASC", "Report")) for $DocumentName in

Re: [basex-talk] RESTXQ custom response

2017-08-18 Thread Christian Grün
Hi Tim, I am glad to hear the response header output does its job. As the function does nothing else than creating a response header (unfortunately with this standard caching directive – I think I will remove it along with BaseX 8.7), you could try to replace your response elements with the

Re: [basex-talk] Should xml-to-json ignore a "key" attribute of a "map" root element?

2017-08-18 Thread Christian Grün
Has been fixed; a new snapshot is available [1]. Thanks, Christian [1] http://files.basex.org/releases/latest/ On Fri, Aug 18, 2017 at 10:06 AM, Christian Grün wrote: > Indeed: > > https://www.w3.org/Bugs/Public/show_bug.cgi?id=29917 > >

Re: [basex-talk] Should xml-to-json ignore a "key" attribute of a "map" root element?

2017-08-18 Thread Christian Grün
Indeed: https://www.w3.org/Bugs/Public/show_bug.cgi?id=29917 https://github.com/LeoWoerteler/QT3TS/commit/b0347f16f25f43fb32271efb115dc0de382cd97f Will be fixed soon. On Fri, Aug 18, 2017 at 9:36 AM, Christian Grün wrote: >> Saxon 9.8 however parses that input

Re: [basex-talk] Should xml-to-json ignore a "key" attribute of a "map" root element?

2017-08-18 Thread Christian Grün
> Saxon 9.8 however parses that input fine. Good to know. Saxon-EE 9.7.0.8, still raises an error, so it seems to have been changed more recently. I will see if there are new test cases that cover this case, or if someone has posted something similar on the Saxon bug tracker. > Looking at