Skip to content

Commit

Permalink
merge release 0.8.0
Browse files Browse the repository at this point in the history
closes #12 closes #24 closes #2
  • Loading branch information
bwbohl committed Jun 10, 2015
2 parents aef442e + 0249f8e commit 3e1835f
Show file tree
Hide file tree
Showing 13 changed files with 491 additions and 136 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ node_modules
#dist folder
dist
build
data/tm-converter
data/xslt/tmxsl

# temporary work data
TODOs.txt
Expand Down
7 changes: 7 additions & 0 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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/'}]

Expand Down
5 changes: 3 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "FreiDi:topicMapViz",
"version": "0.7.1-beta",
"version": "0.8.0-beta",
"authors": [
"Benjamin W. Bohl <bohl@edirom.de>"
],
Expand All @@ -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"
}
}
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project default="xar" name="proofMEIdata">

<property name="project.version" value="0.7.1-beta"/>
<property name="project.version" value="0.8.0-beta"/>
<property name="project.app" value="FreiDi-topicMapViz"/>
<property name="build.dir" value="build"/>

Expand Down
2 changes: 1 addition & 1 deletion data/xql/getJSONtopicMap.xql
Original file line number Diff line number Diff line change
Expand Up @@ -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, <parameters><param name="jtm_version" value="1.1"/></parameters>)

Expand Down
29 changes: 29 additions & 0 deletions data/xql/getOccurrenceDetail.xql
Original file line number Diff line number Diff line change
@@ -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, <parameters><param name="topicID" value="{$topicID}"/></parameters>)

return
(:<a href="{$href}">{$docName || 'with ID: ' || $topicID}</a>:)
(:element root {
for $occurence in $doc//tei:*[@key = $topicID]
return $occurence/parent::tei:*
}:)
serialize($result)
61 changes: 61 additions & 0 deletions data/xslt/getOccurenceDetail.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:math="http://www.w3.org/2005/xpath-functions/math" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl" exclude-result-prefixes="xs math xd tei" version="3.0">
<xd:doc scope="stylesheet">
<xd:desc>
<xd:p>
<xd:b>Created on:</xd:b> May 21, 2015</xd:p>
<xd:p>
<xd:b>Author:</xd:b> benjamin</xd:p>
<xd:p/>
</xd:desc>
</xd:doc>
<!-- <xsl:output method="text" omit-xml-declaration="yes" indent="no"/>-->
<xsl:param name="topicID" required="yes"/>
<xsl:template match="/">
<a class="btn" data-toggle="collapse" href="{concat('#collapse_',//tei:TEI/@xml:id)}" aria-expanded="false" aria-controls="{concat('#collapse_',//tei:TEI/@xml:id)}">
<span class="caret">
<xsl:text> </xsl:text>
</span>
<xsl:value-of select="//tei:teiHeader/tei:fileDesc/tei:titleStmt/tei:title[not(@type = 'desc')]"/>
</a>
<div id="{concat('collapse_',//tei:TEI/@xml:id)}" class="collapse">
<ol>
<xsl:variable name="matches" as="node()*" select="//tei:*[@key = $topicID or @xml:id = $topicID]"/>
<xsl:for-each select="$matches">
<li>
<xsl:call-template name="occurrence">
<xsl:with-param name="pos" select="position()"/>
</xsl:call-template>
</li>
</xsl:for-each>
</ol>
</div>
</xsl:template>
<xsl:template name="occurrence">
<xsl:param name="pos"/>
<div class="meta">
<!--<xsl:value-of select="$pos"/>
<xsl:text>) </xsl:text>-->
<xsl:value-of select="//tei:teiHeader/tei:fileDesc/tei:titleStmt/tei:title[not(@type = 'desc')]"/>
<xsl:if test="//tei:div[@type = 'act'] and //tei:div[@type = 'scene']">
<xsl:text>, </xsl:text>
<xsl:text>Akt </xsl:text>
<xsl:number value="ancestor::tei:div[@type = 'act']/@n" format="I"/>
<xsl:text>, Szene </xsl:text>
<xsl:number value="ancestor::tei:div[@type = 'scene']/@n" format="1"/>
</xsl:if>
</div>
<div class="content">
<!--<xsl:variable name="text">
<xsl:apply-templates select="./parent::tei:*"/>
</xsl:variable>-->
<xsl:apply-templates select="./parent::tei:*"/>
<!-- <xsl:value-of select="$text"/>-->
</div>
</xsl:template>
<xsl:template match="tei:*[@key = $topicID]">
<mark>
<xsl:apply-templates/>
</mark>
</xsl:template>
</xsl:stylesheet>
2 changes: 1 addition & 1 deletion expath-pkg.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<package xmlns="http://expath.org/ns/pkg" name="http://freischuetz-digital.de/topicMapViz" abbrev="topicMapViz" version="0.7.1-beta" spec="1.0">
<package xmlns="http://expath.org/ns/pkg" name="http://freischuetz-digital.de/topicMapViz" abbrev="topicMapViz" version="0.8.0-beta" spec="1.0">
<title>FreiDi:topicMapViz</title>
</package>
105 changes: 86 additions & 19 deletions index.html

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions modules/app.xql
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ module namespace freidi-tmv="http://www.freischuetz-digital.de/topicMapViz/app";
import module namespace templates="http://exist-db.org/xquery/templates" ;
import module namespace config="http://www.freischuetz-digital.de/topicMapViz/config" at "config.xqm";

declare variable $freidi-tmv:text-root := "/db/contents/referenceTexts/";

(:~
: This is a sample templating function. It will be called by the templating module if
: it encounters an HTML element with an attribute: data-template="app:test" or class="app:test" (deprecated).
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "FreiDi-topicMapViz",
"version": "0.7.1-beta",
"version": "0.8.0-beta",
"repository": {
"type": "git",
"url": "git://github.com/Freischuetz-Digital/topicMapViz.git"
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ It is intended for vizualizing JTM topic maps.

For development purposes it can be built and served with bower and grunt, a respective test topic map is included as the application is tailored to our data.

Moreover a ant script for building a eXist-db application is included. In the eXist based setup the tm-converter stylesheets by Lars Heuer (published at https://code.google.com/p/topic-maps/ under Apache License 2.0) will be used for transfroming XTM 2.0 topic maps to JTM 1.1 specification. In order to include theses script you need SVN installed as the repository will be checked out via bower install.
Moreover a ant script for building a eXist-db application is included. In the eXist based setup the tmxsl stylesheets by Lars Heuer (published at https://github.com/heuer/tmxsl under Apache License 2.0) will be used for transfroming XTM 2.0 topic maps to JTM 1.1 specification. In order to include theses script you need SVN installed as the repository will be checked out via bower install.

Setup
-----
Expand Down Expand Up @@ -39,4 +39,4 @@ You need ant insalled on your system

```shell
ant
```
```
Loading

0 comments on commit 3e1835f

Please sign in to comment.