This file contains hidden or 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
<?xml version="1.0"?> | |
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd"> | |
<Configure id="Server" class="org.eclipse.jetty.server.Server"> | |
<!-- Force all communication over secure channels. --> | |
<Set name="handler"> | |
<New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection"> | |
<Set name="handlers"> | |
<Array type="org.eclipse.jetty.server.Handler"> | |
<Item> |
This file contains hidden or 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
<?xml-stylesheet href="../xsltforms/xsltforms.xsl" type="text/xsl"?> | |
<?css-conversion no?> | |
<html xmlns:xf="http://www.w3.org/2002/xforms" | |
xmlns:xs="http://www.w3.org/2001/XMLSchema" | |
xmlns:ev="http://www.w3.org/2001/xml-events" | |
xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>Creator test</title> | |
<link rel="stylesheet" type="text/css" href="local.css"/> | |
<xf:model> |
This file contains hidden or 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
(:~ | |
: JSON test apb feb 2017 | |
:) | |
module namespace page = 'json-test'; | |
(: test data :) | |
declare variable $page:data:=<json objects="json _"> | |
<total type="number">15</total> | |
<entity>app</entity> |
This file contains hidden or 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
(: queue async run of all tests in $dir :) | |
declare function local:queue-tests($dir as xs:string,$opts as map(*)) as xs:string | |
{ | |
let $q:=``[ | |
declare variable $password external; | |
client:connect('localhost', | |
db:system()/globaloptions/port/xs:integer(.), | |
'admin', | |
$password) | |
! client:execute(.,'TEST "`{$dir}`"') |
This file contains hidden or 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
import module namespace xp="http://expath.org/ns/xparse"; | |
declare variable $js:="C:\Users\andy\workspace\app-doc\src\static\doc\feats\files\files.js"; | |
let $t:="" || file:read-text($js) | |
return xp:parse($t,map{"lang":"ecmascript"}) |
This file contains hidden or 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
declare variable $src:="C:\Users\andy\git\xqlint\test\index.json"; | |
(: json-doc($src) :) | |
file:read-text($src)=>json-to-xml() |
This file contains hidden or 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
(:~ | |
: JSON form test apb 6dec 2016 | |
:) | |
module namespace page = 'form-test'; | |
import module namespace request = "http://exquery.org/ns/request"; | |
declare | |
%rest:path("/form2") | |
%rest:GET | |
%output:method("html") |
This file contains hidden or 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
(: https://libertyseeds.ca/2015/07/21/Investigating-Final-Draft-s-XML-document-format-with-Ruby/ :) | |
declare function local:update($result as map(*),$next as element()) as map(*) | |
{ | |
let $name:=name($next) | |
let $current:=$result($name) | |
let $atribs:=$next/@*[if(empty($current)) then true() else not( .=$current(name(.)))] | |
let $atribs:=map:merge(($current, $atribs!map:entry(name(.),string(.))), map{'duplicates': 'combine'}) | |
return map:put($result,$name,$atribs) | |
}; |
This file contains hidden or 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
module namespace page = 'http://basex.org/modules/web-page'; | |
declare | |
%rest:path("content") | |
%rest:produces("application/json") | |
%output:method("json") | |
function page:content1(){ | |
<json type="object"> | |
<msg>Hello</msg> | |
</json> | |
}; |
This file contains hidden or 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
(: ebnf to Java parser for BaseX using REx :) | |
declare function local:REx-request($ebnf as xs:string,$name as xs:string,$command as xs:string)as item()+{ | |
let $req:= | |
<request xmlns="http://expath.org/ns/http-client" href='http://www.bottlecaps.de/rex/' method="post"> | |
<multipart media-type="multipart/form-data" boundary="xyzBouNDarYxyz"> | |
<header name="Content-Disposition" value='form-data; name="command"'/> | |
<body media-type="text/plain"/> | |
<header name="Content-Disposition" value='form-data; name="input"; filename="{$name}.ebnf"'/> | |
<body media-type="text/plain"/> | |
</multipart> |