This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add file | |
curl -X PUT --anyauth --user 'admin:admin' -T cluster1.xml 'http://localhost:8005/testfile.xml' | |
make directory | |
curl -X MKCOL --anyauth --user 'admin:admin' 'http://localhost:8005/testdir' | |
move a file | |
curl -X MOVE --anyauth --user 'admin:admin' --header 'Destination: http://localhost:8005/testfile1.xml' 'http://localhost:8005/testfile.xml' | |
list all files in webdav |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let $b := 2 | |
return | |
map(function($x) { $x * $x * $b }, 1 to 5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"p-pipeline": [ | |
{ | |
"name": "my-pipeline", | |
"p-import": "../test.xpl", | |
"p-source": { | |
"sequence": false | |
}, | |
"p-results": {}, | |
"myuri": "http://www.example.org/test.xslt", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "1.0-ml"; | |
import module namespace functx = "http://www.functx.com" at | |
"/MarkLogic/functx/functx-1.0-nodoc-2007-01.xqy"; | |
(: extracts //p from web page and tokenizes to lower case words :) | |
declare function local:generate-corpus( | |
$uri | |
){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(: -------------------------------------------------------------------------- :) | |
(: XSLT and XQuery Serialization 3.0 :) | |
(: -------------------------------------------------------------------------- :) | |
declare | |
%rxq:produces('text/plain') | |
%output:method('text') | |
%output:encoding('iso-8859-1') | |
%output:omit-xml-declaration('no') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am xquery on github. | |
* I am jimfuller (https://keybase.io/jimfuller) on keybase. | |
* I have a public key whose fingerprint is F971 F4C2 13BB BE1A FF88 9AB4 0617 80A7 7257 D3E2 | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
the following is an example of a left fold xslt | |
java -jar /Applications/depify-1.0/deps/xmlcalabash/calabash.jar -isource=test.xml -istylesheets=test1.xsl -istylesheets=test2.xsl -oresult=- xslt-fold.xpl | |
<p:declare-step version="1.0" | |
xmlns:p="http://www.w3.org/ns/xproc" | |
xmlns:c="http://www.w3.org/ns/xproc-step" | |
xmlns:ex="http://www.example.com" | |
name="main"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'izpack' | |
defaultTasks 'assemble', 'test' | |
ant.importBuild 'build.xml' | |
buildscript { | |
repositories { | |
mavenCentral() | |
jcenter() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "1.0-ml"; | |
declare function local:binary($min,$max,$number){ | |
let $middle := round( (($max - $min) div 2) + $min ) | |
return | |
if($middle eq $number) | |
then $number | |
else | |
if($middle lt $number) | |
then local:binary($middle,$max,$number) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gradle -b test.gradle -Dexec.args="-isource=test1.xpl -oresult=- test1.xpl" |