forked from abaevdict/abaev-basex
interpret tei:lb as new paragraph
This commit is contained in:
parent
ac9d112c13
commit
0e7fb74acf
3 changed files with 17 additions and 13 deletions
|
@ -16,7 +16,8 @@ declare %rest:path("{$lang}/entries/{$id}")
|
||||||
%output:html-version('5')
|
%output:html-version('5')
|
||||||
function entries:entry($lang as xs:string, $id as xs:string, $query as xs:string?) {
|
function entries:entry($lang as xs:string, $id as xs:string, $query as xs:string?) {
|
||||||
if (count($query) = 0) then
|
if (count($query) = 0) then
|
||||||
doc(`abaevdict_{$lang}/html/{$id}.html`)
|
(: doc(`abaevdict_{$lang}/html/{$id}.html`) :)
|
||||||
|
abv-m:make-html(doc(`abaevdict_{$lang}/xml/{$id}.xml`),$lang)
|
||||||
else
|
else
|
||||||
let $xml := doc(`abaevdict_{$lang}/xml/{$id}.xml`)/tei:entry[1]
|
let $xml := doc(`abaevdict_{$lang}/xml/{$id}.xml`)/tei:entry[1]
|
||||||
let $marked := ft:mark(
|
let $marked := ft:mark(
|
||||||
|
|
|
@ -3,10 +3,7 @@ declare namespace abv = "http://ossetic-studies.org/ns/abaevdict";
|
||||||
|
|
||||||
import module namespace abv-m = 'http://ossetic-studies.org/ns/abaevdict-mod' at './abv-mod.xqm';
|
import module namespace abv-m = 'http://ossetic-studies.org/ns/abaevdict-mod' at './abv-mod.xqm';
|
||||||
|
|
||||||
let $mapdata := abv-m:make-geomap(
|
abv-m:make-html(doc('abaevdict_en/xml/entry_a.xml'),'en')
|
||||||
doc(`abaevdict_en/xml/entry_mad.xml`),
|
|
||||||
'en')
|
|
||||||
return json:serialize($mapdata)
|
|
||||||
|
|
||||||
(: collection(`abaevdict_en/html`)/article[@id='entry_az'] :)
|
(: collection(`abaevdict_en/html`)/article[@id='entry_az'] :)
|
||||||
(: html:doc('abaevdict_en/html/entry_az.html') :)
|
(: html:doc('abaevdict_en/html/entry_az.html') :)
|
||||||
|
|
|
@ -87,12 +87,21 @@
|
||||||
group-adjacent="not(self::tei:etym)">
|
group-adjacent="not(self::tei:etym)">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="current-grouping-key()">
|
<xsl:when test="current-grouping-key()">
|
||||||
<p class="abv-mainpart">
|
<div class="abv-mainpart">
|
||||||
<xsl:apply-templates select="current-group()"/>
|
<p>
|
||||||
</p>
|
<xsl:apply-templates select="current-group()"/>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:apply-templates select="current-group()"/>
|
<div class="abv-etym">
|
||||||
|
<xsl:for-each-group select="node()"
|
||||||
|
group-starting-with="tei:lb">
|
||||||
|
<p>
|
||||||
|
<xsl:apply-templates select="current-group()"/>
|
||||||
|
</p>
|
||||||
|
</xsl:for-each-group>
|
||||||
|
</div>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:for-each-group>
|
</xsl:for-each-group>
|
||||||
|
@ -260,9 +269,7 @@
|
||||||
|
|
||||||
<!-- ETYMOLOGY -->
|
<!-- ETYMOLOGY -->
|
||||||
<xsl:template match="tei:etym">
|
<xsl:template match="tei:etym">
|
||||||
<p class="abv-etym">
|
<xsl:apply-templates />
|
||||||
<xsl:apply-templates />
|
|
||||||
</p>
|
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="tei:oRef">
|
<xsl:template match="tei:oRef">
|
||||||
|
@ -284,7 +291,6 @@
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="tei:lb">
|
<xsl:template match="tei:lb">
|
||||||
<xsl:element name="br"/>
|
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="tei:hi">
|
<xsl:template match="tei:hi">
|
||||||
|
|
Loading…
Add table
Reference in a new issue