Commit 0ff3ef0a authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

add bundle xq

parent 6d024203
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
xquery version "3.0";

declare namespace configuration = "http://certic.unicaen.fr/max/ns/1.0";

declare variable $bundleUrl  external;

(:~
: Add bundle to configuration file
:)

let $bundles := doc('../../config.xml')//configuration:bundles

let $name := tokenize(file:name($bundleUrl),'\.')[1]

return insert node <bundle name="{$name}" url="{$bundleUrl}"/> into $bundles