-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
11 changed files
with
925 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
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
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,76 @@ | ||
<xsl:stylesheet version="2.0" | ||
xmlns="http://www.w3.org/1999/xhtml" | ||
xmlns:html="http://www.w3.org/1999/xhtml" | ||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:tei="http://www.tei-c.org/ns/1.0" | ||
> | ||
|
||
<xsl:template match="@*|node()"> | ||
<xsl:call-template name="copy-element" /> | ||
</xsl:template> | ||
|
||
<xsl:template name="copy-element"> | ||
<xsl:copy> | ||
<xsl:apply-templates select="@*|node()"/> | ||
</xsl:copy> | ||
</xsl:template> | ||
|
||
<xsl:template match="/"> | ||
<html> | ||
<head> | ||
</head> | ||
<body data-pagefind-body="" | ||
data-pagefind-meta="url[data-url],title[data-title],version[data-version]" | ||
data-pagefind-filter="book[data-book],version[data-version]" | ||
data-pagefind-sort="book-page[data-book-page]" | ||
data-title="#title#" | ||
data-url="#url#" | ||
data-book="#book#" | ||
data-version="#version#" | ||
data-book-page="#bookPage#" | ||
> | ||
<xsl:call-template name="copy-element" /> | ||
</body> | ||
</html> | ||
</xsl:template> | ||
|
||
<!-- <span class="tei-note tei-type-term info-box" data-tei="note" data-tei-type="term"> --> | ||
<xsl:template match="span[contains(@class, 'info-box') and not (contains(@class, 'has-info-box'))]"> | ||
</xsl:template> | ||
|
||
<xsl:template match="span[@data-tei-resp='ednote']"> | ||
</xsl:template> | ||
|
||
<xsl:template match="*[contains(@class, 'hidden')]"> | ||
</xsl:template> | ||
|
||
<xsl:template match="span[@data-tei-type='event-mark']"> | ||
</xsl:template> | ||
|
||
<!-- VERSION-SPECIFIC --> | ||
|
||
<!-- <span class="tei-w" data-tei="w" data-tei-norm="sins"><span class="norm">sins</span><span class="orig">sinns</span></span> --> | ||
<xsl:template match="span[@class='orig']"> | ||
</xsl:template> | ||
|
||
<!-- <span class="tei-abbr" data-tei="abbr">hon.< --> | ||
<xsl:template match="span[@data-tei='abbr']"> | ||
</xsl:template> | ||
|
||
<xsl:template match="span[@data-tei='surplus']"> | ||
</xsl:template> | ||
|
||
<xsl:template match="span[@data-tei='sic']"> | ||
</xsl:template> | ||
|
||
<!-- <span class="tei-measure tei-type-currency not-a-word" data-tei="measure" data-tei-type="currency" data-tei-unit="£">6<span class="tei-am" data-tei="am" data-tei-rend="superscript italic">l</span></span> --> | ||
<xsl:template match="span[@data-tei='am']"> | ||
</xsl:template> | ||
|
||
<xsl:template match="del[@data-tei='del']"> | ||
</xsl:template> | ||
|
||
<xsl:template match="span[@data-tei='fw' and contains(@data-tei-place, 'margin') and not(contains(@class, 'tei-type-head'))]"> | ||
</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,35 @@ | ||
<xsl:stylesheet version="2.0" | ||
xmlns="http://www.w3.org/1999/xhtml" | ||
xmlns:html="http://www.w3.org/1999/xhtml" | ||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:tei="http://www.tei-c.org/ns/1.0" | ||
> | ||
|
||
<xsl:template match="@*|node()"> | ||
<xsl:call-template name="copy-element" /> | ||
</xsl:template> | ||
|
||
<xsl:template name="copy-element"> | ||
<xsl:copy> | ||
<xsl:apply-templates select="@*|node()"/> | ||
</xsl:copy> | ||
</xsl:template> | ||
|
||
<xsl:template match="/"> | ||
<html> | ||
<head> | ||
</head> | ||
<body data-pagefind-body="" | ||
data-pagefind-meta="url[data-url],title[data-title]" | ||
data-title="#title#" | ||
data-url="#url#" | ||
data-pagefind-filter="book[data-book],version[data-version]" | ||
data-book="#book#" | ||
data-version="#version#" | ||
> | ||
<xsl:call-template name="copy-element" /> | ||
</body> | ||
</html> | ||
</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 @@ | ||
{"N":"package","version":"20","packageVersion":"1","saxonVersion":"SaxonJS 2.6","target":"JS","targetVersion":"2","name":"TOP-LEVEL","relocatable":"false","buildDateTime":"2024-08-23T01:24:27.625+01:00","ns":"xml=~ =http://www.w3.org/1999/xhtml html=http://www.w3.org/1999/xhtml xsl=~ tei=http://www.tei-c.org/ns/1.0","C":[{"N":"co","id":"0","uniform":"true","binds":"1","C":[{"N":"template","flags":"os","module":"html-to-html.xslt","slots":"200","baseUri":"file:///home/jeff/src/prj/alice-thornton/apps/textsearch/html-to-html.xslt","name":"Q{}copy-element","line":"12","expand-text":"false","sType":"1 ","C":[{"N":"copy","sType":"1 ","flags":"cin","role":"body","line":"13","C":[{"N":"applyT","sType":"* ","line":"14","mode":"#unnamed","bSlot":"0","C":[{"N":"docOrder","sType":"*N u[NT,NP,NC,NE]","role":"select","line":"14","C":[{"N":"union","op":"|","sType":"*N u[NT,NP,NC,NE]","ns":"= xml=~ fn=~ html=http://www.w3.org/1999/xhtml xsl=~ tei=http://www.tei-c.org/ns/1.0 ","C":[{"N":"axis","name":"attribute","nodeTest":"*NA"},{"N":"axis","name":"child","nodeTest":"*N u[NT,NP,NC,NE]"}]}]}]}]}]}]},{"N":"co","id":"1","binds":"0","C":[{"N":"mode","onNo":"TC","flags":"","patternSlots":"0","prec":"","C":[{"N":"templateRule","rank":"0","prec":"0","seq":"1","ns":"xml=~ =http://www.w3.org/1999/xhtml html=http://www.w3.org/1999/xhtml xsl=~ tei=http://www.tei-c.org/ns/1.0","minImp":"0","flags":"s","slots":"200","baseUri":"file:///home/jeff/src/prj/alice-thornton/apps/textsearch/html-to-html.xslt","line":"18","module":"html-to-html.xslt","expand-text":"false","match":"/","prio":"-0.5","matches":"ND","C":[{"N":"p.nodeTest","role":"match","test":"ND","sType":"1ND","ns":"= xml=~ fn=~ html=http://www.w3.org/1999/xhtml xsl=~ tei=http://www.tei-c.org/ns/1.0 "},{"N":"elem","name":"html","sType":"1NE nQ{http://www.w3.org/1999/xhtml}html ","nsuri":"http://www.w3.org/1999/xhtml","namespaces":"=http://www.w3.org/1999/xhtml html=http://www.w3.org/1999/xhtml tei=http://www.tei-c.org/ns/1.0","role":"action","line":"19","C":[{"N":"sequence","sType":"*NE ","C":[{"N":"elem","name":"head","sType":"1NE nQ{http://www.w3.org/1999/xhtml}head ","nsuri":"http://www.w3.org/1999/xhtml","namespaces":"=http://www.w3.org/1999/xhtml html=http://www.w3.org/1999/xhtml tei=http://www.tei-c.org/ns/1.0","line":"20","C":[{"N":"empty","sType":"0 "}]},{"N":"elem","name":"body","sType":"1NE nQ{http://www.w3.org/1999/xhtml}body ","nsuri":"http://www.w3.org/1999/xhtml","namespaces":"=http://www.w3.org/1999/xhtml html=http://www.w3.org/1999/xhtml tei=http://www.tei-c.org/ns/1.0","line":"29","C":[{"N":"sequence","sType":"* ","C":[{"N":"att","name":"data-pagefind-body","nsuri":"","sType":"1NA ","C":[{"N":"str","sType":"1AS ","val":""}]},{"N":"att","name":"data-pagefind-meta","nsuri":"","sType":"1NA ","C":[{"N":"str","sType":"1AS ","val":"url[data-url],title[data-title]"}]},{"N":"att","name":"data-title","nsuri":"","sType":"1NA ","C":[{"N":"str","sType":"1AS ","val":"#title#"}]},{"N":"att","name":"data-url","nsuri":"","sType":"1NA ","C":[{"N":"str","sType":"1AS ","val":"#url#"}]},{"N":"att","name":"data-pagefind-filter","nsuri":"","sType":"1NA ","C":[{"N":"str","sType":"1AS ","val":"book[data-book],version[data-version]"}]},{"N":"att","name":"data-book","nsuri":"","sType":"1NA ","C":[{"N":"str","sType":"1AS ","val":"#book#"}]},{"N":"att","name":"data-version","nsuri":"","sType":"1NA ","C":[{"N":"str","sType":"1AS ","val":"#version#"}]},{"N":"callT","bSlot":"0","sType":"* ","name":"Q{}copy-element","line":"30"}]}]}]}]}]},{"N":"templateRule","rank":"1","prec":"0","seq":"0","ns":"xml=~ =http://www.w3.org/1999/xhtml html=http://www.w3.org/1999/xhtml xsl=~ tei=http://www.tei-c.org/ns/1.0","minImp":"0","flags":"s","slots":"200","baseUri":"file:///home/jeff/src/prj/alice-thornton/apps/textsearch/html-to-html.xslt","line":"8","module":"html-to-html.xslt","expand-text":"false","match":"@*|node()","prio":"-0.5","matches":"NA","C":[{"N":"p.nodeTest","role":"match","test":"NA","sType":"1NA"},{"N":"callT","bSlot":"0","sType":"* ","name":"Q{}copy-element","role":"action","line":"9"}]},{"N":"templateRule","rank":"2","prec":"0","seq":"0","ns":"xml=~ =http://www.w3.org/1999/xhtml html=http://www.w3.org/1999/xhtml xsl=~ tei=http://www.tei-c.org/ns/1.0","minImp":"0","flags":"s","slots":"200","baseUri":"file:///home/jeff/src/prj/alice-thornton/apps/textsearch/html-to-html.xslt","line":"8","module":"html-to-html.xslt","expand-text":"false","match":"@*|node()","prio":"-0.5","matches":"N u[NT,NP,NC,NE]","C":[{"N":"p.nodeTest","role":"match","test":"N u[NT,NP,NC,NE]","sType":"1N u[NT,NP,NC,NE]"},{"N":"callT","bSlot":"0","sType":"* ","name":"Q{}copy-element","role":"action","line":"9"}]}]}]},{"N":"overridden"},{"N":"output","C":[{"N":"property","name":"Q{http://saxon.sf.net/}stylesheet-version","value":"20"}]},{"N":"decimalFormat"}],"Σ":"6f3b471f"} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,21 @@ | ||
{ | ||
"name": "textsearch", | ||
"version": "0.1.0", | ||
"main": "textsearch.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"extract": "rm -rf clone && git clone https://github.com/kingsdigitallab/alice-thornton.git -b dts --single-branch clone", | ||
"transform": "node textsearch.js", | ||
"load": "npx pagefind --site to-be-indexed --output-path ../../frontend/_site/pagefind", | ||
"index": "npm run extract && npm run transform && npm run load", | ||
"tl": "npm run transform && npm run load" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"description": "", | ||
"dependencies": { | ||
"pagefind": "^1.1.0", | ||
"saxon-js": "^2.6.0", | ||
"xmldom": "^0.6.0" | ||
} | ||
} |
Oops, something went wrong.