zorba

XQuery and Zorba: Setting the serialization parameters from inside the XQuery document

落花浮王杯 提交于 2019-12-13 15:27:13
问题 According to this: http://www.xmlplease.com/xquery-xhtml "XQuery does not have a standard way of setting the serialization parameters if available. In XQuery we must look up the proper documentation for the XQuery processor to find out what serialization parameters are implemented if any, and how exactly to use them. If available they can normally be set at the command line. Often they can also be used from inside the XQuery document." In Saxon you can write something like declare option

PHP can't initialize zorba_api's module

空扰寡人 提交于 2019-12-13 04:45:50
问题 Dose anyone know how to fix this error? I installed zorba and it worked well like bellow. C: \>zorba -q 1+1 < ?xml version="1.0" encoding="UTF-8"?> 2 C:\ > Then I changed PHP.ini to add extension module . extension=zorba_api.dll Then tied restart Apache but Apache didn't start. I could't get any messages from Apache logs, but I got messages If I tried this PHP operation C: \>php -v PHP Warning: PHP Startup: zorba_api: Unable to initialize module Module compiled with build ID=API20090626,TS

Can't get Zorba working on Windows 7 with PHP and Nginx

大城市里の小女人 提交于 2019-12-12 15:57:03
问题 I'm trying to install Zorba on a Windows 7 machine with the help of these instructions. I've completed the "Verify Zorba" section ok, but I can't complete the section "Enable Zorba extension in PHP". When I attempt to restart PHP, a Windows dialog box pops up saying; Do I need to compile from source? The instructions say to compile Zorba from source but instead have downloaded the Windows installation package from the Zorba download page. Do I also have to compile from source? Surely not?

create collection, add document to zorba using command line?

巧了我就是萌 提交于 2019-12-11 18:15:07
问题 I am wondering how one creates a collection and adds a document to that collection in a fresh zorba install using the commandline interface http://www.zorba-xquery.com/html/documentation/2.7.0/zorba/commandline If it cannot be done with the command line an example using the scripting api would be good. 回答1: This can be done using XQuery scripting. Consider the following XQuery module: module namespace news-data = "http://www.news.org/data"; declare namespace an = "http://www.zorba-xquery.com

Zorba with tidy module

半腔热情 提交于 2019-12-11 06:28:15
问题 I'm trying to use the tidy module with zorba library (XQuery library), so I'd like to build zorba with tidy support. I'm following the instructions at this site, but when I'm building it, cmake say me that ZORBA_WITH_TIDY was ignored. Do you know any way to include tidy in zorba ? Thanks 回答1: The Tidy is an external module available at https://code.launchpad.net/~zorba-coders/zorba/data-converters-module Instructions on how to install zorba with non core modules are available at http://www

Eliminate duplicates in array (JSONiq)

余生长醉 提交于 2019-11-29 12:21:37
I'd like to delete duplicates in a JSONiq array. let $x := [1, 2, 4 ,3, 3, 3, 1, 2, 5] How can I eliminate the duplicates in $x? let $x := [1, 2, 4 ,3, 3, 3, 1, 2, 5] return [ distinct-values($x[]) ] Paul Sweatte Use the replace function multiple times: replace($x, "([1-5])(.*)\1", "$1") Here's a fully functional JavaScript equivalent: [1,2,4,3,3,1,2,5].toString().replace(/([1-5]),(\1)/g, "$1").replace(/(,[1-5])(.*)(\1)/g,"$1$2").replace(/([1-5])(.*)(,\1)/g,"$1$2") Here is a generic JavaScript equivalent via the JSON.parse() method, which removes duplicates automatically: var foo = [1,2,4,3,3

Eliminate duplicates in array (JSONiq)

南楼画角 提交于 2019-11-28 06:02:19
问题 I'd like to delete duplicates in a JSONiq array. let $x := [1, 2, 4 ,3, 3, 3, 1, 2, 5] How can I eliminate the duplicates in $x? 回答1: let $x := [1, 2, 4 ,3, 3, 3, 1, 2, 5] return [ distinct-values($x[]) ] 回答2: Use the replace function multiple times: replace($x, "([1-5])(.*)\1", "$1") Here's a fully functional JavaScript equivalent: [1,2,4,3,3,1,2,5].toString().replace(/([1-5]),(\1)/g, "$1").replace(/(,[1-5])(.*)(\1)/g,"$1$2").replace(/([1-5])(.*)(,\1)/g,"$1$2") Here is a generic JavaScript