diff --git a/src/graphxq/cxan.xml b/src/graphxq/cxan.xml index 2f606a0..9533495 100644 --- a/src/graphxq/cxan.xml +++ b/src/graphxq/cxan.xml @@ -8,4 +8,5 @@ restxq graph svg + d3 \ No newline at end of file diff --git a/src/graphxq/expath-pkg.xml b/src/graphxq/expath-pkg.xml index 5c251dc..ddb8ca1 100644 --- a/src/graphxq/expath-pkg.xml +++ b/src/graphxq/expath-pkg.xml @@ -1,9 +1,9 @@ + version="0.7.2" spec="1.0" xmlns="http://expath.org/ns/pkg"> Graphxq - + - + \ No newline at end of file diff --git a/src/graphxq/graphxq.xqm b/src/graphxq/graphxq.xqm index c067b14..7058a30 100644 --- a/src/graphxq/graphxq.xqm +++ b/src/graphxq/graphxq.xqm @@ -18,7 +18,7 @@ declare namespace restxq = 'http://exquery.org/ns/restxq'; (:~ shared page wrapper :) declare variable $grxq:layout:=fn:resolve-uri("views/layout.xq"); -declare variable $grxq:version:=fn:doc("expath-pkg.xml")/*/@version; +declare variable $grxq:version as xs:string:=fn:doc("expath-pkg.xml")/*/@version/fn:string(); (:~ : Home page for app :) @@ -36,7 +36,20 @@ declare %restxq:GET %restxq:path("graphxq/about") %output:method("html") %output:version("5.0") function about(){ - render("views/about.xml",map{"title":"GraphXQ"}) + render("views/about.xq",map{"title":"GraphXQ", + "version":$grxq:version}) +}; + +(:~ +: about page for app +:) +declare +%restxq:GET %restxq:path("graphxq/search") +%output:method("html") %output:version("5.0") +%restxq:form-param("q","{$q}") +function search($q){ + render("views/search.xq",map{"title":"GraphXQ search", + "q":$q}) }; (:~ diff --git a/src/graphxq/views/about.xml b/src/graphxq/views/about.xq similarity index 50% rename from src/graphxq/views/about.xml rename to src/graphxq/views/about.xq index c508dda..de02e00 100644 --- a/src/graphxq/views/about.xml +++ b/src/graphxq/views/about.xq @@ -1,7 +1,8 @@ +declare variable $version external ;
-

GraphXQ

-

A web interface to Graphviz. +

GraphXQ {$version}

+

A web interface for Graphviz. Graph descriptions can be entered in the Dot or DotML languages and the corresponding @@ -12,7 +13,7 @@

Client

-

The client side targets modern browsers with SVG support. It was tested against Firefox 46 and Chrome 50. +

The client side targets modern browsers with SVG support. It was tested against Firefox 51 and Chrome 56.

Javascript libraries are loaded from CDN where possible. In particular cdnjs.com is used.

-

The resultant SVG is viewed in an interface that provides pan and zoom functionality. +

The resultant SVG is viewed in an interface that provides pan and zoom functionality built on top of + D3. The SVG may also be viewed standalone or downloaded.

@@ -38,15 +40,7 @@ DotML is a XML based syntax for the input language of the 'Dot'.

-
-

Todo

-

The SVG pan and zoom has problems, especially in Firefox. In part this maybe due -to firefox bugs

-

For reference how the SVG viewbox -works. See also here -for a better way? -

-
+

@@ -54,28 +48,10 @@ for a better way? Fork me on GitHub
\ No newline at end of file diff --git a/src/graphxq/views/ace.xml b/src/graphxq/views/ace.xml index 09de2d7..4df919e 100644 --- a/src/graphxq/views/ace.xml +++ b/src/graphxq/views/ace.xml @@ -1,42 +1,42 @@ -
-
- Sidebar content outline etc.. -
-
- - -
-
-
-
module namespace txq = 'apb.txq'; -declare default function namespace 'apb.txq'; -import module namespace xquery = "http://basex.org/modules/xquery"; - -(:~ -: template function -: @param template url to fill -: @param map name and value to apply -: @return updated doc from map -:) -declare function render($template as xs:string,$map as map(*)){{ - let $map:=map:new(($map,map{{"partial":=partial(?,?,?,$map,$template)}})) - return xquery:invoke($template,$map) -}};
-
-
-
- ... -
-
- ...
-
- ...
-
-
- -
+
+
+ Sidebar content outline etc.. +
+
+ + +
+
+
+
module namespace txq = 'apb.txq'; +declare default function namespace 'apb.txq'; +import module namespace xquery = "http://basex.org/modules/xquery"; + +(:~ +: template function +: @param template url to fill +: @param map name and value to apply +: @return updated doc from map +:) +declare function render($template as xs:string,$map as map(*)){{ + let $map:=map:new(($map,map{{"partial":=partial(?,?,?,$map,$template)}})) + return xquery:invoke($template,$map) +}};
+
+
+
+ profile... +
+
+ messages...
+
+ settings...
+
+
+ +
diff --git a/src/graphxq/views/dotform.xq b/src/graphxq/views/dotform.xq index f464226..7b5e778 100644 --- a/src/graphxq/views/dotform.xq +++ b/src/graphxq/views/dotform.xq @@ -27,18 +27,11 @@ node[shape=circle,style=filled,fillcolor=lightblue]