Skip to content
Snippets Groups Projects
Commit e6ff00eb authored by Marcus Baumgarten's avatar Marcus Baumgarten
Browse files

Update tei-translation.xsl

parent 2009c30b
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- to do
index/term als Register ausbilden
-->
<xsl:stylesheet <xsl:stylesheet
xmlns:html="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:tei="http://www.tei-c.org/ns/1.0"
...@@ -11,7 +8,7 @@ index/term als Register ausbilden ...@@ -11,7 +8,7 @@ index/term als Register ausbilden
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exist="http://exist.sourceforge.net/NS/exist" xmlns:exist="http://exist.sourceforge.net/NS/exist"
exclude-result-prefixes="html tei" exclude-result-prefixes="html tei"
version="1.0"> version="2.0">
<!-- Einbindung der Standard-Templates und Variablen --> <!-- Einbindung der Standard-Templates und Variablen -->
<xsl:import href="http://diglib.hab.de/rules/styles/param.xsl"/> <xsl:import href="http://diglib.hab.de/rules/styles/param.xsl"/>
...@@ -197,27 +194,7 @@ index/term als Register ausbilden ...@@ -197,27 +194,7 @@ index/term als Register ausbilden
</xsl:template> </xsl:template>
<!-- Bildlinks -->
<!--<xsl:template match="tei:pb">
<xsl:variable name="image" select="@facs"/>
<div class="pagebreak">
<xsl:attribute name="style">font-style:normal;</xsl:attribute>
<xsl:text> [</xsl:text>
<a name="{@facs}" href="https://iiif.hab.de/object/mss_957-helmst/image/image_{substring-after(@facs, '=')}/full/800,/0/default.jpg" target="display2">
<xsl:choose>
<xsl:when test="@n">
<xsl:value-of select="@n"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring-after(substring-after(@facs,'_'),'_')"/>
</xsl:otherwise>
</xsl:choose>
</a>
<xsl:text>] </xsl:text>
</div>
</xsl:template>-->
<!-- pysical pages --> <!-- pysical pages -->
<xsl:template match="tei:pb"> <xsl:template match="tei:pb">
<xsl:variable name="page" select="@source"/> <xsl:variable name="page" select="@source"/>
...@@ -247,50 +224,7 @@ index/term als Register ausbilden ...@@ -247,50 +224,7 @@ index/term als Register ausbilden
</a> </a>
<!--<xsl:if test="@ed">
<xsl:if test="@ed">
<xsl:value-of select="@ed"/>
<xsl:text>: </xsl:text>
</xsl:if>
</xsl:if>
<xsl:choose>
<xsl:when test="@facs">
<xsl:element name="a">
<xsl:attribute name="href">
<!-\- convert identifier z.B. drucke_qun-59-9-1_00006 -\->
<!-\- select type of resource e.g. drucke -\->
<xsl:text>http://diglib.hab.de/</xsl:text>
<xsl:value-of select="substring-before(substring(@facs,2),'_')"/>
<xsl:text>/</xsl:text>
<!-\- select shelf mark e.g.qun-59-9-1 -\->
<xsl:value-of
select="substring-before(substring-after(substring(@facs,2),'_'),'_')"/>
<!-\- select Image-No , e.g. 00006 -\->
<xsl:text>/start.htm?distype=imgs&amp;image=</xsl:text>
<xsl:value-of
select="substring-after(substring-after(substring(@facs,2),'_'),'_')"
/>
</xsl:attribute>
<xsl:attribute name="target">
<xsl:text>display2</xsl:text>
</xsl:attribute>
<xsl:choose>
<xsl:when test="@n">
<xsl:value-of select="@n"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of
select="substring-after(substring-after(substring(@facs,2),'_'),'_')"
/>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@n"/>
</xsl:otherwise>
</xsl:choose>-->
<xsl:text>] </xsl:text> <xsl:text>] </xsl:text>
</div> </div>
</xsl:template> </xsl:template>
...@@ -521,6 +455,7 @@ index/term als Register ausbilden ...@@ -521,6 +455,7 @@ index/term als Register ausbilden
</span> </span>
</xsl:template> </xsl:template>
<xsl:template match="tei:list"> <xsl:template match="tei:list">
<xsl:element name="ul"> <xsl:element name="ul">
<xsl:attribute name="class">liste</xsl:attribute> <xsl:attribute name="class">liste</xsl:attribute>
...@@ -549,9 +484,24 @@ index/term als Register ausbilden ...@@ -549,9 +484,24 @@ index/term als Register ausbilden
</xsl:template> </xsl:template>
<xsl:template match="tei:lb"> <xsl:template match="tei:lb">
<br/><xsl:apply-templates/> <xsl:choose>
<xsl:when test="ancestor::tei:item">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:when>
<xsl:otherwise>
<br/>
</xsl:otherwise>
</xsl:choose>
</xsl:template> </xsl:template>
<!-- Regel zum Entfernen von "=" oder "= " in <list> -->
<xsl:template match="tei:list//text()">
<xsl:value-of select="normalize-space(replace(., '=\s*', ''))"/>
</xsl:template>
<xsl:template match="tei:closer"> <xsl:template match="tei:closer">
<p> <p>
<i><xsl:apply-templates/></i> <i><xsl:apply-templates/></i>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment