This repository has been archived by the owner on Jan 13, 2024. It is now read-only.
-
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
1 parent
1efc590
commit 3e1d3a5
Showing
43 changed files
with
23,285 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<xsl:stylesheet 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" | ||
exclude-result-prefixes="xs tei" version="2.0"> | ||
<xsl:output method="xml" encoding="utf-8" indent="no" omit-xml-declaration="yes"/> | ||
<xsl:param name="rdg"/> | ||
<xsl:template match="tei:app"> | ||
<xsl:apply-templates select="tei:rdg[. = $rdg][1]" mode="init"/> | ||
</xsl:template> | ||
<xsl:template match="tei:rdg" mode="init"> | ||
<xsl:apply-templates/> | ||
<xsl:text>] </xsl:text> | ||
<xsl:apply-templates | ||
select="../tei:rdg[@wit ne current()/@wit][not(@cert)][1]" mode="second"/> | ||
<xsl:if test="../count(tei:rdg[not(@cert)]) eq 2"> | ||
<xsl:text> // </xsl:text> | ||
<xsl:apply-templates | ||
select="../tei:rdg[@wit ne current()/@wit][not(@cert)][2]" | ||
mode="second"/> | ||
</xsl:if> | ||
<xsl:if test="../count(tei:rdg) eq 1"> | ||
<xsl:text>--</xsl:text> | ||
</xsl:if> | ||
</xsl:template> | ||
<xsl:template match="tei:choice"> | ||
<xsl:apply-templates/> | ||
</xsl:template> | ||
<xsl:template match="tei:reg"/> | ||
<xsl:template match="tei:ex"/> | ||
<xsl:template match="tei:supplied"/> | ||
<xsl:template match="tei:gap"> | ||
<xsl:text>--</xsl:text> | ||
</xsl:template> | ||
<xsl:template match="tei:del"> | ||
<xsl:value-of select="concat('(', ., ')')"/> | ||
</xsl:template> | ||
<xsl:template match="tei:add"> | ||
<xsl:value-of select="concat('\', ., '/')"/> | ||
</xsl:template> | ||
<xsl:template match="tei:rdg" mode="second"> | ||
<xsl:choose> | ||
<xsl:when test="contains(@ana, '#error')"> | ||
<span class="ex">error</span> | ||
</xsl:when> | ||
<xsl:otherwise> | ||
<xsl:apply-templates/> | ||
</xsl:otherwise> | ||
</xsl:choose> | ||
</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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<xsl:stylesheet 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" exclude-result-prefixes="xs tei" version="2.0"> | ||
<xsl:output method="xml" encoding="utf-8" indent="no" omit-xml-declaration="yes"/> | ||
<xsl:param name="rdg"/> | ||
<xsl:param name="ana"/> | ||
<xsl:template match="tei:app"> | ||
<xsl:apply-templates select="tei:rdg[. = $rdg]" mode="init"/> | ||
</xsl:template> | ||
<xsl:template match="tei:rdg" mode="init"> | ||
<xsl:apply-templates/> | ||
<xsl:text>] </xsl:text> | ||
<xsl:apply-templates select="../tei:rdg[@wit ne current()/@wit][not(tokenize(@ana, '\s+') = $ana)][1]" mode="second"/> | ||
<xsl:if test="../count(tei:rdg[not(contains(@ana, $ana))]) eq 2"> | ||
<xsl:text> // </xsl:text> | ||
<xsl:apply-templates select="../tei:rdg[@wit ne current()/@wit][not(tokenize(@ana, '\s+') = $ana)][2]" mode="second"/> | ||
</xsl:if> | ||
<xsl:if test="../count(tei:rdg) eq 1"> | ||
<xsl:text>--</xsl:text> | ||
</xsl:if> | ||
</xsl:template> | ||
<xsl:template match="tei:choice"> | ||
<xsl:apply-templates/> | ||
</xsl:template> | ||
<xsl:template match="tei:expan"/> | ||
<xsl:template match="tei:reg"/> | ||
<xsl:template match="tei:ex"/> | ||
<xsl:template match="tei:supplied"/> | ||
<xsl:template match="tei:gap"> | ||
<xsl:text>--</xsl:text> | ||
</xsl:template> | ||
<xsl:template match="tei:del"> | ||
<xsl:value-of select="concat('(', ., ')')"/> | ||
</xsl:template> | ||
<xsl:template match="tei:add"> | ||
<xsl:value-of select="concat('\', ., '/')"/> | ||
</xsl:template> | ||
<xsl:template match="tei:rdg" mode="second"> | ||
<xsl:choose> | ||
<xsl:when test="contains(@ana, '#error')"> | ||
<span class="ex">error</span> | ||
</xsl:when> | ||
<xsl:otherwise> | ||
<xsl:apply-templates/> | ||
</xsl:otherwise> | ||
</xsl:choose> | ||
</xsl:template> | ||
</xsl:stylesheet> |
Oops, something went wrong.