diff --git a/.gitignore b/.gitignore index 2f67de1..cba641f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,7 @@ node_modules #dist folder dist build -data/tm-converter +data/xslt/tmxsl # temporary work data TODOs.txt diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 36262bb..f150b2f 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -75,6 +75,13 @@ module.exports = (grunt) -> copy: src: files: [{expand: true, flatten: true, cwd: 'src/', src: ['**'], dest: 'dist/'}] + dependencies: + files: [{ + cwd: 'bower_components/tmxsl', # set working folder / root to copy + src: '**/*', # copy all files and subfolders + dest: 'data/xslt/tmxsl', # destination folder + expand: true # required when using cwd + }] #fonts: # files: [{expand: true, cwd: 'bower_components/bootstrap/dist/fonts/', src: ['*'], dest: 'fonts/'}] diff --git a/bower.json b/bower.json index 3adbd5c..41d0cf0 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "FreiDi:topicMapViz", - "version": "0.7.1-beta", + "version": "0.8.0-beta", "authors": [ "Benjamin W. Bohl " ], @@ -24,6 +24,7 @@ "jquery": "~2.1.1", "bootstrap": "~3.2.0", "d3": "~3.4.13", - "bootstrap-list-filter": "https://github.com/stefanocudini/bootstrap-list-filter/releases/tag/v0.1.7" + "bootstrap-list-filter": "git://github.com/stefanocudini/bootstrap-list-filter.git#v0.2.0", + "tmxsl": "git://github.com/heuer/tmxsl.git#713ee96436184cc0aafbc9edb59ee5d429245f02" } } diff --git a/build.xml b/build.xml index d4cb7b3..f37f8aa 100644 --- a/build.xml +++ b/build.xml @@ -1,7 +1,7 @@ - + diff --git a/data/xql/getJSONtopicMap.xql b/data/xql/getJSONtopicMap.xql index f4a1c88..9cf92e8 100644 --- a/data/xql/getJSONtopicMap.xql +++ b/data/xql/getJSONtopicMap.xql @@ -5,7 +5,7 @@ import module namespace config="http://www.freischuetz-digital.de/topicMapViz/co declare option exist:serialize "method=text media-type=text/plain omit-xml-declaration=yes"; let $doc := xmldb:document($config:app-root||'/topicMaps/FreiDi_TopicMap_2.xml') - let $xslt := xmldb:document($config:app-root||'/data/tm-converter/xtm2tojtm1.xsl') + let $xslt := xmldb:document($config:app-root||'/data/xslt/tmxsl/xtm2tojtm1.xsl') let $jtm := transform:transform($doc, $xslt, ) diff --git a/data/xql/getOccurrenceDetail.xql b/data/xql/getOccurrenceDetail.xql new file mode 100644 index 0000000..9a58e41 --- /dev/null +++ b/data/xql/getOccurrenceDetail.xql @@ -0,0 +1,29 @@ +xquery version "3.0"; + +import module namespace config="http://www.freischuetz-digital.de/topicMapViz/config" at "../../modules/config.xqm"; +import module namespace freidi-tmv="http://www.freischuetz-digital.de/topicMapViz/app" at "../../modules/app.xql"; + + +declare namespace tei = "http://www.tei-c.org/ns/1.0"; + +(:declare option exist:serialize "method=xhtml media-type=text/html omit-xml-declaration=yes indent=yes";:) +declare option exist:serialize "method=text media-type=text/plain omit-xml-declaration=yes"; + + +declare variable $href := request:get-parameter('href',''); +declare variable $docName := substring-before($href, '#'); +declare variable $topicID := substring-after($href, '#'); + +let $doc := xmldb:document($freidi-tmv:text-root||$docName) +let $xslt := xmldb:document($config:app-root||'/data/xslt/getOccurenceDetail.xsl') + +let $result := transform:transform($doc, $xslt, ) + +return +(:{$docName || 'with ID: ' || $topicID}:) +(:element root { +for $occurence in $doc//tei:*[@key = $topicID] +return $occurence/parent::tei:* + +}:) +serialize($result) \ No newline at end of file diff --git a/data/xslt/getOccurenceDetail.xsl b/data/xslt/getOccurenceDetail.xsl new file mode 100644 index 0000000..be70713 --- /dev/null +++ b/data/xslt/getOccurenceDetail.xsl @@ -0,0 +1,61 @@ + + + + + + Created on: May 21, 2015 + + Author: benjamin + + + + + + + +
+
    + + +
  1. + + + +
  2. +
    +
+
+
+ + +
+ + + + , + Akt + + , Szene + + +
+
+ + + +
+
+ + + + + +
\ No newline at end of file diff --git a/expath-pkg.xml b/expath-pkg.xml index f8092b1..e94b159 100644 --- a/expath-pkg.xml +++ b/expath-pkg.xml @@ -1,4 +1,4 @@ - + FreiDi:topicMapViz \ No newline at end of file diff --git a/index.html b/index.html index 551aa90..3b08cc4 100644 --- a/index.html +++ b/index.html @@ -8,8 +8,19 @@