Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated XSLT in prep for JavaScript interface work #35

Merged
merged 1 commit into from
Jun 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
640 changes: 320 additions & 320 deletions docs/journal-view/Apr-1819.html

Large diffs are not rendered by default.

637 changes: 321 additions & 316 deletions docs/journal-view/Apr-1820.html

Large diffs are not rendered by default.

573 changes: 284 additions & 289 deletions docs/journal-view/Aug-1819.html

Large diffs are not rendered by default.

543 changes: 269 additions & 274 deletions docs/journal-view/Aug-1820.html

Large diffs are not rendered by default.

586 changes: 293 additions & 293 deletions docs/journal-view/Dec-1818-to-Jan-1819.html

Large diffs are not rendered by default.

591 changes: 293 additions & 298 deletions docs/journal-view/Dec-1819.html

Large diffs are not rendered by default.

410 changes: 205 additions & 205 deletions docs/journal-view/Feb-1819.html

Large diffs are not rendered by default.

599 changes: 302 additions & 297 deletions docs/journal-view/Feb-1820.html

Large diffs are not rendered by default.

497 changes: 246 additions & 251 deletions docs/journal-view/Jan-1820.html

Large diffs are not rendered by default.

623 changes: 309 additions & 314 deletions docs/journal-view/Jul-1819.html

Large diffs are not rendered by default.

519 changes: 257 additions & 262 deletions docs/journal-view/Jul-1820.html

Large diffs are not rendered by default.

583 changes: 289 additions & 294 deletions docs/journal-view/Jun-1819.html

Large diffs are not rendered by default.

481 changes: 238 additions & 243 deletions docs/journal-view/Jun-1820.html

Large diffs are not rendered by default.

537 changes: 271 additions & 266 deletions docs/journal-view/Mar-1819.html

Large diffs are not rendered by default.

627 changes: 311 additions & 316 deletions docs/journal-view/Mar-1820.html

Large diffs are not rendered by default.

822 changes: 422 additions & 400 deletions docs/journal-view/May-1819.html

Large diffs are not rendered by default.

572 changes: 286 additions & 286 deletions docs/journal-view/May-1820.html

Large diffs are not rendered by default.

572 changes: 286 additions & 286 deletions docs/journal-view/Nov-1819.html

Large diffs are not rendered by default.

637 changes: 316 additions & 321 deletions docs/journal-view/Oct-1819.html

Large diffs are not rendered by default.

558 changes: 279 additions & 279 deletions docs/journal-view/Sep-1819.html

Large diffs are not rendered by default.

348 changes: 174 additions & 174 deletions docs/journal-view/Sep-1820.html

Large diffs are not rendered by default.

62 changes: 37 additions & 25 deletions xslt-to-html/mitfordJournal-to-HTML.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@
<br/>
<h3>Nature</h3>
<xsl:for-each
select="current()//name/@ref ! normalize-space() => distinct-values()">
<div class="si">
select="current()//name/@ref ! tokenize(., '\s+') => distinct-values()">
<div class="si" id="{current() ! substring-after(., '#')}">

<h3><xsl:value-of select="$si//*[@xml:id = substring-after(current(), '#')]/*[position() eq 1]"/></h3>

Expand All @@ -147,7 +147,7 @@
</xsl:for-each></xsl:when></xsl:choose></li>
</xsl:for-each>
</ul>
<p><xsl:apply-templates select="$si//*[@xml:id = substring-after(current(), '#')]/note[1]"/></p>
<section class="glossNote"><xsl:apply-templates select="$si//*[@xml:id = substring-after(current(), '#')]/note[1]"/></section>


<xsl:if test="$si//*[@xml:id = substring-after(current(), '#')]//ptr">
Expand All @@ -169,8 +169,8 @@
<br/>
<h3>Persons, Personas, and Characters</h3>
<xsl:for-each
select="current()//persName/@ref ! normalize-space() => distinct-values()">
<div class="si">
select="current()//persName/@ref ! tokenize(., '\s+') => distinct-values()">
<div class="si" id="{current() ! substring-after(., '#')}">

<h3><xsl:value-of select="$si//*[@xml:id = substring-after(current(), '#')]/*[position() eq 1]"/></h3>

Expand All @@ -182,7 +182,7 @@
<li><xsl:sequence select="current() ! normalize-space()"/></li>
</xsl:for-each>
</ul>
<p><xsl:apply-templates select="$si//*[@xml:id = substring-after(current(), '#')]/note[1]"/></p>
<section class="glossNote"><xsl:apply-templates select="$si//*[@xml:id = substring-after(current(), '#')]/note[1]"/></section>


<xsl:if test="$si//*[@xml:id = substring-after(current(), '#')]//ptr">
Expand Down Expand Up @@ -304,25 +304,37 @@
<xsl:apply-templates/>
</span>
</xsl:template>
<xsl:template match="persName">
<span class="persName">
<xsl:apply-templates/>
</span>
</xsl:template>
<xsl:template match="placeName">
<span class="placeName">
<xsl:apply-templates/>
</span>
</xsl:template>
<xsl:template match="name">
<span class="name">
<xsl:apply-templates/>
</span>
</xsl:template>
<xsl:template match="body//title">
<span class="title">
<xsl:apply-templates/>
</span>
<xsl:template match="persName | placeName | name | body//title">
<xsl:choose>
<xsl:when test="@ref">
<xsl:choose>
<xsl:when test="current()[parent::*[@ref or @corresp]]">
<xsl:apply-templates/>

</xsl:when>


<xsl:otherwise><span class="{current() ! name()}" data-gloss="{@ref}"><a href="{@ref ! tokenize(., '\s+')[1]}"><xsl:apply-templates/></a></span></xsl:otherwise>


</xsl:choose>


</xsl:when>
<xsl:otherwise>
<span class="{name()}"><xsl:apply-templates/></span>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="body//bibl">
<xsl:choose>
<xsl:when test="@corresp">
<span class="title" data-gloss="{@corresp}"><a href="{@corresp ! tokenize(., '\s+')[1]}"><xsl:apply-templates/></a></span>
</xsl:when>
<xsl:otherwise>
<span class="title"><xsl:apply-templates/></span>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="p">
<p><xsl:apply-templates/></p>
Expand Down