vuetify 0.14.8
This commit is contained in:
parent
d9a9f99d27
commit
d967271006
57 changed files with 4855 additions and 218 deletions
|
|
@ -1,5 +1,5 @@
|
|||
WARNING=DO NOT MODIFY THIS FILE IF YOU DON'T UNDERSTAND
|
||||
defaultDestination=C\:/Users/andy/Desktop/basex.865b/webapp
|
||||
defaultDestination=C\:/Users/andy/Desktop/basex.865/webapp
|
||||
defaultVariables=
|
||||
eclipse.preferences.version=1
|
||||
includeTeamPrivateFiles=false
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ const Auth={
|
|||
};
|
||||
Vue.use(Auth);
|
||||
|
||||
// read and write settings
|
||||
// https://vuejs.org/v2/guide/state-management.html
|
||||
var settings = {
|
||||
debug: true,
|
||||
|
|
@ -60,7 +61,7 @@ Vue.config.errorHandler = function (err, vm, info) {
|
|||
};
|
||||
|
||||
|
||||
|
||||
// used by vue-ace
|
||||
var Events = new Vue({});
|
||||
|
||||
|
||||
|
|
@ -89,6 +90,7 @@ const router = new VueRouter({
|
|||
{ path: '/tasks', component: Task,meta:{title:"Runnable tasks"} },
|
||||
{ path: '/tasks/model', component: Model,meta:{title:"build model"} },
|
||||
{ path: '/tasks/xqdoc', component: Xqdoc,meta:{title:"build xqdoc"} },
|
||||
{ path: '/tasks/vuecompile', component: Vuecompile,meta:{title:"vue compile"} },
|
||||
{ path: '/jobs', component: Job,meta:{title:"Jobs"} },
|
||||
{ path: '/timeline', component: Timeline,meta:{title:"timeline"} },
|
||||
{ path: '*', component: Notfound,meta:{title:"Page not found"} }
|
||||
|
|
@ -123,6 +125,7 @@ const app = new Vue({
|
|||
status:{},
|
||||
drawer:true,
|
||||
mini: false,
|
||||
alert:{show:false,msg:"Hello"},
|
||||
items:[
|
||||
{href: '/',text: 'Home', icon: 'home' },
|
||||
{
|
||||
|
|
@ -141,10 +144,25 @@ const app = new Vue({
|
|||
model: false,
|
||||
children: [
|
||||
{href: '/eval',text: 'Query',icon: 'play_circle_outline'},
|
||||
{href: '/jobs',text: 'Running jobs',icon: 'dashboard'},
|
||||
{href: '/tasks',text: 'Tasks',icon: 'history'}
|
||||
]},
|
||||
{
|
||||
icon: 'cast_connected',
|
||||
text: 'Server' ,
|
||||
model: false,
|
||||
children: [
|
||||
{href: '/jobs',text: 'Running jobs',icon: 'dashboard'},
|
||||
{href: '/logs',text: 'Server logs',icon: 'dns'},
|
||||
{href: '/ping',text: 'ping',icon: 'update'}
|
||||
]},
|
||||
{
|
||||
icon: 'camera_roll',
|
||||
text: 'Images' ,
|
||||
model: false,
|
||||
children: [
|
||||
{href: '/images',text: 'Collection',icon: 'photo_camera'},
|
||||
{href: '/thumbnail',text: 'thumbnail',icon: 'touch_app'}
|
||||
]},
|
||||
{
|
||||
icon: 'more_horiz',
|
||||
text: 'More' ,
|
||||
|
|
@ -153,11 +171,8 @@ const app = new Vue({
|
|||
{href: '/session',text: 'Session',icon: 'person'},
|
||||
{href: '/select',text: 'select',icon: 'extension'},
|
||||
{href: '/puzzle',text: 'Puzzle',icon: 'extension'},
|
||||
{href: '/images',text: 'Images',icon: 'camera_roll'},
|
||||
{href: '/tabs',text: 'tabs',icon: 'switch_camera'},
|
||||
{href: '/ping',text: 'ping',icon: 'update'},
|
||||
{href: '/timeline',text: 'time line',icon: 'timelapse'},
|
||||
{href: '/thumbnail',text: 'thumbnail',icon: 'touch_app'}
|
||||
{href: '/timeline',text: 'time line',icon: 'timelapse'}
|
||||
]},
|
||||
{href: '/settings',text: 'settings',icon: 'settings' }
|
||||
]
|
||||
|
|
@ -174,11 +189,27 @@ const app = new Vue({
|
|||
HTTP.get("logout").then(r=>{
|
||||
alert("logout")
|
||||
})
|
||||
|
||||
},
|
||||
showAlert(msg){
|
||||
this.alert.msg=msg
|
||||
this.alert.show=true
|
||||
}
|
||||
},
|
||||
created(){
|
||||
console.log("create-----------")
|
||||
// Add a response interceptor
|
||||
|
||||
HTTP.interceptors.response.use(
|
||||
(response)=> {
|
||||
// Do something with response data
|
||||
return response;
|
||||
},
|
||||
(error) =>{
|
||||
// Do something with response error
|
||||
this.showAlert("http error:\n"+error.response.data)
|
||||
return Promise.reject(error);
|
||||
});
|
||||
|
||||
HTTP.get("status")
|
||||
.then(r=>{
|
||||
console.log("status",r.data)
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ for nav drawer
|
|||
</v-list-tile-action>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>
|
||||
{{ child.text }}
|
||||
{{ child.text }}
|
||||
</v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
|
|
|
|||
12
src/vue-poc/data/vue-poc/tasks/taskdefs.xml
Normal file
12
src/vue-poc/data/vue-poc/tasks/taskdefs.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<tasks>
|
||||
<task name="xqdoc">
|
||||
<url>tasks/xqdoc</url>
|
||||
<description></description>
|
||||
</task>
|
||||
<task name="vue-compile">
|
||||
<url>tasks/vue-compile</url>
|
||||
</task>
|
||||
<task name="model-compile">
|
||||
<url>tasks/model</url>
|
||||
</task>
|
||||
</tasks>
|
||||
393
src/vue-poc/data/vue-poc/xproc/xproc-steps-lib.xpl
Normal file
393
src/vue-poc/data/vue-poc/xproc/xproc-steps-lib.xpl
Normal file
|
|
@ -0,0 +1,393 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<p:library xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:p="http://www.w3.org/ns/xproc"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
|
||||
|
||||
|
||||
<p:declare-step type="p:add-attribute">
|
||||
<p:input port="source" />
|
||||
<p:output port="result" />
|
||||
<p:option name="match" xsi:type="" required="true" /> <!-- XSLTMatchPattern -->
|
||||
<p:option name="attribute-name" xsi:type="xs:QName" required="true" /> <!-- -->
|
||||
<p:option name="attribute-prefix" xsi:type="NCName" /> <!-- -->
|
||||
<p:option name="attribute-namespace" xsi:type="anyURI" /> <!-- -->
|
||||
<p:option name="attribute-value" xsi:type="string" required="true" /> <!-- -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:add-xml-base">
|
||||
<p:input port="source" />
|
||||
<p:output port="result" />
|
||||
<p:option name="all" xsi:type="boolean" select="'false'" /> <!-- -->
|
||||
<p:option name="relative" xsi:type="boolean" select="'true'" /> <!-- -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:compare">
|
||||
<p:input port="source" primary="true" />
|
||||
<p:input port="alternate" />
|
||||
<p:output port="result" xsi:type="" primary="false" />
|
||||
<p:option name="fail-if-not-equal" xsi:type="boolean" select="'false'" /> <!-- -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:count">
|
||||
<p:input port="source" sequence="true" />
|
||||
<p:output port="result" />
|
||||
<p:option name="limit" xsi:type="integer" select="0" /> <!-- -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:delete">
|
||||
<p:input port="source" />
|
||||
<p:output port="result" />
|
||||
<p:option name="match" xsi:type="" required="true" /> <!-- XSLTMatchPattern -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:directory-list">
|
||||
<p:output port="result" />
|
||||
<p:option name="path" xsi:type="anyURI" required="true" /> <!-- -->
|
||||
<p:option name="include-filter" xsi:type="" /> <!-- RegularExpression -->
|
||||
<p:option name="exclude-filter" xsi:type="" /> <!-- RegularExpression -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:error">
|
||||
<p:input port="source" primary="false" />
|
||||
<p:output port="result" sequence="true" />
|
||||
<p:option name="code" xsi:type="" required="true" /> <!-- QName -->
|
||||
<p:option name="code-prefix" xsi:type="" /> <!-- NCName -->
|
||||
<p:option name="code-namespace" xsi:type="" /> <!-- anyURI -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:escape-markup">
|
||||
<p:input port="source" />
|
||||
<p:output port="result" />
|
||||
<p:option name="cdata-section-elements" xsi:type="" select="''" /> <!-- ListOfQNames -->
|
||||
<p:option name="doctype-public" xsi:type="" /> <!-- string -->
|
||||
<p:option name="doctype-system" xsi:type="" /> <!-- anyURI -->
|
||||
<p:option name="escape-uri-attributes" xsi:type="" select="'false'" /> <!-- boolean -->
|
||||
<p:option name="include-content-type" xsi:type="" select="'true'" /> <!-- boolean -->
|
||||
<p:option name="indent" xsi:type="" select="'false'" /> <!-- boolean -->
|
||||
<p:option name="media-type" xsi:type="" /> <!-- string -->
|
||||
<p:option name="method" xsi:type="" select="'xml'" /> <!-- QName -->
|
||||
<p:option name="omit-xml-declaration" xsi:type="" select="'true'" /> <!-- boolean -->
|
||||
<p:option name="standalone" xsi:type="" select="'omit'" /> <!-- "true" | "false" | "omit" -->
|
||||
<p:option name="undeclare-prefixes" xsi:type="" /> <!-- boolean -->
|
||||
<p:option name="version" xsi:type="" select="'1.0'" /> <!-- string -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:filter">
|
||||
<p:input port="source" />
|
||||
<p:output port="result" sequence="true" />
|
||||
<p:option name="select" xsi:type="" required="true" /> <!-- XPathExpression -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:http-request">
|
||||
<p:input port="source" />
|
||||
<p:output port="result" />
|
||||
<p:option name="byte-order-mark" xsi:type="" /> <!-- boolean -->
|
||||
<p:option name="cdata-section-elements" xsi:type="" select="''" /> <!-- ListOfQNames -->
|
||||
<p:option name="doctype-public" xsi:type="" /> <!-- string -->
|
||||
<p:option name="doctype-system" xsi:type="" /> <!-- anyURI -->
|
||||
<p:option name="encoding" xsi:type="" /> <!-- string -->
|
||||
<p:option name="escape-uri-attributes" xsi:type="" select="'false'" /> <!-- boolean -->
|
||||
<p:option name="include-content-type" xsi:type="" select="'true'" /> <!-- boolean -->
|
||||
<p:option name="indent" xsi:type="" select="'false'" /> <!-- boolean -->
|
||||
<p:option name="media-type" xsi:type="" /> <!-- string -->
|
||||
<p:option name="method" xsi:type="" select="'xml'" /> <!-- QName -->
|
||||
<p:option name="normalization-form" xsi:type="" select="'none'" /> <!-- NormalizationForm -->
|
||||
<p:option name="omit-xml-declaration" xsi:type="" select="'true'" /> <!-- boolean -->
|
||||
<p:option name="standalone" xsi:type="" select="'omit'" /> <!-- "true" | "false" | "omit" -->
|
||||
<p:option name="undeclare-prefixes" xsi:type="" /> <!-- boolean -->
|
||||
<p:option name="version" xsi:type="" select="'1.0'" /> <!-- string -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:identity">
|
||||
<p:input port="source" sequence="true" />
|
||||
<p:output port="result" sequence="true" />
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:insert">
|
||||
<p:input port="source" primary="true" />
|
||||
<p:input port="insertion" sequence="true" />
|
||||
<p:output port="result" />
|
||||
<p:option name="match" xsi:type="" select="'/*'" /> <!-- XSLTMatchPattern -->
|
||||
<p:option name="position" xsi:type="" required="true" /> <!-- "first-child" | "last-child" | "before" | "after" -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:label-elements">
|
||||
<p:input port="source" />
|
||||
<p:output port="result" />
|
||||
<p:option name="attribute" xsi:type="" select="'xml:id'" /> <!-- QName -->
|
||||
<p:option name="attribute-prefix" xsi:type="" /> <!-- NCName -->
|
||||
<p:option name="attribute-namespace" xsi:type="" /> <!-- anyURI -->
|
||||
<!--<p:option name="label" select="'concat("_",$p:index)'"/> --> <!-- XPathExpression -->
|
||||
<p:option name="match" select="'*'" xsi:type="" /> <!-- XSLTMatchPattern -->
|
||||
<p:option name="replace" xsi:type="" select="'true'" /> <!-- boolean -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:load">
|
||||
<p:output port="result" />
|
||||
<p:option name="href" xsi:type="" required="true" /> <!-- anyURI -->
|
||||
<p:option name="dtd-validate" xsi:type="" select="'false'" /> <!-- boolean -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:make-absolute-uris">
|
||||
<p:input port="source" />
|
||||
<p:output port="result" />
|
||||
<p:option name="match" xsi:type="" required="true" /> <!-- XSLTMatchPattern -->
|
||||
<p:option name="base-uri" xsi:type="" /> <!-- anyURI -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:namespace-rename">
|
||||
<p:input port="source" />
|
||||
<p:output port="result" />
|
||||
<p:option name="from" xsi:type="" /> <!-- anyURI -->
|
||||
<p:option name="to" xsi:type="" /> <!-- anyURI -->
|
||||
<p:option name="apply-to" xsi:type="" select="'all'" /> <!-- "all" | "elements" | "attributes" -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:pack">
|
||||
<p:input port="source" sequence="true" primary="true" />
|
||||
<p:input port="alternate" sequence="true" />
|
||||
<p:output port="result" sequence="true" />
|
||||
<p:option name="wrapper" xsi:type="" required="true" /> <!-- QName -->
|
||||
<p:option name="wrapper-prefix" xsi:type="" /> <!-- NCName -->
|
||||
<p:option name="wrapper-namespace" xsi:type="" /> <!-- anyURI -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:parameters">
|
||||
<p:input port="parameters" kind="parameter" primary="false" />
|
||||
<p:output port="result" primary="false" />
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:rename">
|
||||
<p:input port="source" />
|
||||
<p:output port="result" />
|
||||
<p:option name="match" required="true" /> <!-- XSLTMatchPattern -->
|
||||
<p:option name="new-name" xsi:type="" required="true" /> <!-- QName -->
|
||||
<p:option name="new-prefix" xsi:type="" /> <!-- NCName -->
|
||||
<p:option name="new-namespace" xsi:type="" /> <!-- anyURI -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:replace">
|
||||
<p:input port="source" primary="true" />
|
||||
<p:input port="replacement" />
|
||||
<p:output port="result" />
|
||||
<p:option name="match" xsi:type="" required="true" /> <!-- XSLTMatchPattern -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:set-attributes">
|
||||
<p:input port="source" primary="true" />
|
||||
<p:input port="attributes" />
|
||||
<p:output port="result" />
|
||||
<p:option name="match" xsi:type="" required="true" /> <!-- XSLTMatchPattern -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:sink">
|
||||
<p:input port="source" sequence="true" />
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:split-sequence">
|
||||
<p:input port="source" sequence="true" />
|
||||
<p:output port="matched" sequence="true" primary="true" />
|
||||
<p:output port="not-matched" sequence="true" />
|
||||
<p:option name="initial-only" xsi:type="" select="'false'" /> <!-- boolean -->
|
||||
<p:option name="test" xsi:type="" required="true" /> <!-- XPathExpression -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:store">
|
||||
<p:input port="source" />
|
||||
<p:output port="result" primary="false" />
|
||||
<p:option name="href" xsi:type="" required="true" /> <!-- anyURI -->
|
||||
<p:option name="byte-order-mark" xsi:type="" /> <!-- boolean -->
|
||||
<p:option name="cdata-section-elements" xsi:type="" select="''" /> <!-- ListOfQNames -->
|
||||
<p:option name="doctype-public" xsi:type="" /> <!-- string -->
|
||||
<p:option name="doctype-system" xsi:type="" /> <!-- anyURI -->
|
||||
<p:option name="encoding" xsi:type="" /> <!-- string -->
|
||||
<p:option name="escape-uri-attributes" xsi:type="" select="'false'" /> <!-- boolean -->
|
||||
<p:option name="include-content-type" xsi:type="" select="'true'" /> <!-- boolean -->
|
||||
<p:option name="indent" xsi:type="" select="'false'" /> <!-- boolean -->
|
||||
<p:option name="media-type" xsi:type="" /> <!-- string -->
|
||||
<p:option name="method" xsi:type="" select="'xml'" /> <!-- QName -->
|
||||
<p:option name="normalization-form" xsi:type="" select="'none'" /> <!-- NormalizationForm -->
|
||||
<p:option name="omit-xml-declaration" xsi:type="" select="'true'" /> <!-- boolean -->
|
||||
<p:option name="standalone" xsi:type="" select="'omit'" /> <!-- "true" | "false" | "omit" -->
|
||||
<p:option name="undeclare-prefixes" xsi:type="" /> <!-- boolean -->
|
||||
<p:option name="version" xsi:type="" select="'1.0'" /> <!-- string -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:string-replace">
|
||||
<p:input port="source" />
|
||||
<p:output port="result" />
|
||||
<p:option name="match" xsi:type="" required="true" /> <!-- XSLTMatchPattern -->
|
||||
<p:option name="replace" xsi:type="" required="true" /> <!-- XPathExpression -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:unescape-markup">
|
||||
<p:input port="source" />
|
||||
<p:output port="result" />
|
||||
<p:option name="namespace" xsi:type="" /> <!-- anyURI -->
|
||||
<p:option name="content-type" xsi:type="" select="'application/xml'" /> <!-- string -->
|
||||
<p:option name="encoding" xsi:type="" /> <!-- string -->
|
||||
<p:option name="charset" xsi:type="" /> <!-- string -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:unwrap">
|
||||
<p:input port="source" />
|
||||
<p:output port="result" xsi:type="" />
|
||||
<p:option name="match" xsi:type="" required="true" /> <!-- XSLTMatchPattern -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:wrap">
|
||||
<p:input port="source" />
|
||||
<p:output port="result" />
|
||||
<p:option name="wrapper" xsi:type="" required="true" /> <!-- QName -->
|
||||
<p:option name="wrapper-prefix" xsi:type="" /> <!-- NCName -->
|
||||
<p:option name="wrapper-namespace" xsi:type="" /> <!-- anyURI -->
|
||||
<p:option name="match" xsi:type="" required="true" /> <!-- XSLTMatchPattern -->
|
||||
<p:option name="group-adjacent" xsi:type="" /> <!-- XPathExpression -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:wrap-sequence">
|
||||
<p:input port="source" sequence="true" />
|
||||
<p:output port="result" sequence="true" />
|
||||
<p:option name="wrapper" xsi:type="" required="true" /> <!-- QName -->
|
||||
<p:option name="wrapper-prefix" xsi:type="" /> <!-- NCName -->
|
||||
<p:option name="wrapper-namespace" xsi:type="" /> <!-- anyURI -->
|
||||
<p:option name="group-adjacent" xsi:type="" /> <!-- XPathExpression -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:xinclude">
|
||||
<p:input port="source" />
|
||||
<p:output port="result" />
|
||||
<p:option name="fixup-xml-base" xsi:type="" select="'false'" /> <!-- boolean -->
|
||||
<p:option name="fixup-xml-lang" xsi:type="" select="'false'" /> <!-- boolean -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:xslt">
|
||||
<p:input port="source" sequence="true" primary="true" />
|
||||
<p:input port="stylesheet" />
|
||||
<p:input port="parameters" kind="parameter" />
|
||||
<p:output port="result" primary="true" />
|
||||
<p:output port="secondary" sequence="true" />
|
||||
<p:option name="initial-mode" xsi:type="" /> <!-- QName -->
|
||||
<p:option name="template-name" xsi:type="" /> <!-- QName -->
|
||||
<p:option name="output-base-uri" xsi:type="" /> <!-- anyURI -->
|
||||
<p:option name="version" xsi:type="" /> <!-- string -->
|
||||
</p:declare-step>
|
||||
|
||||
|
||||
|
||||
<p:declare-step type="p:exec">
|
||||
<p:input port="source" primary="true" sequence="true" />
|
||||
<p:output port="result" primary="true" />
|
||||
<p:output port="errors" />
|
||||
<p:output port="exit-status" />
|
||||
<p:option name="command" xsi:type="" required="true" /> <!-- string -->
|
||||
<p:option name="args" xsi:type="" select="''" /> <!-- string -->
|
||||
<p:option name="cwd" xsi:type="" /> <!-- string -->
|
||||
<p:option name="source-is-xml" xsi:type="" select="'true'" /> <!-- boolean -->
|
||||
<p:option name="result-is-xml" xsi:type="" select="'true'" /> <!-- boolean -->
|
||||
<p:option name="wrap-result-lines" xsi:type="" select="'false'" /> <!-- boolean -->
|
||||
<p:option name="errors-is-xml" xsi:type="" select="'false'" /> <!-- boolean -->
|
||||
<p:option name="wrap-error-lines" xsi:type="" select="'false'" /> <!-- boolean -->
|
||||
<p:option name="path-separator" xsi:type="" /> <!-- string -->
|
||||
<p:option name="failure-threshold" xsi:type="" /> <!-- integer -->
|
||||
<p:option name="arg-separator" xsi:type="" select="' '" /> <!-- string -->
|
||||
<p:option name="byte-order-mark" xsi:type="" /> <!-- boolean -->
|
||||
<p:option name="cdata-section-elements" xsi:type="" select="''" /> <!-- ListOfQNames -->
|
||||
<p:option name="doctype-public" xsi:type="" /> <!-- string -->
|
||||
<p:option name="doctype-system" xsi:type="" /> <!-- anyURI -->
|
||||
<p:option name="encoding" xsi:type="" /> <!-- string -->
|
||||
<p:option name="escape-uri-attributes" xsi:type="" select="'false'" /> <!-- boolean -->
|
||||
<p:option name="include-content-type" xsi:type="" select="'true'" /> <!-- boolean -->
|
||||
<p:option name="indent" xsi:type="" select="'false'" /> <!-- boolean -->
|
||||
<p:option name="media-type" /> <!-- string -->
|
||||
<p:option name="method" xsi:type="" select="'xml'" /> <!-- QName -->
|
||||
<p:option name="normalization-form" xsi:type="" select="'none'" /> <!-- NormalizationForm -->
|
||||
<p:option name="omit-xml-declaration" xsi:type="" select="'true'" /> <!-- boolean -->
|
||||
<p:option name="standalone" xsi:type="" select="'omit'" /> <!-- "true" | "false" | "omit" -->
|
||||
<p:option name="undeclare-prefixes" xsi:type="" /> <!-- boolean -->
|
||||
<p:option name="version" xsi:type="" select="'1.0'" /> <!-- string -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:hash">
|
||||
<p:input port="source" primary="true" />
|
||||
<p:output port="result" />
|
||||
<p:input port="parameters" kind="parameter" />
|
||||
<p:option name="value" xsi:type="" required="true" /> <!-- string -->
|
||||
<p:option name="algorithm" xsi:type="" required="true" /> <!-- QName -->
|
||||
<p:option name="match" xsi:type="" required="true" /> <!-- XSLTMatchPattern -->
|
||||
<p:option name="version" xsi:type="" /> <!-- string -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:uuid">
|
||||
<p:input port="source" primary="true" />
|
||||
<p:output port="result" />
|
||||
<p:option name="match" xsi:type="" required="true" /> <!-- XSLTMatchPattern -->
|
||||
<p:option name="version" xsi:type="" /> <!-- integer -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:validate-with-relax-ng">
|
||||
<p:input port="source" primary="true" />
|
||||
<p:input port="schema" />
|
||||
<p:output port="result" />
|
||||
<p:option name="dtd-attribute-values" xsi:type="" select="'false'" /> <!-- boolean -->
|
||||
<p:option name="dtd-id-idref-warnings" xsi:type="" select="'false'" /> <!-- boolean -->
|
||||
<p:option name="assert-valid" xsi:type="" select="'true'" /> <!-- boolean -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:validate-with-schematron">
|
||||
<p:input port="parameters" kind="parameter" />
|
||||
<p:input port="source" primary="true" />
|
||||
<p:input port="schema" />
|
||||
<p:output port="result" primary="true" />
|
||||
<p:output port="report" sequence="true" />
|
||||
<p:option name="phase" xsi:type="" select="'#ALL'" /> <!-- string -->
|
||||
<p:option name="assert-valid" xsi:type="" select="'true'" /> <!-- boolean -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:validate-with-xml-schema">
|
||||
<p:input port="source" primary="true" />
|
||||
<p:input port="schema" sequence="true" />
|
||||
<p:output port="result" />
|
||||
<p:option name="use-location-hints" xsi:type="" select="'false'" /> <!-- boolean -->
|
||||
<p:option name="try-namespaces" xsi:type="" select="'false'" /> <!-- boolean -->
|
||||
<p:option name="assert-valid" xsi:type="" select="'true'" /> <!-- boolean -->
|
||||
<p:option name="mode" xsi:type="" select="'strict'" /> <!-- "strict" | "lax" -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:www-form-urldecode">
|
||||
<p:output port="result" />
|
||||
<p:option name="value" xsi:type="" required="true" /> <!-- string -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:www-form-urlencode">
|
||||
<p:input port="source" primary="true" />
|
||||
<p:input port="parameters" kind="parameter" />
|
||||
<p:output port="result" />
|
||||
<p:option name="match" xsi:type="" required="true" /> <!-- XSLTMatchPattern -->
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:xquery">
|
||||
<p:input port="source" sequence="true" primary="true" />
|
||||
<p:input port="query" />
|
||||
<p:input port="parameters" kind="parameter" />
|
||||
<p:output port="result" sequence="true" />
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:xsl-formatter">
|
||||
<p:input port="source" />
|
||||
<p:input port="parameters" kind="parameter" />
|
||||
<p:output port="result" primary="false" />
|
||||
<p:option name="href" xsi:type="" required="true" /> <!-- anyURI -->
|
||||
<p:option name="content-type" xsi:type="" /> <!-- string -->
|
||||
</p:declare-step>
|
||||
|
||||
<!-- APB additions -->
|
||||
<p:declare-step type="p:viewport">
|
||||
<p:input port="current" />
|
||||
<p:output port="result" primary="false" />
|
||||
</p:declare-step>
|
||||
|
||||
<p:declare-step type="p:for-each">
|
||||
<p:input port="source" />
|
||||
<p:output port="result" sequence="true" primary="false" />
|
||||
</p:declare-step>
|
||||
</p:library>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<template id="home"> <v-layout class="ma-5"> <v-flex
|
||||
<template id="about"> <v-layout class="ma-5"> <v-flex
|
||||
xs4> <v-card hover raised> <v-card-title
|
||||
height="200px" class="pa-5 green lighten-1">
|
||||
<div class="display-1 white--text text-xs-center">VUE-POC</div>
|
||||
|
|
@ -19,6 +19,7 @@ v0.0.2 </v-card-title> </v-card> </v-flex> <v-flex xs4>
|
|||
target="new">js-beautify</a></li>
|
||||
<li><a href="/doc/#/data/app/vue-poc" target="new">doc</a></li>
|
||||
<li><a href="/dba" target="new">DBA app</a></li>
|
||||
<li> <router-link to="database?url=%2Fvue-poc%2F">DB</router-link></li>
|
||||
</ul>
|
||||
</v-flex> <v-btn floating="floating"> <v-icon>add</v-icon> </v-btn> <qd-link
|
||||
href="/dba">REPLACED</qd-link> </v-layout> </template>
|
||||
|
|
|
|||
|
|
@ -31,11 +31,11 @@
|
|||
>
|
||||
<template slot="items" scope="props">
|
||||
<td class="text-xs-right">{{ props.item.time }}</td>
|
||||
<td class="text-xs-right">{{ props.item.address }}</td>
|
||||
<td class="text-xs-right">{{ props.item.user }}</td>
|
||||
<td class="text-xs-right">{{ props.item.type }}</td>
|
||||
<td class="text-xs-right">{{ props.item.ms }}</td>
|
||||
<td ><code>{{ props.item.text }}</code></td>
|
||||
<td class="text-xs-right">{{ props.item.address }}</td>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-card>
|
||||
|
|
@ -52,11 +52,11 @@
|
|||
left: true,
|
||||
value: 'time'
|
||||
},
|
||||
{ text: 'address', value: 'address' },
|
||||
{ text: 'user', value: 'user' },
|
||||
{ text: 'Type', value: 'type' },
|
||||
{ text: 'ms', value: 'ms' },
|
||||
{ text: 'text', value: 'text' }
|
||||
{ text: 'text', value: 'text' },
|
||||
{ text: 'address', value: 'address' },
|
||||
],
|
||||
items:[],
|
||||
pagination:{sortBy: 'time',descending:true,rowsPerPage:25},
|
||||
|
|
|
|||
|
|
@ -6,8 +6,11 @@
|
|||
module namespace vue-api = 'quodatum:vue.api.collection';
|
||||
import module namespace rest = "http://exquery.org/ns/restxq";
|
||||
import module namespace ufile = 'vue-poc/file' at "../../lib/file.xqm";
|
||||
declare namespace c="http://www.w3.org/ns/xproc-step";
|
||||
|
||||
import module namespace entity = 'quodatum.models.generated' at "../../models.gen.xqm";
|
||||
import module namespace dice = 'quodatum.web.dice/v4' at "../../lib/dice.xqm";
|
||||
import module namespace web = 'quodatum.web.utils4' at "../../lib/webutils.xqm";
|
||||
declare namespace c="http://www.w3.org/ns/xproc-step";
|
||||
|
||||
(:~
|
||||
: history list
|
||||
|
|
@ -18,15 +21,10 @@ declare
|
|||
%output:method("json")
|
||||
function vue-api:history( )
|
||||
{
|
||||
let $h:=doc("history.xml")/history/entry
|
||||
return <json type="object" >
|
||||
<items type="array">
|
||||
{$h!(<_ type="object">
|
||||
<url>{@url/string()}</url>
|
||||
<protocol>{@mode/string()}</protocol>
|
||||
</_>)}
|
||||
</items>
|
||||
</json>
|
||||
let $entity:=$entity:list("filehistory")
|
||||
let $items:= $entity("data")()
|
||||
let $d:=trace($items,"66666")
|
||||
return dice:response($items,$entity,web:dice())
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -18,9 +18,7 @@
|
|||
<v-spacer></v-spacer>
|
||||
<v-text-field prepend-icon="search" label="Filter..." v-model="q" type="search"
|
||||
hide-details single-line @keyup.native.enter="filter"></v-text-field>
|
||||
<v-btn icon ripple @click="showInfo=!showInfo">
|
||||
<v-icon >info</v-icon>
|
||||
</v-btn>
|
||||
|
||||
<v-btn icon @click="alert('todo')">
|
||||
<v-icon>view_module</v-icon>
|
||||
</v-btn>
|
||||
|
|
@ -42,7 +40,7 @@
|
|||
<v-list-tile-sub-title>modified: {{ item.modified | formatDate}} size: {{ item.size | readablizeBytes}}</v-list-tile-sub-title>
|
||||
</v-list-tile-content>
|
||||
<v-list-tile-action>
|
||||
<v-btn icon ripple @click.native.stop="info(item.name)">
|
||||
<v-btn icon ripple @click.native.stop="info(item)">
|
||||
<v-icon class="grey--text text--lighten-1">info</v-icon>
|
||||
</v-btn>
|
||||
</v-list-tile-action>
|
||||
|
|
@ -68,12 +66,15 @@
|
|||
</v-flex>
|
||||
<v-flex v-if="showInfo" xs4 grey lighten-3>
|
||||
<v-card flat tile>
|
||||
<v-card-actions >
|
||||
<v-card-title >test</v-card-title>
|
||||
<v-toolbar >
|
||||
<v-card-title >{{selected.name}}</v-card-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn flat icon @click.native="showInfo = false"><v-icon>highlight_off</v-icon></v-btn>
|
||||
</v-toolbar>
|
||||
<v-card-text> Things to do with </v-card-text>
|
||||
<v-card-actions>
|
||||
<v-btn flat @click="doit()"><v-icon>run</v-icon>run</v-btn>
|
||||
</v-card-actions>
|
||||
<v-card-text> blah blah protocol: </v-card-text>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
|
@ -129,6 +130,9 @@
|
|||
info(item){
|
||||
this.selected=item
|
||||
this.showInfo=true
|
||||
},
|
||||
doit(){
|
||||
alert("doit")
|
||||
}
|
||||
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
<history>
|
||||
<entry mode="webfile" url='/vue-poc/vue-poc.xqm' />
|
||||
<entry mode="webfile" url='/vue-poc/data/vue-poc/ch4d1.xml' />
|
||||
<entry mode="webfile" url='/vue-poc/static/app-gen.js' />
|
||||
<entry mode="webfile" url='/vue-poc/static/app.html' />
|
||||
<entry mode="webfile" url='/vue-poc/static/app.css' />
|
||||
<entry mode="webfile" url='/vue-poc/logo.svg' />
|
||||
<entry mode="webfile" url='/vue-poc/static/resources/sparql.rq' />
|
||||
<entry mode="webfile" url='/vue-poc/static/resources/turtle.ttl' />
|
||||
<entry mode="webfile" url='/vue-poc/static/resources/task.xsd' />
|
||||
<entry mode="webfile" url='/vue-poc/static/resources/ark/ark.sch' />
|
||||
<entry mode="basexdb" url='/abide/abide.xml' />
|
||||
<entry mode="basexdb" url='/vue-poc' />
|
||||
</history>
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<template id="about"> <v-layout class="ma-5"> <v-flex
|
||||
<template id="home"> <v-layout class="ma-5"> <v-flex
|
||||
xs4> <v-card hover raised> <v-card-title
|
||||
height="200px" class="pa-5 green lighten-1">
|
||||
<div class="display-1 white--text text-xs-center">VUE-POC</div>
|
||||
v0.0.2 </v-card-title> </v-card> </v-flex> <v-flex xs4>
|
||||
<p>
|
||||
This is a experiment in using
|
||||
<code>vue.js</code>
|
||||
<code>vue.js</code> and vuetifyjs
|
||||
.
|
||||
</p>
|
||||
<ul>
|
||||
|
|
@ -19,6 +19,7 @@ v0.0.2 </v-card-title> </v-card> </v-flex> <v-flex xs4>
|
|||
target="new">js-beautify</a></li>
|
||||
<li><a href="/doc/#/data/app/vue-poc" target="new">doc</a></li>
|
||||
<li><a href="/dba" target="new">DBA app</a></li>
|
||||
<li><a href="/vue-poc/ui/database?url=%2Fvue-poc%2F" target="new">db</a></li>
|
||||
</ul>
|
||||
</v-flex> <v-btn floating="floating"> <v-icon>add</v-icon> </v-btn> <qd-link
|
||||
href="/dba">REPLACED</qd-link> </v-layout> </template>
|
||||
|
|
|
|||
|
|
@ -7,6 +7,11 @@
|
|||
<v-card-title >
|
||||
<span class="white--text">Generate <code>model.gen.xqm</code></span>
|
||||
</v-card-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn primary @click.native="submit()" :loading="waiting"
|
||||
:disabled="waiting">
|
||||
<v-icon>play_circle_outline</v-icon>
|
||||
Run</v-btn>
|
||||
</v-toolbar>
|
||||
<v-card-text>
|
||||
<v-container fluid>
|
||||
|
|
@ -30,12 +35,7 @@
|
|||
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-btn primary @click.native="submit()" :loading="waiting"
|
||||
:disabled="waiting">
|
||||
<v-icon>play_circle_outline</v-icon>
|
||||
Run</v-btn>
|
||||
</v-card-actions>
|
||||
|
||||
<v-snackbar v-model="snackbar.show"
|
||||
:timeout="6000"
|
||||
:success="snackbar.context === 'success'"
|
||||
|
|
|
|||
13
src/vue-poc/features/tasks/taskdef.xml
Normal file
13
src/vue-poc/features/tasks/taskdef.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<tasks>
|
||||
<task name="tasks/model">
|
||||
<title>
|
||||
Generate
|
||||
<code>model.gen.xqm</code>
|
||||
</title>
|
||||
<description></description>
|
||||
<params>
|
||||
<param name="efolder">Folder containing model definitions as xml</param>
|
||||
<param name="target">Path to xqm file to generate</param>
|
||||
</params>
|
||||
</task>
|
||||
</tasks>
|
||||
|
|
@ -9,6 +9,9 @@
|
|||
<li>
|
||||
<router-link to="tasks/xqdoc">xqdoc</router-link>
|
||||
</li>
|
||||
<li>
|
||||
<router-link to="tasks/vuecompile">vue compile</router-link>
|
||||
</li>
|
||||
</ul>
|
||||
</v-container>
|
||||
</template>
|
||||
|
|
|
|||
23
src/vue-poc/features/tasks/vue-compile/rxq-vue-compile.xqm
Normal file
23
src/vue-poc/features/tasks/vue-compile/rxq-vue-compile.xqm
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
(:~
|
||||
: compile
|
||||
:)
|
||||
module namespace vue-rest = 'quodatum:vue.rest';
|
||||
import module namespace vue = 'quodatum:vue.compile' at "../../../lib/vue-compile/vue-compile.xqm";
|
||||
|
||||
|
||||
|
||||
(:~
|
||||
: run compile task.
|
||||
:)
|
||||
declare
|
||||
%rest:POST %rest:path("/vue-poc/api/tasks/vue-compile")
|
||||
%rest:form-param("proj", "{$proj}")
|
||||
%rest:produces("application/json")
|
||||
%output:method("json")
|
||||
%updating
|
||||
function vue-rest:vue($proj )
|
||||
{
|
||||
let $op:=vue:compile($proj)
|
||||
return db:output(<json type="object"><msg> { $proj }.</msg></json>)
|
||||
};
|
||||
|
||||
76
src/vue-poc/features/tasks/vue-compile/vuecompile.vue
Normal file
76
src/vue-poc/features/tasks/vue-compile/vuecompile.vue
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
<!DOCTYPE html>
|
||||
<template id="vuecompile">
|
||||
<v-container fluid>
|
||||
<v-card >
|
||||
<v-toolbar class="orange darken-1">
|
||||
<v-btn icon to="/tasks"><v-icon>arrow_back</v-icon></v-btn>
|
||||
<v-card-title >
|
||||
<span class="white--text">compile</span>
|
||||
</v-card-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn primary @click.native="submit()" :loading="waiting"
|
||||
:disabled="waiting">
|
||||
<v-icon>play_circle_outline</v-icon>
|
||||
Run</v-btn>
|
||||
</v-toolbar>
|
||||
<v-card-text>
|
||||
<v-container fluid>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs6>
|
||||
<v-text-field v-model="params.proj"
|
||||
label="vue project to compile"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
<code>{{code}}</code>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
|
||||
<v-snackbar v-model="snackbar.show"
|
||||
:timeout="6000"
|
||||
:success="snackbar.context === 'success'"
|
||||
:error="snackbar.context === 'error'"
|
||||
>
|
||||
{{ snackbar.msg }}
|
||||
<v-btn dark flat @click.native="snackbar.show = false">Close</v-btn>
|
||||
</v-snackbar>
|
||||
</v-card>
|
||||
</v-container>
|
||||
</template>
|
||||
|
||||
<script>{
|
||||
data: function(){
|
||||
return {
|
||||
params:{
|
||||
proj:"C:/Users/andy/git/vue-poc/src/vue-poc/"
|
||||
},
|
||||
waiting:false,
|
||||
snackbar:{show:false,msg:"",context:"success"},
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
submit(){
|
||||
this.waiting=true
|
||||
HTTP.post("tasks/vue-compile",Qs.stringify(this.params))
|
||||
.then(r=>{
|
||||
this.waiting=false
|
||||
this.snackbar={show:true,msg:r.data.msg,context:"success"}
|
||||
console.log(r.data)
|
||||
})
|
||||
.catch(error=>{
|
||||
this.waiting=false
|
||||
this.snackbar={show:true,msg:"Problem",context:"error"}
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
code(){return 'code here'}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -5,13 +5,13 @@
|
|||
: $target:="file:///C:/Users/andy/workspace/app-doc/src/doc/generated/models.xqm"
|
||||
:)
|
||||
module namespace vue-api = 'quodatum:vue.api';
|
||||
import module namespace xqd = 'quodatum:build.xqdoc' at "../../../lib/xqdoc/xqdoc-proj.xqm";
|
||||
import module namespace fw="quodatum:file.walker";
|
||||
declare namespace c="http://www.w3.org/ns/xproc-step";
|
||||
|
||||
declare variable $vue-api:HTML5:=map{"method": "html","version":"5.0"};
|
||||
declare variable $vue-api:mod-xslt external :="html-module.xsl";
|
||||
|
||||
(:~
|
||||
: Returns a file content.
|
||||
: run xqdoc task.
|
||||
:)
|
||||
declare
|
||||
%rest:POST %rest:path("/vue-poc/api/tasks/xqdoc")
|
||||
|
|
@ -21,37 +21,9 @@ declare
|
|||
%output:method("json")
|
||||
%updating
|
||||
function vue-api:model($efolder ,$target )
|
||||
{(
|
||||
let $files:= fw:directory-list($efolder,map{"include-filter":".*\.xqm"})//c:file
|
||||
let $op:=vue-api:save-xq($files,$target)
|
||||
return db:output(<json type="object"><msg> {$target}, {count($files)} files written.</msg></json>)
|
||||
)};
|
||||
|
||||
|
||||
declare function vue-api:save-xq($files,$target)
|
||||
{
|
||||
let $params:=map{
|
||||
"project":"BCH",
|
||||
"source":"Not available",
|
||||
"cache":true() }
|
||||
return for $f in $files
|
||||
let $ip:=$f/@name/resolve-uri(.,base-uri(.))
|
||||
let $op:=$f/ancestor-or-self::*/@name=>string-join("/")
|
||||
let $xq:=inspect:xqdoc(trace($ip,"iiii"))
|
||||
let $dest:=file:resolve-path($op,$target)
|
||||
return (
|
||||
vue-api:write2($xq,$dest || ".xml",map{}),
|
||||
vue-api:write2($xq=>xslt:transform($vue-api:mod-xslt,$params),$dest || ".html",$vue-api:HTML5)
|
||||
)
|
||||
};
|
||||
|
||||
declare function vue-api:write2($data,$url as xs:string,$opts as map(*))
|
||||
{
|
||||
let $p:=file:parent($url)
|
||||
return (
|
||||
if(file:is-dir($p)) then () else file:create-dir($p),
|
||||
file:write($url,$data)
|
||||
)
|
||||
};
|
||||
|
||||
{
|
||||
let $files:= fw:directory-list($efolder,map{"include-filter":".*\.xqm"})
|
||||
let $op:=xqd:save-xq($files,$target)
|
||||
return db:output(<json type="object"><msg> {$target}, {count($files//c:file)} files processed.</msg></json>)
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,11 @@
|
|||
<v-card-title >
|
||||
<span class="white--text">Task: Generate <code>xqdoc</code></span>
|
||||
</v-card-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn primary @click.native="submit()" :loading="waiting"
|
||||
:disabled="waiting">
|
||||
<v-icon>play_circle_outline</v-icon>
|
||||
Run</v-btn>
|
||||
</v-toolbar>
|
||||
<v-card-text>
|
||||
<v-container fluid>
|
||||
|
|
@ -28,18 +33,13 @@
|
|||
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-btn primary @click.native="submit()" :loading="waiting"
|
||||
:disabled="waiting">
|
||||
<v-icon>play_circle_outline</v-icon>
|
||||
Run</v-btn>
|
||||
</v-card-actions>
|
||||
|
||||
|
||||
<v-alert success v-model="alert.success">
|
||||
{{alert.msg}}
|
||||
{{alert.timestamp}}:{{alert.msg}}
|
||||
</v-alert>
|
||||
<v-alert error v-model="alert.error">
|
||||
<code>{{alert.msg}}</code>
|
||||
{{alert.timestamp}}:<code>{{alert.msg}}</code>
|
||||
</v-alert>
|
||||
</v-card>
|
||||
<code>{{code}}</code>
|
||||
|
|
@ -60,6 +60,7 @@
|
|||
methods:{
|
||||
submit(){
|
||||
this.waiting=true
|
||||
this.alert={msg:"Loading..",success:false,error:false}
|
||||
HTTP.post("tasks/xqdoc",Qs.stringify(this.params))
|
||||
.then(r=>{
|
||||
this.waiting=false
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
vueState: {
|
||||
|
||||
data1: [
|
||||
{ id: 1, content: 'item 1', start: '2013-04-20' },
|
||||
{ id: 1, content: 'item 1', start: '2013-04-20 23:06:15.304' },
|
||||
{ id: 2, content: 'item 2', start: '2013-04-14' },
|
||||
{ id: 3, content: 'item 3', start: '2013-04-18' },
|
||||
{ id: 4, content: 'item 4', start: '2013-04-16', end: '2013-04-19' },
|
||||
|
|
|
|||
38
src/vue-poc/history.xml
Normal file
38
src/vue-poc/history.xml
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<history next-id="13" xmlns="urn:quodatum:vue-poc.history" >
|
||||
<event id="1" user="admin" when="">
|
||||
<file mode="webfile" url="/vue-poc/vue-poc.xqm"/>
|
||||
</event>
|
||||
<event id="2">
|
||||
<file mode="webfile" url="/vue-poc/data/vue-poc/ch4d1.xml"/>
|
||||
</event>
|
||||
<event id="3">
|
||||
<file mode="webfile" url="/vue-poc/static/app-gen.js"/>
|
||||
</event>
|
||||
<event id="4">
|
||||
<file mode="webfile" url="/vue-poc/static/app.html"/>
|
||||
</event>
|
||||
<event id="5">
|
||||
<file mode="webfile" url="/vue-poc/static/app.css"/>
|
||||
</event>
|
||||
<event id="6">
|
||||
<file mode="webfile" url="/vue-poc/logo.svg"/>
|
||||
</event>
|
||||
<event id="7">
|
||||
<file mode="webfile" url="/vue-poc/static/resources/semantic/sparql.rq"/>
|
||||
</event>
|
||||
<event id="8">
|
||||
<file mode="webfile" url="/vue-poc/static/resources/semantic/turtle.ttl"/>
|
||||
</event>
|
||||
<event id="9">
|
||||
<file mode="webfile" url="/vue-poc/static/resources/task.xsd"/>
|
||||
</event>
|
||||
<event id="10">
|
||||
<file mode="webfile" url="/vue-poc/static/resources/schematron/ark/ark.sch"/>
|
||||
</event>
|
||||
<event id="11">
|
||||
<file mode="basexdb" url="/abide/abide.xml"/>
|
||||
</event>
|
||||
<event id="12">
|
||||
<collection mode="basexdb" url="/vue-poc"/>
|
||||
</event>
|
||||
</history>
|
||||
75
src/vue-poc/lib/dbtools.xqm
Normal file
75
src/vue-poc/lib/dbtools.xqm
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
(:~
|
||||
: tools for databases..
|
||||
: @author andy bunce
|
||||
: @since mar 2013
|
||||
:)
|
||||
|
||||
module namespace dbtools = 'quodatum.dbtools';
|
||||
|
||||
|
||||
(: trailing slash :)
|
||||
declare variable $dbtools:webpath:= db:system()/globaloptions/webpath/fn:string()
|
||||
|| file:dir-separator();
|
||||
|
||||
(:~
|
||||
: save all in db to zip
|
||||
: no binary yet
|
||||
:)
|
||||
declare function dbtools:zip($dbname as xs:string)
|
||||
as xs:base64Binary{
|
||||
let $files:=db:list($dbname)
|
||||
let $zip := archive:create(
|
||||
$files ! element archive:entry { . },
|
||||
$files ! fn:serialize(db:open($dbname, .))
|
||||
)
|
||||
return $zip
|
||||
};
|
||||
|
||||
(:~
|
||||
: update or create database from file path
|
||||
: @param $dbname name of database
|
||||
: @param $path file path contain files
|
||||
:)
|
||||
declare %updating function dbtools:sync-from-path($dbname as xs:string,$path as xs:string){
|
||||
dbtools:sync-from-files($dbname,
|
||||
$path,
|
||||
file:list($path,fn:true()),
|
||||
hof:id#1)
|
||||
};
|
||||
|
||||
(:~
|
||||
: update or create database from file list. After this the database will have a
|
||||
: matching copy of the files on the file system
|
||||
: @param $dbname name of database
|
||||
: @param $path base file path where files are relative to en
|
||||
: @param $files file names from base
|
||||
: @param $ingest function to apply f(fullsrcpath)->anotherpath or xml nodes
|
||||
:)
|
||||
declare %updating
|
||||
function dbtools:sync-from-files($dbname as xs:string,
|
||||
$path as xs:string,
|
||||
$files as xs:string*,
|
||||
$ingest as function(*))
|
||||
{
|
||||
let $path:=$path ||"/"
|
||||
let $files:=$files!fn:translate(.,"\","/")
|
||||
let $files:=fn:filter($files,function($f){file:is-file(fn:concat($path,$f))})
|
||||
return if(db:exists($dbname)) then
|
||||
(
|
||||
for $d in db:list($dbname)
|
||||
where fn:not($d=$files)
|
||||
return db:delete($dbname,$d),
|
||||
|
||||
for $f in $files
|
||||
let $_:=fn:trace($path || $f,"file:")
|
||||
let $content:=$ingest($path || $f)
|
||||
return db:replace($dbname,$f,$content),
|
||||
|
||||
db:optimize($dbname)
|
||||
)
|
||||
else
|
||||
let $full:=$files!fn:concat($path,.)
|
||||
let $content:=$full!$ingest(.)
|
||||
return (db:create($dbname,$content,$files))
|
||||
};
|
||||
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
(:~
|
||||
: create app-gen.js from vue files
|
||||
: compile vue files to js
|
||||
:)
|
||||
module namespace vue = 'quodatum:vue.compile';
|
||||
|
||||
import module namespace html5="text.html5" at "html5parse.xqm";
|
||||
import module namespace fw="quodatum:file.walker";
|
||||
declare namespace c="http://www.w3.org/ns/xproc-step";
|
||||
|
|
@ -9,36 +11,42 @@ declare namespace Element="java:ch.digitalfondue.jfiveparse.Element";
|
|||
declare namespace Node="java:ch.digitalfondue.jfiveparse.Node";
|
||||
|
||||
declare namespace functx = "http://www.functx.com";
|
||||
declare variable $PROJ:="C:/Users/andy/git/vue-poc/src/vue-poc/";
|
||||
declare variable $FEATURES:="features/"=>file:resolve-path($PROJ);
|
||||
declare variable $COMPONENTS:="components/"=>file:resolve-path($PROJ);
|
||||
declare variable $CORE:="components/core.js"=>file:resolve-path($PROJ);
|
||||
declare variable $FILTERS:="components/filters.js"=>file:resolve-path($PROJ);
|
||||
declare variable $DEST:="static/app-gen.js"=>file:resolve-path($PROJ);
|
||||
declare variable $vue:PROJ:="C:/Users/andy/git/vue-poc/src/vue-poc/";
|
||||
declare variable $vue:FEATURES:="features/";
|
||||
declare variable $vue:COMPONENTS:="components/";
|
||||
declare variable $vue:CORE:="components/core.js";
|
||||
declare variable $vue:FILTERS:="components/filters.js";
|
||||
declare variable $vue:DEST:="static/app-gen.js";
|
||||
|
||||
(:~
|
||||
: generate javascript vue call from vue files in source folder and core.js
|
||||
: @param $doc url for vue file
|
||||
:)
|
||||
declare function local:feature($doc,$isComp as xs:boolean)
|
||||
declare function vue:feature($doc,$isComp as xs:boolean)
|
||||
as xs:string
|
||||
{
|
||||
let $p:=local:vue-parse($doc)
|
||||
let $p:=vue:parse($doc)
|
||||
let $script:= $p?script=>substring-after("{")
|
||||
|
||||
return if(empty($p?id)) then
|
||||
()
|
||||
else if($isComp) then
|
||||
``[Vue.component('`{$p?id}`',{template:` `{$p?template}` `,
|
||||
``[Vue.component('`{ $p?id }`',{template:` `{ $p?template }` `,
|
||||
`{$script}`
|
||||
);
|
||||
]``
|
||||
else
|
||||
``[const `{functx:capitalize-first($p?id)}`=Vue.extend({template:` `{$p?template}` `,
|
||||
`{$script}`
|
||||
``[const `{ vue:capitalize-first($p?id) }`=Vue.extend({template:` `{ $p?template }` `,
|
||||
`{ $script }`
|
||||
);
|
||||
]``
|
||||
};
|
||||
|
||||
declare function local:vue-parse($doc)
|
||||
(:~
|
||||
: parse a vue file to extract template and script
|
||||
: @return map{"id":$id,"template":$template,"script":$script}
|
||||
:)
|
||||
declare function vue:parse($doc)
|
||||
as map(*)
|
||||
{
|
||||
let $tempNode:= html5:getElementFirstByTagName($doc,"template")
|
||||
|
|
@ -50,19 +58,31 @@ as map(*)
|
|||
return map{"id":$id,"template":$template,"script":$script}
|
||||
};
|
||||
|
||||
declare function functx:capitalize-first
|
||||
declare function vue:capitalize-first
|
||||
( $arg as xs:string? ) as xs:string?
|
||||
{
|
||||
concat(upper-case(substring($arg,1,1)), substring($arg,2))
|
||||
};
|
||||
|
||||
(:~
|
||||
: compile vue code to "static/app-gen.js"
|
||||
: @param $proj root folder e.g "C:/Users/andy/git/vue-poc/src/vue-poc/"
|
||||
:)
|
||||
declare function vue:compile($proj as xs:string)
|
||||
{
|
||||
let $FEATURES:="features/"=>file:resolve-path($proj)
|
||||
let $COMPONENTS:="components/"=>file:resolve-path($proj)
|
||||
let $CORE:="components/core.js"=>file:resolve-path($proj)
|
||||
let $FILTERS:="components/filters.js"=>file:resolve-path($proj)
|
||||
let $DEST:="static/app-gen.js"=>file:resolve-path($proj)
|
||||
|
||||
let $files:= fw:directory-list($FEATURES,map{"include-filter":".*\.vue"})
|
||||
//c:file/@name/resolve-uri(.,base-uri(.))
|
||||
let $feats:=$files!(fetch:text(.)=>html5:doc()=>local:feature(false()))
|
||||
let $feats:=$files!(fetch:text(.)=>html5:doc()=>vue:feature(false()))
|
||||
|
||||
let $files:= fw:directory-list($COMPONENTS,map{"include-filter":".*\.vue"})
|
||||
//c:file/@name/resolve-uri(.,base-uri(.))
|
||||
let $comps:=$files!(fetch:text(.)=>html5:doc()=>local:feature(true()))
|
||||
let $comps:=$files!(fetch:text(.)=>html5:doc()=>vue:feature(true()))
|
||||
|
||||
let $comment:="// generated " || current-dateTime() || "

"
|
||||
return file:write-text($DEST,string-join(($comment,
|
||||
|
|
@ -70,3 +90,4 @@ return file:write-text($DEST,string-join(($comment,
|
|||
fetch:text($FILTERS),
|
||||
$feats,
|
||||
fetch:text($CORE))))
|
||||
};
|
||||
66
src/vue-poc/lib/xqdoc/html-index.xsl
Normal file
66
src/vue-poc/lib/xqdoc/html-index.xsl
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:doc="http://www.xqdoc.org/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
|
||||
xmlns:qd="http://www.quodatum.com/ns/xsl" exclude-result-prefixes="xs doc fn"
|
||||
xmlns:c="http://www.w3.org/ns/xproc-step" version="2.0">
|
||||
<!-- build project index" -->
|
||||
<xsl:param name="project" as="xs:string" />
|
||||
|
||||
<xsl:param name="resources" as="xs:string" select="'resources/'" />
|
||||
|
||||
<xsl:variable name="css" select="'resources/base.css'" />
|
||||
|
||||
<xsl:template match="/">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta http-equiv="Generator"
|
||||
content="xqdoc-r - https://github.com/quodatum/xqdoc-r" />
|
||||
|
||||
<title>
|
||||
<xsl:value-of select="'Index'" />
|
||||
- xqDoc
|
||||
</title>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="{$resources}xqdoc.png" />
|
||||
<link rel="stylesheet" type="text/css" href="{$resources}page.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{$resources}query.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{$resources}base.css" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="{$resources}prettify.css" />
|
||||
|
||||
<script src="{$resources}prettify.js" type="text/javascript"> </script>
|
||||
<script src="{$resources}lang-xq.js" type="text/javascript"> </script>
|
||||
</head>
|
||||
<body class="home" id="top">
|
||||
<div id="main">
|
||||
<h1>
|
||||
XQDoc for <xsl:value-of select="$project"/>
|
||||
</h1>
|
||||
<ul>
|
||||
<xsl:apply-templates select=".//c:file" />
|
||||
</ul>
|
||||
|
||||
<div class="footer">
|
||||
<p style="text-align:right">
|
||||
|
|
||||
generated at
|
||||
<xsl:value-of select="current-dateTime()" />
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="c:file">
|
||||
<li>
|
||||
<a href="{@name}/index.html">
|
||||
<xsl:value-of select="@name" />
|
||||
</a>
|
||||
</li>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
|
@ -2,50 +2,62 @@
|
|||
<xsl:stylesheet xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:doc="http://www.xqdoc.org/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
|
||||
exclude-result-prefixes="xs doc fn" version="2.0">
|
||||
<!-- Standalone xqdoc:xqdoc transform -->
|
||||
xmlns:qd="http://www.quodatum.com/ns/xsl" exclude-result-prefixes="xs doc fn"
|
||||
version="2.0">
|
||||
<!-- Standalone xqdoc:xqdoc transform
|
||||
mode"restxq"
|
||||
-->
|
||||
<xsl:param name="project" as="xs:string" />
|
||||
<xsl:param name="source" as="xs:string" />
|
||||
<xsl:param name="filename" as="xs:string" />
|
||||
<xsl:param name="show-private" as="xs:boolean" select="false()" />
|
||||
<xsl:param name="resources" as="xs:string" select="'../resources/'" />
|
||||
|
||||
<xsl:variable name="css" select="'../resources/base.css'" />
|
||||
<xsl:variable name="index" select="'../index.html'" />
|
||||
<xsl:variable name="vars"
|
||||
select="//doc:variable[$show-private or not(doc:annotations/doc:annotation/@name='private')]" />
|
||||
<xsl:variable name="funs"
|
||||
select="//doc:function[$show-private or not(doc:annotations/doc:annotation/@name='private')]" />
|
||||
<xsl:variable name="docuri"
|
||||
select="//doc:xqdoc/doc:module/doc:uri/string()" />
|
||||
<!-- uses RESTXQ namespace -->
|
||||
<xsl:variable name="restxq"
|
||||
select="//doc:namespace[@uri='http://exquery.org/ns/restxq']/@prefix/string()" />
|
||||
<!-- generate module html // -->
|
||||
<xsl:template match="//doc:xqdoc">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta http-equiv="Generator"
|
||||
content="xquerydoc - https://github.com/xquery/xquerydoc" />
|
||||
content="xqdoc-r - https://github.com/quodatum/xqdoc-r" />
|
||||
|
||||
<title>
|
||||
<xsl:value-of select="$docuri" />
|
||||
- xqDoc
|
||||
</title>
|
||||
<link rel="stylesheet" type="text/css" href="../resources/page.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../resources/query.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{$css}" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="{$resources}xqdoc.png" />
|
||||
<link rel="stylesheet" type="text/css" href="{$resources}page.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{$resources}query.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{$resources}base.css" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../resources/prettify.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{$resources}prettify.css" />
|
||||
|
||||
<script src="../resources/prettify.js" type="text/javascript"> </script>
|
||||
<script src="../resources/lang-xq.js" type="text/javascript"> </script>
|
||||
<script src="{$resources}prettify.js" type="text/javascript"> </script>
|
||||
<script src="{$resources}lang-xq.js" type="text/javascript"> </script>
|
||||
</head>
|
||||
<body class="home" id="top">
|
||||
<div id="main">
|
||||
<xsl:apply-templates select="doc:module" />
|
||||
|
||||
<xsl:call-template name="toc" />
|
||||
<xsl:apply-templates select="doc:variables" />
|
||||
<xsl:apply-templates select="doc:functions" />
|
||||
|
||||
<xsl:apply-templates select="doc:namespaces" />
|
||||
<xsl:apply-templates select="doc:functions"
|
||||
mode="restxq" />
|
||||
<div>
|
||||
<h3>Original Source Code</h3>
|
||||
<h3 id="source">Original Source Code</h3>
|
||||
<pre class="prettyprint lang-xq">
|
||||
<xsl:value-of select="$source" />
|
||||
</pre>
|
||||
|
|
@ -55,7 +67,13 @@
|
|||
<div class="footer">
|
||||
<p style="text-align:right">
|
||||
<i>
|
||||
<xsl:value-of select="()" />
|
||||
<xsl:value-of select="$filename" />
|
||||
<a href="xqdoc.xml" target="xqdoc">
|
||||
xqdoc
|
||||
</a>
|
||||
<a href="xparse.xml" target="xparse">
|
||||
xparse
|
||||
</a>
|
||||
</i>
|
||||
|
|
||||
generated at
|
||||
|
|
@ -73,17 +91,19 @@
|
|||
|
||||
<xsl:template match="doc:module">
|
||||
<h1>
|
||||
<xsl:value-of select="@type" />
|
||||
module 
|
||||
<span class="namespace">
|
||||
<xsl:value-of select="doc:uri" />
|
||||
</span>
|
||||
 
|
||||
<xsl:value-of select="@type" />
|
||||
module
|
||||
</h1>
|
||||
<dl>
|
||||
<xsl:apply-templates select="doc:comment/doc:description" />
|
||||
<dt>Tags</dt>
|
||||
<dd>
|
||||
<xsl:if test="$restxq">
|
||||
<span class="tag tag-success">RESTXQ</span>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates
|
||||
select="doc:comment/* except doc:comment/doc:description" />
|
||||
</dd>
|
||||
|
|
@ -96,7 +116,7 @@
|
|||
<a href="#namespaces">Namespaces</a>
|
||||
</h3>
|
||||
<p>The following namespaces are defined:</p>
|
||||
<table style="float:none">
|
||||
<table class="data" style="float:none">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Prefix</th>
|
||||
|
|
@ -193,7 +213,7 @@
|
|||
</a>
|
||||
</h4>
|
||||
|
||||
<xsl:apply-templates select="$fun[1]/doc:comment/doc:description" />
|
||||
<xsl:apply-templates select="$fun/doc:comment/doc:description[1]" />
|
||||
<dt class="label">Signature</dt>
|
||||
<dd>
|
||||
<xsl:apply-templates select="$fun" mode="signature" />
|
||||
|
|
@ -201,7 +221,7 @@
|
|||
<xsl:apply-templates select="$fun[1]/doc:parameters" />
|
||||
<xsl:apply-templates select="$fun[1]/doc:return" />
|
||||
<xsl:apply-templates select="$fun[1]/doc:comment/doc:error" />
|
||||
<xsl:apply-templates select="$fun[1]/doc:annotations" />
|
||||
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
|
|
@ -231,6 +251,36 @@
|
|||
<xsl:value-of select="doc:return/doc:type/@occurrence/string()" />
|
||||
</code>
|
||||
</div>
|
||||
<xsl:apply-templates select="doc:annotations" />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="doc:functions[doc:function]" mode="restxq">
|
||||
<div id="restxq">
|
||||
<h3>
|
||||
<a href="#restxq">RestXQ</a>
|
||||
</h3>
|
||||
<xsl:for-each-group select="qd:restxq($funs)"
|
||||
group-by="doc:literal/string()">
|
||||
<xsl:sort select="current-grouping-key()" />
|
||||
<xsl:variable name="id" select="current-grouping-key()" />
|
||||
<div id="{$id}">
|
||||
<h4>
|
||||
<a href="#{ $id }">
|
||||
<xsl:value-of select="$id" />
|
||||
</a>
|
||||
</h4>
|
||||
<ul>
|
||||
<xsl:for-each select="current-group()/../..">
|
||||
<li>
|
||||
<a href="#{ doc:name }"><xsl:value-of select="doc:name"/></a>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</xsl:for-each-group>
|
||||
<!-- <xsl:apply-templates select="doc:function" /> -->
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="doc:parameters">
|
||||
|
|
@ -282,26 +332,21 @@
|
|||
</xsl:template>
|
||||
|
||||
<xsl:template match="doc:annotations">
|
||||
<h4>Annotations</h4>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<table class="data">
|
||||
<caption style="text-align: left;">Annotations</caption>
|
||||
<tbody>
|
||||
<xsl:for-each select="doc:annotation">
|
||||
<tr>
|
||||
<td>
|
||||
<code class="function">
|
||||
<xsl:text>%</xsl:text>
|
||||
<xsl:value-of select="@name" />
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="doc:literal/@type" />
|
||||
</td>
|
||||
<td>
|
||||
<code class="arg">
|
||||
<xsl:value-of select="doc:literal" />
|
||||
</code>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
|
|
@ -376,14 +421,16 @@
|
|||
<xsl:template name="toc">
|
||||
<nav id="toc">
|
||||
<div>
|
||||
<a href="../#{$project}">↰</a>
|
||||
<span class="namespace">
|
||||
<xsl:value-of select="$docuri" />
|
||||
</span>
|
||||
<a href="{$index}">
|
||||
↰
|
||||
<xsl:value-of select="$project" />
|
||||
</a>
|
||||
</div>
|
||||
<h2>
|
||||
<a id="contents"></a>
|
||||
Table of Contents
|
||||
<span class="namespace">
|
||||
<xsl:value-of select="$docuri" />
|
||||
</span>
|
||||
</h2>
|
||||
<ol class="toc">
|
||||
<li>
|
||||
|
|
@ -406,8 +453,7 @@
|
|||
<li>
|
||||
<a href="#{$id}">
|
||||
<span class="secno">
|
||||
2.
|
||||
<xsl:value-of select="position()" />
|
||||
<xsl:value-of select="concat('2.',position())" />
|
||||
</span>
|
||||
<span class="content">
|
||||
<xsl:value-of select="$id" />
|
||||
|
|
@ -433,11 +479,19 @@
|
|||
<li>
|
||||
<a href="#{$id}">
|
||||
<span class="secno">
|
||||
3.
|
||||
<xsl:value-of select="position()" />
|
||||
<xsl:value-of select="concat('3.',position())" />
|
||||
</span>
|
||||
<span class="content">
|
||||
<span class="content"
|
||||
title="{string((current-group()//doc:description)[1])}">
|
||||
<xsl:value-of select="$id" />
|
||||
<xsl:if test="qd:restxq(current-group())">
|
||||
<div class="tag tag-success" style="float:right"
|
||||
title="RESTXQ: { qd:restxq(current-group())/doc:literal/string() }">R
|
||||
</div>
|
||||
</xsl:if>
|
||||
<xsl:if test="qd:is-updating(current-group())">
|
||||
<div class="tag tag-danger" title="Updating" style="float:right">U</div>
|
||||
</xsl:if>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -453,7 +507,53 @@
|
|||
<span class="content">Namespaces</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<ol class="toc">
|
||||
<li>
|
||||
<a href="#restxq">
|
||||
<span class="secno">5 </span>
|
||||
<span class="content">Restxq</span>
|
||||
</a>
|
||||
<ol class="toc">
|
||||
<xsl:for-each-group select="qd:restxq($funs)"
|
||||
group-by="doc:literal/string()">
|
||||
<xsl:sort select="current-grouping-key()" />
|
||||
<xsl:variable name="id" select="current-grouping-key()" />
|
||||
<li>
|
||||
<a href="#{ current-grouping-key() }">
|
||||
<span class="secno">
|
||||
<xsl:value-of select="concat('5.',position())" />
|
||||
</span>
|
||||
<span class="content">
|
||||
<xsl:value-of select="current-grouping-key()" />
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</xsl:for-each-group>
|
||||
</ol>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</xsl:template>
|
||||
|
||||
<!-- annotation analysis -->
|
||||
<xsl:function name="qd:restxq" as="element(doc:annotation)*">
|
||||
<xsl:param name="fun" as="element(doc:function)*" />
|
||||
<xsl:variable name="found"
|
||||
select="$fun/doc:annotations/doc:annotation[@name=concat($restxq,':path')]" />
|
||||
<xsl:message>
|
||||
<xsl:copy-of select="$found" />
|
||||
</xsl:message>
|
||||
<xsl:sequence select="$found"></xsl:sequence>
|
||||
</xsl:function>
|
||||
|
||||
<xsl:function name="qd:is-updating" as="xs:boolean">
|
||||
<xsl:param name="fun" as="element(doc:function)*" />
|
||||
<xsl:variable name="found"
|
||||
select="$fun/doc:annotations/doc:annotation[@name='updating']" />
|
||||
<xsl:sequence select="not(empty($found))" />
|
||||
</xsl:function>
|
||||
</xsl:stylesheet>
|
||||
BIN
src/vue-poc/lib/xqdoc/resources.zip
Normal file
BIN
src/vue-poc/lib/xqdoc/resources.zip
Normal file
Binary file not shown.
1149
src/vue-poc/lib/xqdoc/resources/base.css
Normal file
1149
src/vue-poc/lib/xqdoc/resources/base.css
Normal file
File diff suppressed because it is too large
Load diff
62
src/vue-poc/lib/xqdoc/resources/lang-xq.js
Normal file
62
src/vue-poc/lib/xqdoc/resources/lang-xq.js
Normal file
File diff suppressed because one or more lines are too long
82
src/vue-poc/lib/xqdoc/resources/page.css
Normal file
82
src/vue-poc/lib/xqdoc/resources/page.css
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
body {
|
||||
font-family: Helvetica;
|
||||
padding: 0.5em 1em;
|
||||
}
|
||||
|
||||
pre {
|
||||
font-family: Inconsolata, Consolas, monospace;
|
||||
}
|
||||
|
||||
ol.results {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.footer {
|
||||
text-align: right;
|
||||
border-top: solid 4px;
|
||||
padding: 0.25em 0.5em;
|
||||
font-size: 85%;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
li.result {
|
||||
list-style-position: inside;
|
||||
list-style: none;
|
||||
height: 140px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h2 a, .result h3 a {
|
||||
text-decoration: inherit;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 140%;
|
||||
background-color: #aaa;
|
||||
border-bottom: 1px solid #000;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 100%;
|
||||
background-color: #ddd;
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.namespace {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.namespace:before {
|
||||
content: "{";
|
||||
}
|
||||
|
||||
.namespace:after {
|
||||
content: "}";
|
||||
}
|
||||
.tag-success {
|
||||
background-color: #5cb85c;
|
||||
}
|
||||
.tag-danger {
|
||||
background-color: #d9534f;
|
||||
}
|
||||
.tag {
|
||||
display: inline;
|
||||
padding: .2em .6em .3em;
|
||||
font-size: 75%;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
vertical-align: baseline;
|
||||
border-radius: .25em;
|
||||
}
|
||||
td {
|
||||
vertical-align: text-top;
|
||||
}
|
||||
48
src/vue-poc/lib/xqdoc/resources/prettify.css
Normal file
48
src/vue-poc/lib/xqdoc/resources/prettify.css
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
/* Pretty printing styles. Used with prettify.js. */
|
||||
|
||||
.str { color: #080; }
|
||||
.kwd { color: #008; }
|
||||
.com { color: #800; }
|
||||
.typ { color: #606; }
|
||||
.lit { color: #066; }
|
||||
.pun { color: #660; }
|
||||
.pln { color: #000; }
|
||||
.tag { color: #008; }
|
||||
.atn { color: #606; }
|
||||
.atv { color: #080; }
|
||||
.dec { color: #606; }
|
||||
/* pw */
|
||||
.fun { color: red; }
|
||||
.var { color: #606; }
|
||||
/* pw end */
|
||||
pre.prettyprint { padding: 2px; border: 1px solid #888 }
|
||||
|
||||
/* Specify class=linenums on a pre to get line numbering */
|
||||
ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */
|
||||
li.L0,
|
||||
li.L1,
|
||||
li.L2,
|
||||
li.L3,
|
||||
li.L5,
|
||||
li.L6,
|
||||
li.L7,
|
||||
li.L8 { list-style-type: none }
|
||||
/* Alternate shading for lines */
|
||||
li.L1,
|
||||
li.L3,
|
||||
li.L5,
|
||||
li.L7,
|
||||
li.L9 { background: #eee }
|
||||
|
||||
@media print {
|
||||
.str { color: #060; }
|
||||
.kwd { color: #006; font-weight: bold; }
|
||||
.com { color: #600; font-style: italic; }
|
||||
.typ { color: #404; font-weight: bold; }
|
||||
.lit { color: #044; }
|
||||
.pun { color: #440; }
|
||||
.pln { color: #000; }
|
||||
.tag { color: #006; font-weight: bold; }
|
||||
.atn { color: #404; }
|
||||
.atv { color: #060; }
|
||||
}
|
||||
1520
src/vue-poc/lib/xqdoc/resources/prettify.js
Normal file
1520
src/vue-poc/lib/xqdoc/resources/prettify.js
Normal file
File diff suppressed because it is too large
Load diff
255
src/vue-poc/lib/xqdoc/resources/query.css
Normal file
255
src/vue-poc/lib/xqdoc/resources/query.css
Normal file
|
|
@ -0,0 +1,255 @@
|
|||
/* from xsl:query.xsl (D) from
|
||||
https://www.w3.org/TR/xpath-functions-31*/
|
||||
div.exampleInner pre {
|
||||
margin-left: 1em;
|
||||
margin-top: 0em;
|
||||
margin-bottom: 0em
|
||||
}
|
||||
|
||||
pre.small {
|
||||
font-size: small
|
||||
}
|
||||
|
||||
div.exampleOuter {
|
||||
border: 4px double gray;
|
||||
margin: 0em;
|
||||
padding: 0em
|
||||
}
|
||||
|
||||
div.exampleInner {
|
||||
background-color: #d5dee3;
|
||||
padding: 4px;
|
||||
margin: 0em
|
||||
}
|
||||
|
||||
div.exampleInner table {
|
||||
border: 0;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
div.exampleInner td {
|
||||
vertical-align: baseline;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
div.exampleWrapper {
|
||||
margin: 4px
|
||||
}
|
||||
|
||||
div.exampleHeader {
|
||||
font-weight: bold;
|
||||
margin: 4px
|
||||
}
|
||||
|
||||
div.proto {
|
||||
border: 0;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
div.issue {
|
||||
border-bottom-color: black;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-width: 1pt;
|
||||
margin-bottom: 20pt;
|
||||
}
|
||||
|
||||
th.issue-toc-head {
|
||||
border-bottom-color: black;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-width: 1pt;
|
||||
}
|
||||
|
||||
div.schemaComp {
|
||||
border: 4px double gray;
|
||||
margin: 0em 1em;
|
||||
padding: 0em;
|
||||
}
|
||||
|
||||
div.compHeader {
|
||||
margin: 4px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
span.schemaComp {
|
||||
background-color: white;
|
||||
color: #A52A2A;
|
||||
}
|
||||
|
||||
div.compBody {
|
||||
border-top-width: 4px;
|
||||
border-top-style: double;
|
||||
border-top-color: #d3d3d3;
|
||||
padding: 4px;
|
||||
margin: 0em;
|
||||
}
|
||||
|
||||
div.exampleInner {
|
||||
background-color: #d5dee3;
|
||||
color: black;
|
||||
border-top-width: 4px;
|
||||
border-top-style: double;
|
||||
border-top-color: #d3d3d3;
|
||||
border-bottom-width: 4px;
|
||||
border-bottom-style: double;
|
||||
border-bottom-color: #d3d3d3;
|
||||
padding: 4px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
div.issueBody {
|
||||
margin-left: 0.25in;
|
||||
}
|
||||
|
||||
code.function {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
code.return-type {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
code.return-varies {
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
code.type {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
code.as {
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
code.arg {
|
||||
|
||||
}
|
||||
|
||||
code.strikeout {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
code.small {
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
p.table.footnote {
|
||||
font-size: 8pt;
|
||||
}
|
||||
|
||||
table.casting {
|
||||
font-size: x-small;
|
||||
}
|
||||
|
||||
table.hierarchy {
|
||||
font-size: x-small;
|
||||
}
|
||||
|
||||
table.proto {
|
||||
|
||||
}
|
||||
|
||||
td.castY {
|
||||
background-color: #7FFF7F;
|
||||
color: black;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
td.castN {
|
||||
background-color: #FF7F7F;
|
||||
color: black;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
td.castM {
|
||||
background-color: white;
|
||||
color: black;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
td.castOther {
|
||||
background-color: yellow;
|
||||
color: black;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
span.cancast:hover {
|
||||
background-color: #ffa;
|
||||
color: black;
|
||||
}
|
||||
|
||||
div.protoref {
|
||||
margin-left: 0.5in;
|
||||
text-indent: -0.5in;
|
||||
}
|
||||
|
||||
dd.indent {
|
||||
margin-left: 2em;
|
||||
}
|
||||
|
||||
p.element-syntax {
|
||||
border: solid thin;
|
||||
background-color: #ffccff
|
||||
}
|
||||
|
||||
p.element-syntax-chg {
|
||||
border: solid thick yellow;
|
||||
background-color: #ffccff
|
||||
}
|
||||
|
||||
div.proto {
|
||||
padding: .5em;
|
||||
border: .5em;
|
||||
border-left-style: solid;
|
||||
page-break-inside: avoid;
|
||||
margin: 1em auto;
|
||||
border-color: #ff99ff;
|
||||
background: #ffe6ff;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
div.example-chg {
|
||||
border: solid thick yellow;
|
||||
background-color: #40e0d0;
|
||||
padding: 1em
|
||||
}
|
||||
|
||||
div.ffheader {
|
||||
margin-top: .8rem;
|
||||
font-size: 140%;
|
||||
font-variant: all-small-caps;
|
||||
text-transform: lowercase;
|
||||
font-weight: bold;
|
||||
color: hsla(203, 20%, 40%, .7);
|
||||
}
|
||||
|
||||
span.verb {
|
||||
font: small-caps 100% sans-serif
|
||||
}
|
||||
|
||||
span.error {
|
||||
font-size: small
|
||||
}
|
||||
|
||||
span.definition {
|
||||
font: small-caps 100% sans-serif
|
||||
}
|
||||
|
||||
span.grayed {
|
||||
color: gray
|
||||
}
|
||||
|
||||
table.scrap td {
|
||||
vertical-align: baseline;
|
||||
text-align: left;
|
||||
padding-left: 30px;
|
||||
}
|
||||
|
||||
table.data
|
||||
table.index {
|
||||
border-bottom: 2px !important;
|
||||
}
|
||||
BIN
src/vue-poc/lib/xqdoc/resources/xqdoc.png
Normal file
BIN
src/vue-poc/lib/xqdoc/resources/xqdoc.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
112
src/vue-poc/lib/xqdoc/xqdoc-proj.xqm
Normal file
112
src/vue-poc/lib/xqdoc/xqdoc-proj.xqm
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
(:~
|
||||
: Update `generated/models.xqm` from files in `data/models`
|
||||
: using file:///C:/Users/andy/workspace/app-doc/src/doc/data/doc/models
|
||||
: $efolder:="file:///C:/Users/andy/workspace/app-doc/src/doc/data/doc/models"
|
||||
: $target:="file:///C:/Users/andy/workspace/app-doc/src/doc/generated/models.xqm"
|
||||
:)
|
||||
module namespace xqd = 'quodatum:build.xqdoc';
|
||||
import module namespace xp="expkg-zone58:text.parse";
|
||||
declare namespace c="http://www.w3.org/ns/xproc-step";
|
||||
declare namespace xqdoc="http://www.xqdoc.org/1.0";
|
||||
|
||||
declare variable $xqd:HTML5:=map{"method": "html","version":"5.0"};
|
||||
declare variable $xqd:XML:=map{"indent": "no"};
|
||||
declare variable $xqd:mod-xslt external :="html-module.xsl";
|
||||
declare variable $xqd:index-xslt external :="html-index.xsl";
|
||||
|
||||
declare function xqd:save-xq($files,$target)
|
||||
{
|
||||
let $params:=map{
|
||||
"project":"BCH" }
|
||||
let $f:= document{$files} transform with { delete node //c:directory[not(.//c:file)]}
|
||||
|
||||
return (
|
||||
$files//c:file!xqd:gendoc(.,$target,$params),
|
||||
$f=>xqd:store($target || "/files.xml",$xqd:XML),
|
||||
$f=>xqd:index-html($params)=>xqd:store($target || "/index.html",$xqd:HTML5),
|
||||
xqd:export-resources($target)
|
||||
)
|
||||
};
|
||||
|
||||
(:~
|
||||
: save xqdoc and html for source file $f
|
||||
: @param $f <c:file/>
|
||||
: @param $target destination folder
|
||||
: @params map
|
||||
:)
|
||||
declare function xqd:gendoc(
|
||||
$f as element(c:file),
|
||||
$target as xs:string,
|
||||
$params as map(*)
|
||||
)
|
||||
{
|
||||
let $target:=file:path-to-native($target)
|
||||
let $ip:=$f/@name/resolve-uri(.,base-uri(.))
|
||||
let $op:=$f/ancestor-or-self::*/@name=>tail()=>string-join("/")
|
||||
let $dest:=file:resolve-path($op,$target)
|
||||
|
||||
let $xqdoc:=xqd:xqdoc($ip,map{})
|
||||
let $xq:=fetch:text($ip)
|
||||
let $params:=map:merge((map{
|
||||
"source":$xq,
|
||||
"filename":$f/@name/string(),
|
||||
"cache":true(),
|
||||
"show-private":true(),
|
||||
"resources":"../resources/"},
|
||||
$params))
|
||||
return (
|
||||
$xq=>xqd:parse()=>xqd:store($dest || "/xparse.xml",$xqd:XML),
|
||||
$xqdoc=>xqd:store($dest || "/xqdoc.xml",$xqd:XML),
|
||||
$xqdoc=>xqd:xqdoc-html($params)=>xqd:store($dest || "/index.html",$xqd:HTML5)
|
||||
)
|
||||
};
|
||||
|
||||
(:~ save, create fdolder if missing) :)
|
||||
declare function xqd:store($data,$url as xs:string,$params as map(*))
|
||||
{
|
||||
let $p:=file:parent($url)
|
||||
return (
|
||||
if(file:is-dir($p)) then () else file:create-dir($p),
|
||||
file:write($url,$data,$params)
|
||||
)
|
||||
};
|
||||
|
||||
(:~ parse XQuery
|
||||
: result is <XQuery> or <ERROR>
|
||||
:)
|
||||
declare function xqd:parse($xq as xs:string)
|
||||
as element(*)
|
||||
{
|
||||
xp:parse($xq || "",map{"lang":"xquery","version":"3.1 basex-20161204"})
|
||||
};
|
||||
|
||||
(:~ Generate xqdoc :)
|
||||
declare function xqd:xqdoc($url as xs:string,$opts as map(*))
|
||||
as element(xqdoc:xqdoc)
|
||||
{
|
||||
inspect:xqdoc($url)
|
||||
};
|
||||
|
||||
(:~ transform xqdoc to html :)
|
||||
declare function xqd:xqdoc-html($xqd as element(xqdoc:xqdoc),
|
||||
$params as map(*)
|
||||
)
|
||||
as document-node()
|
||||
{
|
||||
xslt:transform($xqd,$xqd:mod-xslt,$params)
|
||||
};
|
||||
|
||||
(:~ transform files to html :)
|
||||
declare function xqd:index-html($files,
|
||||
$params as map(*)
|
||||
)
|
||||
as document-node()
|
||||
{
|
||||
xslt:transform($files,$xqd:index-xslt,$params)
|
||||
};
|
||||
|
||||
(:~ export :)
|
||||
declare function xqd:export-resources($target as xs:string)
|
||||
{
|
||||
archive:extract-to($target, file:read-binary(resolve-uri('resources.zip')))
|
||||
};
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
(: entity access maps
|
||||
: auto generated from xml files in entities folder at: 2017-07-27T13:03:06.371+01:00
|
||||
: auto generated from xml files in entities folder at: 2017-08-09T10:36:00.509+01:00
|
||||
:)
|
||||
|
||||
module namespace entity = 'quodatum.models.generated';
|
||||
declare namespace h='urn:quodatum:vue-poc.history';
|
||||
declare namespace c='http://www.w3.org/ns/xproc-step';
|
||||
|
||||
declare variable $entity:list:=map {
|
||||
|
|
@ -52,6 +53,49 @@ declare variable $entity:list:=map {
|
|||
|
||||
"views": map{
|
||||
|
||||
}
|
||||
},
|
||||
"filehistory": map{
|
||||
"name": "filehistory",
|
||||
"description": "vue-poc file view events ",
|
||||
"access": map{
|
||||
"created": function($_ as element()) as xs:string {$_/@when },
|
||||
"id": function($_ as element()) as xs:string {$_/@id },
|
||||
"protocol": function($_ as element()) as xs:string {$_/h:file/@mode },
|
||||
"url": function($_ as element()) as xs:string {$_/h:file/@url },
|
||||
"user": function($_ as element()) as xs:string {$_/@user } },
|
||||
|
||||
"filter": function($item,$q) as xs:boolean{
|
||||
some $e in ( ) satisfies
|
||||
fn:contains($e,$q, 'http://www.w3.org/2005/xpath-functions/collation/html-ascii-case-insensitive')
|
||||
},
|
||||
"json": map{
|
||||
"created": function($_ as element()) as element(created)? {
|
||||
(: xs:string :)
|
||||
fn:data($_/@when)!element created { .}
|
||||
},
|
||||
"id": function($_ as element()) as element(id)? {
|
||||
(: xs:string :)
|
||||
fn:data($_/@id)!element id { .}
|
||||
},
|
||||
"protocol": function($_ as element()) as element(protocol)? {
|
||||
(: xs:string :)
|
||||
fn:data($_/h:file/@mode)!element protocol { .}
|
||||
},
|
||||
"url": function($_ as element()) as element(url)? {
|
||||
(: xs:string :)
|
||||
fn:data($_/h:file/@url)!element url { .}
|
||||
},
|
||||
"user": function($_ as element()) as element(user)? {
|
||||
(: xs:string :)
|
||||
fn:data($_/@user)!element user { .}
|
||||
} },
|
||||
|
||||
"data": function() as element(h:event)*
|
||||
{ doc("history.xml")/h:history/h:event },
|
||||
|
||||
"views": map{
|
||||
|
||||
}
|
||||
},
|
||||
"thumbnail": map{
|
||||
|
|
|
|||
31
src/vue-poc/models/filehistory.xml
Normal file
31
src/vue-poc/models/filehistory.xml
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<entity name="filehistory" xmlns="https://github.com/Quodatum/app-doc/entity">
|
||||
<description>vue-poc file view events </description>
|
||||
<namespace prefix="h" uri="urn:quodatum:vue-poc.history"/>
|
||||
<fields>
|
||||
<field name="created" type="xs:string">
|
||||
<description>time of event</description>
|
||||
<xpath>@when</xpath>
|
||||
</field>
|
||||
<field name="user" type="xs:string">
|
||||
<description>user</description>
|
||||
<xpath>@user</xpath>
|
||||
</field>
|
||||
<field name="id" type="xs:string">
|
||||
<description>id</description>
|
||||
<xpath>@id</xpath>
|
||||
</field>
|
||||
<field name="protocol" type="xs:string">
|
||||
<description>mode eg file basexdb</description>
|
||||
<xpath>h:file/@mode</xpath>
|
||||
</field>
|
||||
|
||||
<field name="url" type="xs:string">
|
||||
<description>path</description>
|
||||
<xpath>h:file/@url</xpath>
|
||||
</field>
|
||||
</fields>
|
||||
<views>
|
||||
</views>
|
||||
<iconclass>fa fa-calendar</iconclass>
|
||||
<data type="element(h:event)">doc("history.xml")/h:history/h:event</data>
|
||||
</entity>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
// generated 2017-07-27T21:30:55.726+01:00
|
||||
// generated 2017-08-09T10:37:44.029+01:00
|
||||
Vue.component('qd-link',{template:`
|
||||
<a :href="href" :target="href"> {{href}}<v-icon>link</v-icon></a>
|
||||
`,
|
||||
|
|
@ -45,7 +45,7 @@
|
|||
</v-list-tile-action>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>
|
||||
{{ child.text }}
|
||||
{{ child.text }}
|
||||
</v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
|
|
@ -145,7 +145,7 @@ Vue.filter('round', function(value, decimals) {
|
|||
}
|
||||
|
||||
);
|
||||
const Home=Vue.extend({template:` <v-layout class="ma-5"> <v-flex xs4=""> <v-card hover="" raised=""> <v-card-title height="200px" class="pa-5 green lighten-1">
|
||||
const About=Vue.extend({template:` <v-layout class="ma-5"> <v-flex xs4=""> <v-card hover="" raised=""> <v-card-title height="200px" class="pa-5 green lighten-1">
|
||||
<div class="display-1 white--text text-xs-center">VUE-POC</div>
|
||||
v0.0.2 </v-card-title> </v-card> </v-flex> <v-flex xs4="">
|
||||
<p>
|
||||
|
|
@ -160,6 +160,7 @@ v0.0.2 </v-card-title> </v-card> </v-flex> <v-flex xs4="">
|
|||
<li><a href="https://github.com/beautify-web/js-beautify" target="new">js-beautify</a></li>
|
||||
<li><a href="/doc/#/data/app/vue-poc" target="new">doc</a></li>
|
||||
<li><a href="/dba" target="new">DBA app</a></li>
|
||||
<li> <router-link to="database?url=%2Fvue-poc%2F">DB</router-link></li>
|
||||
</ul>
|
||||
</v-flex> <v-btn floating="floating"> <v-icon>add</v-icon> </v-btn> <qd-link href="/dba">REPLACED</qd-link> </v-layout> `,
|
||||
|
||||
|
|
@ -180,11 +181,11 @@ v0.0.2 </v-card-title> </v-card> </v-flex> <v-flex xs4="">
|
|||
<v-data-table :headers="headers" :items="items" :search="search" class="elevation-1" no-data-text="No logs found" v-bind:pagination.sync="pagination">
|
||||
<template slot="items" scope="props">
|
||||
<td class="text-xs-right">{{ props.item.time }}</td>
|
||||
<td class="text-xs-right">{{ props.item.address }}</td>
|
||||
<td class="text-xs-right">{{ props.item.user }}</td>
|
||||
<td class="text-xs-right">{{ props.item.type }}</td>
|
||||
<td class="text-xs-right">{{ props.item.ms }}</td>
|
||||
<td><code>{{ props.item.text }}</code></td>
|
||||
<td class="text-xs-right">{{ props.item.address }}</td>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-card>
|
||||
|
|
@ -200,11 +201,11 @@ v0.0.2 </v-card-title> </v-card> </v-flex> <v-flex xs4="">
|
|||
left: true,
|
||||
value: 'time'
|
||||
},
|
||||
{ text: 'address', value: 'address' },
|
||||
{ text: 'user', value: 'user' },
|
||||
{ text: 'Type', value: 'type' },
|
||||
{ text: 'ms', value: 'ms' },
|
||||
{ text: 'text', value: 'text' }
|
||||
{ text: 'text', value: 'text' },
|
||||
{ text: 'address', value: 'address' },
|
||||
],
|
||||
items:[],
|
||||
pagination:{sortBy: 'time',descending:true,rowsPerPage:25},
|
||||
|
|
@ -250,9 +251,7 @@ v0.0.2 </v-card-title> </v-card> </v-flex> <v-flex xs4="">
|
|||
|
||||
<v-spacer></v-spacer>
|
||||
<v-text-field prepend-icon="search" label="Filter..." v-model="q" type="search" hide-details="" single-line="" @keyup.native.enter="filter"></v-text-field>
|
||||
<v-btn icon="" ripple="" @click="showInfo=!showInfo">
|
||||
<v-icon>info</v-icon>
|
||||
</v-btn>
|
||||
|
||||
<v-btn icon="" @click="alert('todo')">
|
||||
<v-icon>view_module</v-icon>
|
||||
</v-btn>
|
||||
|
|
@ -274,7 +273,7 @@ v0.0.2 </v-card-title> </v-card> </v-flex> <v-flex xs4="">
|
|||
<v-list-tile-sub-title>modified: {{ item.modified | formatDate}} size: {{ item.size | readablizeBytes}}</v-list-tile-sub-title>
|
||||
</v-list-tile-content>
|
||||
<v-list-tile-action>
|
||||
<v-btn icon="" ripple="" @click.native.stop="info(item.name)">
|
||||
<v-btn icon="" ripple="" @click.native.stop="info(item)">
|
||||
<v-icon class="grey--text text--lighten-1">info</v-icon>
|
||||
</v-btn>
|
||||
</v-list-tile-action>
|
||||
|
|
@ -300,12 +299,15 @@ v0.0.2 </v-card-title> </v-card> </v-flex> <v-flex xs4="">
|
|||
</v-flex>
|
||||
<v-flex v-if="showInfo" xs4="" grey="" lighten-3="">
|
||||
<v-card flat="" tile="">
|
||||
<v-card-actions>
|
||||
<v-card-title>test</v-card-title>
|
||||
<v-toolbar>
|
||||
<v-card-title>{{selected.name}}</v-card-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn flat="" icon="" @click.native="showInfo = false"><v-icon>highlight_off</v-icon></v-btn>
|
||||
</v-toolbar>
|
||||
<v-card-text> Things to do with </v-card-text>
|
||||
<v-card-actions>
|
||||
<v-btn flat="" @click="doit()"><v-icon>run</v-icon>run</v-btn>
|
||||
</v-card-actions>
|
||||
<v-card-text> blah blah protocol: </v-card-text>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
|
@ -360,6 +362,9 @@ v0.0.2 </v-card-title> </v-card> </v-flex> <v-flex xs4="">
|
|||
info(item){
|
||||
this.selected=item
|
||||
this.showInfo=true
|
||||
},
|
||||
doit(){
|
||||
alert("doit")
|
||||
}
|
||||
|
||||
},
|
||||
|
|
@ -852,12 +857,12 @@ v0.0.2 </v-card-title> </v-card> </v-flex> <v-flex xs4="">
|
|||
}
|
||||
|
||||
);
|
||||
const About=Vue.extend({template:` <v-layout class="ma-5"> <v-flex xs4=""> <v-card hover="" raised=""> <v-card-title height="200px" class="pa-5 green lighten-1">
|
||||
const Home=Vue.extend({template:` <v-layout class="ma-5"> <v-flex xs4=""> <v-card hover="" raised=""> <v-card-title height="200px" class="pa-5 green lighten-1">
|
||||
<div class="display-1 white--text text-xs-center">VUE-POC</div>
|
||||
v0.0.2 </v-card-title> </v-card> </v-flex> <v-flex xs4="">
|
||||
<p>
|
||||
This is a experiment in using
|
||||
<code>vue.js</code>
|
||||
<code>vue.js</code> and vuetifyjs
|
||||
.
|
||||
</p>
|
||||
<ul>
|
||||
|
|
@ -867,6 +872,7 @@ v0.0.2 </v-card-title> </v-card> </v-flex> <v-flex xs4="">
|
|||
<li><a href="https://github.com/beautify-web/js-beautify" target="new">js-beautify</a></li>
|
||||
<li><a href="/doc/#/data/app/vue-poc" target="new">doc</a></li>
|
||||
<li><a href="/dba" target="new">DBA app</a></li>
|
||||
<li><a href="/vue-poc/ui/database?url=%2Fvue-poc%2F" target="new">db</a></li>
|
||||
</ul>
|
||||
</v-flex> <v-btn floating="floating"> <v-icon>add</v-icon> </v-btn> <qd-link href="/dba">REPLACED</qd-link> </v-layout> `,
|
||||
|
||||
|
|
@ -1633,11 +1639,15 @@ v0.0.2 </v-card-title> </v-card> </v-flex> <v-flex xs4="">
|
|||
const Model=Vue.extend({template:`
|
||||
<v-container fluid="">
|
||||
<v-card>
|
||||
<v-toolbar>
|
||||
<v-toolbar class="orange darken-1">
|
||||
<v-btn icon="" to="/tasks"><v-icon>arrow_back</v-icon></v-btn>
|
||||
<v-card-title class="blue accent-4">
|
||||
<v-card-title>
|
||||
<span class="white--text">Generate <code>model.gen.xqm</code></span>
|
||||
</v-card-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn primary="" @click.native="submit()" :loading="waiting" :disabled="waiting">
|
||||
<v-icon>play_circle_outline</v-icon>
|
||||
Run</v-btn>
|
||||
</v-toolbar>
|
||||
<v-card-text>
|
||||
<v-container fluid="">
|
||||
|
|
@ -1657,11 +1667,7 @@ v0.0.2 </v-card-title> </v-card> </v-flex> <v-flex xs4="">
|
|||
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-btn primary="" @click.native="submit()" :loading="waiting" :disabled="waiting">
|
||||
<v-icon>play_circle_outline</v-icon>
|
||||
Run</v-btn>
|
||||
</v-card-actions>
|
||||
|
||||
<v-snackbar v-model="snackbar.show" :timeout="6000" :success="snackbar.context === 'success'" :error="snackbar.context === 'error'">
|
||||
{{ snackbar.msg }}
|
||||
<v-btn dark="" flat="" @click.native="snackbar.show = false">Close</v-btn>
|
||||
|
|
@ -1712,6 +1718,9 @@ v0.0.2 </v-card-title> </v-card> </v-flex> <v-flex xs4="">
|
|||
<li>
|
||||
<router-link to="tasks/xqdoc">xqdoc</router-link>
|
||||
</li>
|
||||
<li>
|
||||
<router-link to="tasks/vuecompile">vue compile</router-link>
|
||||
</li>
|
||||
</ul>
|
||||
</v-container>
|
||||
`,
|
||||
|
|
@ -1724,6 +1733,74 @@ v0.0.2 </v-card-title> </v-card> </v-flex> <v-flex xs4="">
|
|||
}
|
||||
}
|
||||
|
||||
);
|
||||
const Vuecompile=Vue.extend({template:`
|
||||
<v-container fluid="">
|
||||
<v-card>
|
||||
<v-toolbar class="orange darken-1">
|
||||
<v-btn icon="" to="/tasks"><v-icon>arrow_back</v-icon></v-btn>
|
||||
<v-card-title>
|
||||
<span class="white--text">compile</span>
|
||||
</v-card-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn primary="" @click.native="submit()" :loading="waiting" :disabled="waiting">
|
||||
<v-icon>play_circle_outline</v-icon>
|
||||
Run</v-btn>
|
||||
</v-toolbar>
|
||||
<v-card-text>
|
||||
<v-container fluid="">
|
||||
<v-layout row="" wrap="">
|
||||
<v-flex xs6="">
|
||||
<v-text-field v-model="params.proj" label="vue project to compile"></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row="" wrap="">
|
||||
<v-flex xs12="">
|
||||
<code>{{code}}</code>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
|
||||
<v-snackbar v-model="snackbar.show" :timeout="6000" :success="snackbar.context === 'success'" :error="snackbar.context === 'error'">
|
||||
{{ snackbar.msg }}
|
||||
<v-btn dark="" flat="" @click.native="snackbar.show = false">Close</v-btn>
|
||||
</v-snackbar>
|
||||
</v-card>
|
||||
</v-container>
|
||||
`,
|
||||
|
||||
data: function(){
|
||||
return {
|
||||
params:{
|
||||
proj:"C:/Users/andy/git/vue-poc/src/vue-poc/"
|
||||
},
|
||||
waiting:false,
|
||||
snackbar:{show:false,msg:"",context:"success"},
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
submit(){
|
||||
this.waiting=true
|
||||
HTTP.post("tasks/vue-compile",Qs.stringify(this.params))
|
||||
.then(r=>{
|
||||
this.waiting=false
|
||||
this.snackbar={show:true,msg:r.data.msg,context:"success"}
|
||||
console.log(r.data)
|
||||
})
|
||||
.catch(error=>{
|
||||
this.waiting=false
|
||||
this.snackbar={show:true,msg:"Problem",context:"error"}
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
code(){return 'code here'}
|
||||
}
|
||||
}
|
||||
|
||||
);
|
||||
const Xqdoc=Vue.extend({template:`
|
||||
<v-container fluid="">
|
||||
|
|
@ -1733,6 +1810,10 @@ v0.0.2 </v-card-title> </v-card> </v-flex> <v-flex xs4="">
|
|||
<v-card-title>
|
||||
<span class="white--text">Task: Generate <code>xqdoc</code></span>
|
||||
</v-card-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn primary="" @click.native="submit()" :loading="waiting" :disabled="waiting">
|
||||
<v-icon>play_circle_outline</v-icon>
|
||||
Run</v-btn>
|
||||
</v-toolbar>
|
||||
<v-card-text>
|
||||
<v-container fluid="">
|
||||
|
|
@ -1750,17 +1831,13 @@ v0.0.2 </v-card-title> </v-card> </v-flex> <v-flex xs4="">
|
|||
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-btn primary="" @click.native="submit()" :loading="waiting" :disabled="waiting">
|
||||
<v-icon>play_circle_outline</v-icon>
|
||||
Run</v-btn>
|
||||
</v-card-actions>
|
||||
|
||||
|
||||
<v-alert success="" v-model="alert.success">
|
||||
{{alert.msg}}
|
||||
{{alert.timestamp}}:{{alert.msg}}
|
||||
</v-alert>
|
||||
<v-alert error="" v-model="alert.error">
|
||||
<code>{{alert.msg}}</code>
|
||||
{{alert.timestamp}}:<code>{{alert.msg}}</code>
|
||||
</v-alert>
|
||||
</v-card>
|
||||
<code>{{code}}</code>
|
||||
|
|
@ -1780,6 +1857,7 @@ v0.0.2 </v-card-title> </v-card> </v-flex> <v-flex xs4="">
|
|||
methods:{
|
||||
submit(){
|
||||
this.waiting=true
|
||||
this.alert={msg:"Loading..",success:false,error:false}
|
||||
HTTP.post("tasks/xqdoc",Qs.stringify(this.params))
|
||||
.then(r=>{
|
||||
this.waiting=false
|
||||
|
|
@ -1899,7 +1977,7 @@ v0.0.2 </v-card-title> </v-card> </v-flex> <v-flex xs4="">
|
|||
vueState: {
|
||||
|
||||
data1: [
|
||||
{ id: 1, content: 'item 1', start: '2013-04-20' },
|
||||
{ id: 1, content: 'item 1', start: '2013-04-20 23:06:15.304' },
|
||||
{ id: 2, content: 'item 2', start: '2013-04-14' },
|
||||
{ id: 3, content: 'item 3', start: '2013-04-18' },
|
||||
{ id: 4, content: 'item 4', start: '2013-04-16', end: '2013-04-19' },
|
||||
|
|
@ -1941,6 +2019,7 @@ const Auth={
|
|||
};
|
||||
Vue.use(Auth);
|
||||
|
||||
// read and write settings
|
||||
// https://vuejs.org/v2/guide/state-management.html
|
||||
var settings = {
|
||||
debug: true,
|
||||
|
|
@ -1980,7 +2059,7 @@ Vue.config.errorHandler = function (err, vm, info) {
|
|||
};
|
||||
|
||||
|
||||
|
||||
// used by vue-ace
|
||||
var Events = new Vue({});
|
||||
|
||||
|
||||
|
|
@ -2009,6 +2088,7 @@ const router = new VueRouter({
|
|||
{ path: '/tasks', component: Task,meta:{title:"Runnable tasks"} },
|
||||
{ path: '/tasks/model', component: Model,meta:{title:"build model"} },
|
||||
{ path: '/tasks/xqdoc', component: Xqdoc,meta:{title:"build xqdoc"} },
|
||||
{ path: '/tasks/vuecompile', component: Vuecompile,meta:{title:"vue compile"} },
|
||||
{ path: '/jobs', component: Job,meta:{title:"Jobs"} },
|
||||
{ path: '/timeline', component: Timeline,meta:{title:"timeline"} },
|
||||
{ path: '*', component: Notfound,meta:{title:"Page not found"} }
|
||||
|
|
@ -2043,6 +2123,7 @@ const app = new Vue({
|
|||
status:{},
|
||||
drawer:true,
|
||||
mini: false,
|
||||
alert:{show:false,msg:"Hello"},
|
||||
items:[
|
||||
{href: '/',text: 'Home', icon: 'home' },
|
||||
{
|
||||
|
|
@ -2061,10 +2142,25 @@ const app = new Vue({
|
|||
model: false,
|
||||
children: [
|
||||
{href: '/eval',text: 'Query',icon: 'play_circle_outline'},
|
||||
{href: '/jobs',text: 'Running jobs',icon: 'dashboard'},
|
||||
{href: '/tasks',text: 'Tasks',icon: 'history'}
|
||||
]},
|
||||
{
|
||||
icon: 'cast_connected',
|
||||
text: 'Server' ,
|
||||
model: false,
|
||||
children: [
|
||||
{href: '/jobs',text: 'Running jobs',icon: 'dashboard'},
|
||||
{href: '/logs',text: 'Server logs',icon: 'dns'},
|
||||
{href: '/ping',text: 'ping',icon: 'update'}
|
||||
]},
|
||||
{
|
||||
icon: 'camera_roll',
|
||||
text: 'Images' ,
|
||||
model: false,
|
||||
children: [
|
||||
{href: '/images',text: 'Collection',icon: 'photo_camera'},
|
||||
{href: '/thumbnail',text: 'thumbnail',icon: 'touch_app'}
|
||||
]},
|
||||
{
|
||||
icon: 'more_horiz',
|
||||
text: 'More' ,
|
||||
|
|
@ -2073,11 +2169,8 @@ const app = new Vue({
|
|||
{href: '/session',text: 'Session',icon: 'person'},
|
||||
{href: '/select',text: 'select',icon: 'extension'},
|
||||
{href: '/puzzle',text: 'Puzzle',icon: 'extension'},
|
||||
{href: '/images',text: 'Images',icon: 'camera_roll'},
|
||||
{href: '/tabs',text: 'tabs',icon: 'switch_camera'},
|
||||
{href: '/ping',text: 'ping',icon: 'update'},
|
||||
{href: '/timeline',text: 'time line',icon: 'timelapse'},
|
||||
{href: '/thumbnail',text: 'thumbnail',icon: 'touch_app'}
|
||||
{href: '/timeline',text: 'time line',icon: 'timelapse'}
|
||||
]},
|
||||
{href: '/settings',text: 'settings',icon: 'settings' }
|
||||
]
|
||||
|
|
@ -2094,11 +2187,27 @@ const app = new Vue({
|
|||
HTTP.get("logout").then(r=>{
|
||||
alert("logout")
|
||||
})
|
||||
|
||||
},
|
||||
showAlert(msg){
|
||||
this.alert.msg=msg
|
||||
this.alert.show=true
|
||||
}
|
||||
},
|
||||
created(){
|
||||
console.log("create-----------")
|
||||
// Add a response interceptor
|
||||
|
||||
HTTP.interceptors.response.use(
|
||||
(response)=> {
|
||||
// Do something with response data
|
||||
return response;
|
||||
},
|
||||
(error) =>{
|
||||
// Do something with response error
|
||||
this.showAlert("http error:\n"+error.response.data)
|
||||
return Promise.reject(error);
|
||||
});
|
||||
|
||||
HTTP.get("status")
|
||||
.then(r=>{
|
||||
console.log("status",r.data)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<title>Vue Router Test</title>
|
||||
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic">
|
||||
<link rel="stylesheet" href="//fonts.googleapis.com/icon?family=Material+Icons">
|
||||
<link href="https://unpkg.com/vuetify@0.14.7/dist/vuetify.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="https://unpkg.com/vuetify@0.14.8/dist/vuetify.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="https://unpkg.com/vue-multiselect@2.0.0-beta.15/dist/vue-multiselect.min.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<link href="/vue-poc/ui/app.css" rel="stylesheet" type="text/css">
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue-router/2.5.3/vue-router.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.16.1/axios.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/qs/6.4.0/qs.js"></script>
|
||||
<script src="https://unpkg.com/vuetify@0.14.7/dist/vuetify.min.js"></script>
|
||||
<script src="https://unpkg.com/vuetify@0.14.8/dist/vuetify.min.js"></script>
|
||||
<script src="https://unpkg.com/vue-multiselect@2.0.0-beta.15/dist/vue-multiselect.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.7/ace.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.7/ext-language_tools.js"></script>
|
||||
|
|
@ -84,6 +84,9 @@
|
|||
</v-menu>
|
||||
</v-toolbar>
|
||||
<main>
|
||||
<v-alert error value="true" dismissible v-model="alert.show">
|
||||
<pre>{{ alert.msg }}</pre>
|
||||
</v-alert>
|
||||
<transition name="fade" mode="out-in">
|
||||
<router-view class="view ma-3"></router-view>
|
||||
</transition>
|
||||
|
|
|
|||
1
src/vue-poc/static/resources/readme.md
Normal file
1
src/vue-poc/static/resources/readme.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
This folder contains selection of test files.
|
||||
2
src/vue-poc/static/resources/xmlcatalog/dtd/test.dtd
Normal file
2
src/vue-poc/static/resources/xmlcatalog/dtd/test.dtd
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!ELEMENT doc (#PCDATA) >
|
||||
9
src/vue-poc/static/resources/xmlcatalog/importing.xsl
Normal file
9
src/vue-poc/static/resources/xmlcatalog/importing.xsl
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
exclude-result-prefixes="xs"
|
||||
version="2.0">
|
||||
|
||||
<xsl:import href="http://transpect.io/test/lib/imported.xsl"/>
|
||||
|
||||
</xsl:stylesheet>
|
||||
13
src/vue-poc/static/resources/xmlcatalog/lib/imported.xsl
Normal file
13
src/vue-poc/static/resources/xmlcatalog/lib/imported.xsl
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
exclude-result-prefixes="xs"
|
||||
version="2.0">
|
||||
|
||||
<xsl:template match="/doc">
|
||||
<test success="true">
|
||||
<xsl:apply-templates select="@*, node()" mode="#current"/>
|
||||
</test>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
3
src/vue-poc/static/resources/xmlcatalog/test.xml
Normal file
3
src/vue-poc/static/resources/xmlcatalog/test.xml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE doc SYSTEM "http://transpect.io/test/dtd/test.dtd">
|
||||
<doc>xsl:import by XML catalog</doc>
|
||||
3
src/vue-poc/static/resources/xmlcatalog/test.xq
Normal file
3
src/vue-poc/static/resources/xmlcatalog/test.xq
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
declare variable $dir-uri as xs:string external := string(inspect:static-context((),'base-uri'));
|
||||
doc('http://transpect.io/test/test.xml'),
|
||||
xslt:transform(resolve-uri('test.xml', $dir-uri), resolve-uri('importing.xsl', $dir-uri))
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0"?>
|
||||
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
|
||||
|
||||
<rewriteURI uriStartString="http://transpect.io/test/" rewritePrefix="../"/>
|
||||
|
||||
<!-- Will be used for DOCTYPE (DTDs): -->
|
||||
<rewriteSystem systemIdStartString="http://transpect.io/test/" rewritePrefix="../"/>
|
||||
|
||||
|
||||
</catalog>
|
||||
69
src/vue-poc/static/resources/xproc-enrich.xpl
Normal file
69
src/vue-poc/static/resources/xproc-enrich.xpl
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
<p:library
|
||||
xmlns:p="http://www.w3.org/ns/xproc"
|
||||
xmlns:c="http://www.w3.org/ns/xproc-step"
|
||||
xmlns:xpt="https://github.com/apb2006/xproc-enrich"
|
||||
xmlns:xpdoc="http://xproc.org/xpdoc"
|
||||
version="1.0">
|
||||
|
||||
<p:documentation>Convert xpl to standard format
|
||||
taken from Phillip Fennel's xproc-plus-time
|
||||
https://code.google.com/p/xproc-plus-time/
|
||||
</p:documentation>
|
||||
|
||||
|
||||
<p:declare-step type="xpt:parse">
|
||||
<p:input port="source">
|
||||
<p:documentation>
|
||||
An xproc document
|
||||
</p:documentation>
|
||||
</p:input>
|
||||
<p:output port="result">
|
||||
<p:documentation xmlns="http://www.w3.org/1999/xhtml"><p>
|
||||
Copy of the source in a standard format with
|
||||
additional info
|
||||
<ol>
|
||||
<li>normalize : pipeline elements replaced with declare-step</li>
|
||||
<li>augment: add missing (default) ports with @xml:id</li>
|
||||
<li>connect: add @xpt:boundPorts showing links</li>
|
||||
</ol>
|
||||
</p></p:documentation>
|
||||
</p:output>
|
||||
|
||||
<p:xslt>
|
||||
<p:documentation>
|
||||
Normalises XProc pipelines.
|
||||
</p:documentation>
|
||||
<p:input port="stylesheet">
|
||||
<p:document href="etc/normalise-pipeline.xsl" />
|
||||
</p:input>
|
||||
<p:input port="parameters">
|
||||
<p:empty />
|
||||
</p:input>
|
||||
</p:xslt>
|
||||
|
||||
<p:xslt name="augment-steps">
|
||||
<p:documentation>
|
||||
Adds missing 'implied' information.
|
||||
</p:documentation>
|
||||
<p:input port="stylesheet">
|
||||
<p:document href="etc/augment-steps.xsl" />
|
||||
</p:input>
|
||||
<p:input port="parameters">
|
||||
<p:empty />
|
||||
</p:input>
|
||||
</p:xslt>
|
||||
|
||||
<p:xslt name="connect-steps">
|
||||
<p:documentation>
|
||||
Makes step connections explicit.
|
||||
</p:documentation>
|
||||
<p:input port="stylesheet">
|
||||
<p:document href="etc/connect-steps.xsl" />
|
||||
</p:input>
|
||||
<p:input port="parameters">
|
||||
<p:empty />
|
||||
</p:input>
|
||||
</p:xslt>
|
||||
</p:declare-step>
|
||||
|
||||
</p:library>
|
||||
299
src/vue-poc/static/resources/xqdoc-1.1.30052013.xsd
Normal file
299
src/vue-poc/static/resources/xqdoc-1.1.30052013.xsd
Normal file
|
|
@ -0,0 +1,299 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
* Copyright (c)2010 Elsevier, Inc.
|
||||
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* The use of the Apache License does not indicate that this project is
|
||||
* affiliated with the Apache Software Foundation.
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
targetNamespace="http://www.xqdoc.org/1.0"
|
||||
xmlns="http://www.xqdoc.org/1.0"
|
||||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified">
|
||||
|
||||
<!-- Simple type for defining the uris associated
|
||||
with things such as library modules associated
|
||||
with functions, variables, imports, etc. -->
|
||||
<xsd:simpleType name="uri">
|
||||
<xsd:restriction base="xsd:string"/>
|
||||
</xsd:simpleType>
|
||||
|
||||
<!-- Simple type for defining the type associated
|
||||
with things such as global variables, function
|
||||
parameters, and function return types etc. -->
|
||||
<xsd:complexType name="type">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:string">
|
||||
<xsd:attribute name="occurrence" type="occurrence" use="optional"/>
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<!-- Complex type for function parameters -->
|
||||
<xsd:complexType name="parameters">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="parameter" type="parameter" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<!-- Complex type for an individual function parameter -->
|
||||
<xsd:complexType name="parameter">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="name" type="name" minOccurs="0"/>
|
||||
<xsd:element name="type" type="type" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<!-- Complex type for the return value from a function -->
|
||||
<xsd:complexType name="return">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="type" type="type" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<!-- Simple type used for definging the number of occurrences for a global variable, function parameter
|
||||
or function return type -->
|
||||
<xsd:simpleType name="occurrence">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="?"/>
|
||||
<xsd:enumeration value="*"/>
|
||||
<xsd:enumeration value="+"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<!-- Simple type for defining the names associated
|
||||
with things such as functions, paramters, module name, etc. -->
|
||||
<xsd:simpleType name="name">
|
||||
<xsd:restriction base="xsd:string"/>
|
||||
</xsd:simpleType>
|
||||
|
||||
<!-- Complex type used for defining the functions
|
||||
invoked from within a particular function. -->
|
||||
<xsd:complexType name="invoked">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="uri" type="uri"/>
|
||||
<xsd:element name="name" type="name"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="arity" type="xsd:integer" use="optional"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<!-- Complex type used for defining a custom comment type.
|
||||
The type attribute allows the differentiation of the custom
|
||||
comment types. If the custom comment is @example, then the
|
||||
value in the 'tag' attribute would be 'example'. -->
|
||||
<xsd:complexType name="custom">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="mixed-text">
|
||||
<xsd:attribute name="tag" type="xsd:string" use="required"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
<!-- Complex type used for defining the comments associated
|
||||
with a library module, imports, variables, or functions.
|
||||
The follow xqdoc 'directives' map to the equivalent
|
||||
elements defined below ... with the exception of description
|
||||
where there is no directive.
|
||||
|
||||
@author ...... author
|
||||
@version ..... version
|
||||
@param ....... param
|
||||
@return ...... return
|
||||
@error ....... error
|
||||
@deprecated .. deprecated
|
||||
@since ....... since
|
||||
@see ......... see -->
|
||||
<xsd:complexType name="comment">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="description" type="mixed-text" minOccurs="0"/>
|
||||
<xsd:element name="author" type="mixed-text" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="version" type="mixed-text" minOccurs="0"/>
|
||||
<xsd:element name="param" type="mixed-text" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="return" type="mixed-text" minOccurs="0"/>
|
||||
<xsd:element name="error" type="mixed-text" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="deprecated" type="mixed-text" minOccurs="0"/>
|
||||
<xsd:element name="see" type="mixed-text" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="since" type="mixed-text" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="custom" type="custom" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<!-- Complex type used for comment text to allow the inclusion
|
||||
of embedded HTML markup within comments. -->
|
||||
<xsd:complexType name="mixed-text" mixed="true">
|
||||
<xsd:sequence>
|
||||
<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<!-- Complex type used for defining information about the package
|
||||
version (and date) used to generate the internal xqdoc XML.
|
||||
Date should be the date when the XML xqdoc file is genearted.
|
||||
Version should either be the version of the XQDoc conversion package
|
||||
used to generate the XML or 'n/a' if the XML is generated from
|
||||
some other mechanism (i.e. scripts from XHTML for MarkLogic). -->
|
||||
<xsd:complexType name="control">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="date" type="xsd:string"/>
|
||||
<xsd:element name="version">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="1.0"/>
|
||||
<xsd:enumeration value="N/A"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<!-- Complex type used for defining the module URI and any
|
||||
high-level comments associated with the module. -->
|
||||
<xsd:complexType name="module">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="uri" type="uri"/>
|
||||
<xsd:element name="name" type="name" minOccurs="0"/>
|
||||
<xsd:element name="comment" type="comment" minOccurs="0"/>
|
||||
<xsd:element name="body" type="xsd:string" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="type" use="required">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="main"/>
|
||||
<xsd:enumeration value="library"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
|
||||
<!-- Complex type used for defining the namespaces defined within
|
||||
the library module. -->
|
||||
<xsd:complexType name="namespaces">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="namespace" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="prefix" use="required"/>
|
||||
<xsd:attribute name="uri" use="required"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<!-- Complex type used for defining the variable names defined within
|
||||
the library module and any comments associated with the variables. -->
|
||||
<xsd:complexType name="variables">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="variable" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="uri" type="uri" minOccurs="0"/>
|
||||
<xsd:element name="name" type="name"/>
|
||||
<xsd:element name="comment" type="comment" minOccurs="0"/>
|
||||
<xsd:element name="annotations" type="annotations" minOccurs="0"/>
|
||||
<xsd:element name="type" type="type" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<!-- Complex type used for defining the annotations defined for
|
||||
a variable or function. -->
|
||||
<xsd:complexType name="annotations">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="annotation" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="literal" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:complexType>
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="mixed-text">
|
||||
<xsd:attribute name="type" type="xsd:string" use="required"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<!-- Complex type used for defining the imported modules within the
|
||||
the library module and any comments associated with the imports. -->
|
||||
<xsd:complexType name="imports">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="import" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="uri" type="uri"/>
|
||||
<xsd:element name="comment" type="comment" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="type" use="optional">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="library"/>
|
||||
<xsd:enumeration value="schema"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<!-- Complex type used for defining the functions contained within the
|
||||
the library module and any comments associated with the functions.
|
||||
Any 'invoked' functions associated with this function should also
|
||||
be defined. -->
|
||||
<xsd:complexType name="functions">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="function" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="comment" type="comment" minOccurs="0"/>
|
||||
<xsd:element name="name" type="name"/>
|
||||
<xsd:element name="annotations" type="annotations" minOccurs="0"/>
|
||||
<xsd:element name="signature" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="parameters" type="parameters" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="return" type="parameter" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:element name="invoked" type="invoked" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="ref-variable" type="invoked" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:choice>
|
||||
<xsd:element name="body" type="xsd:string" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="arity" type="xsd:integer" use="optional"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<!-- Complex type used for defining the global root element of xqdoc.
|
||||
There should be '1' xqdoc xml file for each library module. -->
|
||||
<xsd:element name="xqdoc">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="control" type="control"/>
|
||||
<xsd:element name="module" type="module"/>
|
||||
<xsd:element name="imports" type="imports" minOccurs="0"/>
|
||||
<xsd:element name="namespaces" type="namespaces" minOccurs="0"/>
|
||||
<xsd:element name="variables" type="variables" minOccurs="0"/>
|
||||
<xsd:element name="functions" type="functions" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
|
|
@ -19,8 +19,7 @@ as element(wadl:resource)
|
|||
};
|
||||
let $xq:=doc($src)
|
||||
let $prefix:=$xq//xqdoc:namespace[@uri="http://exquery.org/ns/restxq"]/@prefix/string()
|
||||
let $paths:=$xq//xqdoc:functions/xqdoc:function/xqdoc:annotations/xqdoc:annotation[@name=$prefix || ":path"]
|
||||
let $funs:=$xq//xqdoc:functions/xqdoc:function[xqdoc:annotations/xqdoc:annotation/@name=$prefix || ":path"]
|
||||
let $paths:=$xq//xqdoc:functions/xqdoc:function/xqdoc:annotations/xqdoc:annotation[@name=$prefix || ":path"]/xqdoc:literal
|
||||
let $p2:=$paths=>distinct-values()=>sort()
|
||||
return <wadl:application>
|
||||
<wadl:resources base="http://localhost:8984/doc/app//graphxq/view/wadl">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue