Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EUPT XML
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
subugoe
EUPT
EUPT XML
Commits
e28d5696
Commit
e28d5696
authored
11 months ago
by
Max-Ferdinand Zeterberg
Browse files
Options
Downloads
Patches
Plain Diff
feat(g,w,translation): implement @cert in HTML serialization
parent
a30eb942
No related branches found
Branches containing commit
No related tags found
1 merge request
!32
Resolve "uncertainty für g/w/translation"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scenarios/xslt/edxml2html/libs/html-facsimile.lib.xsl
+15
-6
15 additions, 6 deletions
scenarios/xslt/edxml2html/libs/html-facsimile.lib.xsl
scenarios/xslt/edxml2html/libs/html-philology.lib.xsl
+48
-34
48 additions, 34 deletions
scenarios/xslt/edxml2html/libs/html-philology.lib.xsl
with
63 additions
and
40 deletions
scenarios/xslt/edxml2html/libs/html-facsimile.lib.xsl
+
15
−
6
View file @
e28d5696
...
...
@@ -118,18 +118,27 @@
</xsl:template>
<!-- LINE-PARTS -->
<xsl:template
match=
"g[not(@cert)]"
>
<span
class=
"g"
id=
"{if(@xml:id) then (@xml:id) else ('part_'||generate-id(.))}"
>
<xsl:apply-templates/>
</span>
<xsl:template
match=
"g"
>
<xsl:element
name=
"span"
>
<xsl:attribute
name=
"class"
>
g
</xsl:attribute>
<xsl:attribute
name=
"id"
>
<xsl:value-of
select=
"if(@xml:id) then (@xml:id) else ('part_'||generate-id(.))"
/>
</xsl:attribute>
<xsl:if
test=
".[@cert]"
>
<xsl:attribute
name=
"data-cert"
>
<xsl:value-of
select=
"./@cert"
/>
</xsl:attribute>
</xsl:if>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<!--
<xsl:template match="g[@cert]">
<span class="g" data-cert="{@cert}"
id="{if(@xml:id) then (@xml:id) else ('part_'||generate-id(.))}">
<xsl:apply-templates/>
</span>
</xsl:template>
</xsl:template>
-->
<xsl:template
match=
"metamark[contains(@rend, 'Line') or contains(@rend, 'line')]"
>
<xsl:variable
name=
"rend"
select=
"@rend"
/>
...
...
This diff is collapsed.
Click to expand it.
scenarios/xslt/edxml2html/libs/html-philology.lib.xsl
+
48
−
34
View file @
e28d5696
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:xs=
"http://www.w3.org/2001/XMLSchema"
xmlns:tei=
"http://www.tei-c.org/ns/1.0"
xmlns:uuid=
"java:java.util.UUID"
xmlns=
"http://www.w3.org/1999/xhtml"
exclude-result-prefixes=
"xs"
version=
"2.0"
xmlns:xs=
"http://www.w3.org/2001/XMLSchema"
xmlns:tei=
"http://www.tei-c.org/ns/1.0"
xmlns:uuid=
"java:java.util.UUID"
xmlns=
"http://www.w3.org/1999/xhtml"
exclude-result-prefixes=
"xs"
version=
"2.0"
xpath-default-namespace=
"http://sub.uni-goettingen.de/edxml#"
>
<xsl:template
match=
"@xml:lang"
>
...
...
@@ -121,9 +122,15 @@
<xsl:template
match=
"philology//translation"
>
<div
class=
"translation section-tab"
>
<xsl:element
name=
"div"
>
<xsl:attribute
name=
"class"
>
translation section-tab
</xsl:attribute>
<xsl:if
test=
".[@cert]"
>
<xsl:attribute
name=
"data-cert"
>
<xsl:value-of
select=
"./@cert"
/>
</xsl:attribute>
</xsl:if>
<xsl:apply-templates
select=
"@* | node()"
/>
</
div
>
</
xsl:element
>
</xsl:template>
<xsl:template
match=
"philology//translation"
mode=
"table"
>
...
...
@@ -183,33 +190,41 @@
(tokenize(@corresp, ' '))
else
(false())"
/>
<span
class=
"w item"
tabindex=
"1"
id=
"{$id}"
>
<span
class=
"body"
>
<xsl:apply-templates/>
</span>
<span
class=
"annotation"
>
<span
class=
"ana"
>
<xsl:choose>
<xsl:when
test=
"@ana"
>
<xsl:value-of
select=
"@ana"
/>
</xsl:when>
<xsl:otherwise>
<xsl:text>
</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:element
name=
"span"
>
<xsl:attribute
name=
"class"
>
w item
</xsl:attribute>
<xsl:attribute
name=
"tabindex"
>
1
</xsl:attribute>
<xsl:attribute
name=
"id"
><xsl:value-of
select=
"$id"
/></xsl:attribute>
<xsl:if
test=
".[@cert]"
>
<xsl:attribute
name=
"data-cert"
>
<xsl:value-of
select=
"./@cert"
/>
</xsl:attribute>
</xsl:if>
<span
class=
"body"
>
<xsl:apply-templates/>
</span>
<span
class=
"lemma"
>
<xsl:choose>
<xsl:when
test=
"@lemma"
>
<xsl:value-of
select=
"@lemma"
/>
</xsl:when>
<xsl:otherwise>
<xsl:text>
</xsl:text>
</xsl:otherwise>
</xsl:choose>
<span
class=
"annotation"
>
<span
class=
"ana"
>
<xsl:choose>
<xsl:when
test=
"@ana"
>
<xsl:value-of
select=
"@ana"
/>
</xsl:when>
<xsl:otherwise>
<xsl:text>
</xsl:text>
</xsl:otherwise>
</xsl:choose>
</span>
<span
class=
"lemma"
>
<xsl:choose>
<xsl:when
test=
"@lemma"
>
<xsl:value-of
select=
"@lemma"
/>
</xsl:when>
<xsl:otherwise>
<xsl:text>
</xsl:text>
</xsl:otherwise>
</xsl:choose>
</span>
</span>
</span>
</span>
</xsl:element>
</xsl:template>
<xsl:template
match=
"philology//notes"
>
...
...
@@ -224,14 +239,13 @@
<label
for=
"{$noteListId}"
>
<xsl:variable
name=
"targetIds"
select=
"tokenize($targetUnique, ' ')"
/>
<xsl:for-each
select=
"$targetIds"
>
<xsl:variable
name=
"targetId"
select=
"substring(., 2)"
/>
<xsl:apply-templates
select=
"root($thisNotes)//*[@xml:id = $targetId]"
/>
<xsl:variable
name=
"targetId"
select=
"substring(., 2)"
/>
<xsl:apply-templates
select=
"root($thisNotes)//*[@xml:id = $targetId]"
/>
</xsl:for-each>
</label>
<input
id=
"{$noteListId}"
type=
"checkbox"
/>
<ul>
<xsl:apply-templates
select=
"$thisNotes//note[@target = $targetUnique]"
/>
<xsl:apply-templates
select=
"$thisNotes//note[@target = $targetUnique]"
/>
</ul>
</li>
</xsl:for-each>
...
...
@@ -248,7 +262,7 @@
<span>
<xsl:apply-templates/>
</span>
</li>
</xsl:template>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment