-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
491 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.