130210 release
@@ -0,0 +1,8 @@ | ||
1 | +include ../makefile.defs | |
2 | + | |
3 | +all: | |
4 | + mkdir -p $(OUTDIRBASE) | |
5 | + make -C body all | |
6 | + | |
7 | +clean: | |
8 | + make -C body clean |
@@ -0,0 +1,38 @@ | ||
1 | +<?xml version="1.0" encoding="utf-8" ?> | |
2 | +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
3 | + | |
4 | + <xsl:template match="/"> | |
5 | + <html> | |
6 | + <head> | |
7 | + <title>AN ETYMOLOGICAL DICTIONARY OF MODERN ENGLISH</title> | |
8 | + </head> | |
9 | + <body> | |
10 | + <xsl:apply-templates select=".//entryFree" /> | |
11 | + </body> | |
12 | + </html> | |
13 | + </xsl:template> | |
14 | + <xsl:template match="span"> | |
15 | + <xsl:choose> | |
16 | + <!-- rend = italics, smallcaps, sup, sub, underline --> | |
17 | + <xsl:when test="@style = 'font-style:italic;'"><i><xsl:apply-templates/></i></xsl:when> | |
18 | + <xsl:when test="@style = 'font-variant:small-caps;'"><xsl:apply-templates/></xsl:when> | |
19 | + <xsl:otherwise><xsl:apply-templates/></xsl:otherwise> | |
20 | + </xsl:choose> | |
21 | + </xsl:template> | |
22 | + <xsl:template match="foreign"><foreign lang="<xsl:value-of select="@lang"/>"><xsl:apply-templates/></foreign></xsl:template> | |
23 | + | |
24 | + <xsl:template match="orth"><dfn><xsl:apply-templates/></dfn></xsl:template> | |
25 | + | |
26 | + <xsl:template match="quote"><indent val="2"/><p>&mdash; <xsl:apply-templates/></p><indent val="1"/></xsl:template> | |
27 | + <xsl:template match="text"><xsl:apply-templates/></xsl:template> | |
28 | + <xsl:template match="br"><br></xsl:template> | |
29 | + <xsl:template match="bib">&nbsp;&nbsp;&nbsp;(<xsl:apply-templates/>)</xsl:template> | |
30 | + <xsl:template match="auth"><xsl:apply-templates/></xsl:template> | |
31 | + <xsl:template match="title"><I><xsl:apply-templates/></I></xsl:template> | |
32 | + <xsl:template match="no"><xsl:apply-templates/></xsl:template> | |
33 | + | |
34 | + <xsl:template match="sup"><sup><xsl:apply-templates/></sup></xsl:template> | |
35 | + | |
36 | + <xsl:template match="entryFree"><dt></dt><dd><p><xsl:apply-templates /></p></dd></xsl:template> | |
37 | + | |
38 | +</xsl:stylesheet> |
@@ -0,0 +1,51 @@ | ||
1 | +include ../../makefile.defs | |
2 | + | |
3 | +HEADSRC = ../../../WeekleyText/0/head.html | |
4 | +HEADOUT = $(OUT_DIR)/weekley-head.html | |
5 | + | |
6 | +SOURCE = ../../../WeekleyText/output/weekley-body.xml | |
7 | +XSLFILE = weekley2html.xsl | |
8 | +OUTTMP = $(OUT_DIR)/weekley-body.utf8 | |
9 | +OUTPUT = $(OUT_DIR)/weekley-body.html | |
10 | +REFTMP = $(OUT_DIR)/weekley-refs.utf8 | |
11 | +REFOUT = $(OUT_DIR)/weekley-refs.html | |
12 | + | |
13 | +all: $(HEADOUT) $(OUTPUT) $(REFOUT) | |
14 | + | |
15 | +$(HEADOUT): $(HEADSRC) | |
16 | + cat $(HEADSRC) \ | |
17 | + | $(JAVA) clsepw.weekley.AppendHeadId \ | |
18 | + | $(JAVA) clsepw.util.LatinExtConverter - check ../../ebwin/GaijiMap.xml \ | |
19 | + | sed -f $(MISC_DIR)/SP.sed \ | |
20 | + | nkf -s \ | |
21 | + > $@ | |
22 | + | |
23 | +$(OUTTMP): $(SOURCE) | |
24 | + cat $(SOURCE) \ | |
25 | + | $(JAVA) clsepw.util.XalanTransformer $(XSLFILE) \ | |
26 | + | sed -f conv.sed \ | |
27 | + | sed -f joint.sed \ | |
28 | + | sed -f joint2.sed \ | |
29 | + | perl -ple "s/<dt><\/dt><dd><p><dfn>(.+?)<\/dfn>/<dt>\1<\/dt><dd><p>/g" \ | |
30 | + > $@ | |
31 | + | |
32 | +$(REFTMP): $(OUTTMP) | |
33 | + cat $(OUTTMP) \ | |
34 | + | $(JAVA) clsepw.weekley.MakeRefFile \ | |
35 | + > $@ | |
36 | + | |
37 | +$(OUTPUT): $(OUTTMP) $(HEADOUT) $(REFTMP) | |
38 | + cat $(OUTTMP) \ | |
39 | + | $(JAVA) clsepw.weekley.AppendRefKey $(HEADOUT) $(REFTMP) \ | |
40 | + | $(JAVA) clsepw.util.LatinExtConverter - check ../../ebwin/GaijiMap.xml \ | |
41 | + | sed -f conv2.sed \ | |
42 | + | nkf -s \ | |
43 | + > $@ | |
44 | + | |
45 | +$(REFOUT): $(REFTMP) | |
46 | + $(JAVA) clsepw.util.LatinExtConverter $(REFTMP) \ | |
47 | + | nkf -s \ | |
48 | + > $@ | |
49 | + | |
50 | +clean: | |
51 | + rm -rf $(HEADOUT) $(OUTTMP) $(OUTPUT) $(REFTMP) $(REFOUT) |