|
54
|
1 <?xml version='1.0'?>
|
|
|
2 <!DOCTYPE p:pipeline SYSTEM "../../../../WWW/XML/XProc/docs/schemas/xproc.dtd" >
|
|
87
|
3 <p:pipeline xmlns:p="http://www.w3.org/ns/xproc" xmlns:x="http://www.w3.org/1999/xhtml" version="1.0">
|
|
75
|
4
|
|
76
|
5 <p:documentation xmlns="http://www.w3.org/1999/xhtml">
|
|
75
|
6 <div>Run this e.g. as follows:
|
|
|
7 xprocs --input source=../english/FP_ii.html merge.xpl lfs=../latin/sth1002.html\;../latin/sth1003.html\;../latin/sth1015.html rawpart=FP.ii</div>
|
|
|
8 </p:documentation>
|
|
76
|
9
|
|
66
|
10 <p:option name="lfs" required="true">
|
|
76
|
11 <p:documentation xmlns="http://www.w3.org/1999/xhtml">
|
|
75
|
12 <div>list of latin files, use ; as separator</div>
|
|
66
|
13 </p:documentation>
|
|
|
14 </p:option>
|
|
76
|
15
|
|
72
|
16 <p:variable name="rawpart" select="/x:div/@id"/>
|
|
76
|
17
|
|
72
|
18 <p:delete match="x:a[@href and not(text())]"/>
|
|
68
|
19 <p:viewport match="x:div[@class='div3']" name="vp">
|
|
54
|
20 <p:xslt>
|
|
|
21 <p:input port="stylesheet">
|
|
|
22 <p:document href="fixup_e.xsl"/>
|
|
|
23 </p:input>
|
|
75
|
24 </p:xslt>
|
|
|
25 <p:viewport match="x:div[@class='div4' and not(@id)]">
|
|
76
|
26 <p:documentation xmlns="http://www.w3.org/1999/xhtml">
|
|
75
|
27 <div>Treat tail of prooemium as index</div>
|
|
|
28 </p:documentation>
|
|
|
29 <p:xslt>
|
|
|
30 <p:input port="stylesheet">
|
|
76
|
31 <p:inline xmlns="http://www.w3.org/1999/xhtml">
|
|
75
|
32 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:x="http://www.w3.org/1999/xhtml" exclude-result-prefixes="x xsl">
|
|
|
33 <xsl:variable name="prefix" select="concat('#',substring-before(/x:div/x:p[1]/@id,'-'),'_A')"/>
|
|
|
34 <xsl:template match="x:p[starts-with(.,' (')]">
|
|
|
35 <xsl:copy>
|
|
|
36 <xsl:apply-templates select="@*"/>
|
|
|
37 <a href="{concat($prefix,substring-after(substring-before(.,')'),'('))}">
|
|
|
38 <xsl:apply-templates select="node()"/>
|
|
|
39 </a>
|
|
|
40 </xsl:copy>
|
|
|
41 </xsl:template>
|
|
|
42
|
|
|
43 <xsl:template match="@*|node()">
|
|
|
44 <xsl:copy>
|
|
|
45 <xsl:apply-templates select="@*|node()"/>
|
|
|
46 </xsl:copy>
|
|
|
47 </xsl:template>
|
|
|
48 </xsl:stylesheet>
|
|
|
49 </p:inline>
|
|
|
50 </p:input>
|
|
|
51 </p:xslt>
|
|
|
52 </p:viewport>
|
|
54
|
53 <p:xslt>
|
|
|
54 <p:input port="stylesheet">
|
|
|
55 <p:document href="merge.xsl"/>
|
|
|
56 </p:input>
|
|
66
|
57 <p:with-param name="lfs" select="$lfs"/>
|
|
54
|
58 </p:xslt>
|
|
68
|
59 <p:xslt>
|
|
|
60 <p:input port="stylesheet">
|
|
|
61 <p:document href="bi.xsl"/>
|
|
|
62 </p:input>
|
|
72
|
63 <p:with-param name="rawpart" select="$rawpart"/>
|
|
68
|
64 </p:xslt>
|
|
54
|
65 </p:viewport>
|
|
75
|
66 <p:insert match="x:body" position="first-child" name="wrap">
|
|
68
|
67 <p:input port="source">
|
|
76
|
68 <p:inline xmlns="http://www.w3.org/1999/xhtml">
|
|
75
|
69 <html>
|
|
68
|
70 <head>
|
|
|
71 <title>Bilingual Aquinas</title>
|
|
|
72 <style>
|
|
|
73 h2, h3, h4 {margin-bottom: 0px; clear: both}
|
|
|
74 .bilingual {clear: both; margin-top: .5em}
|
|
|
75 div.eng {width: 45%; float: left}
|
|
|
76 div.lat {width: 45%; float: right}
|
|
77
|
77 @page { size: A4 portrait; margin: 1cm;
|
|
|
78 orphans: 2; widows: 2;
|
|
|
79 }
|
|
|
80 @media print {div.div3 {page-break-before: always}}
|
|
68
|
81 </style>
|
|
|
82 </head>
|
|
|
83 <body style="font-family: Bitstream Vera Serif">
|
|
|
84 </body>
|
|
|
85 </html></p:inline>
|
|
|
86 </p:input>
|
|
|
87 <p:input port="insertion">
|
|
|
88 <p:pipe port="result" step="vp"/>
|
|
|
89 </p:input>
|
|
|
90 </p:insert>
|
|
75
|
91 <p:wrap-sequence wrapper="x:div">
|
|
|
92 <p:input port="source" select="/*/*/x:h3">
|
|
|
93 <p:pipe port="result" step="vp"/>
|
|
|
94 </p:input>
|
|
|
95 </p:wrap-sequence>
|
|
|
96 <p:xslt name="toc">
|
|
|
97 <p:input port="stylesheet">
|
|
76
|
98 <p:inline xmlns="http://www.w3.org/1999/xhtml">
|
|
75
|
99 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:x="http://www.w3.org/1999/xhtml" exclude-result-prefixes="x xsl">
|
|
|
100 <xsl:template match="/x:div">
|
|
|
101 <div class="toc">
|
|
|
102 <xsl:for-each select="x:h3">
|
|
|
103 <a href="#{substring-before(@id,'-')}">
|
|
|
104 <xsl:apply-templates/>
|
|
|
105 </a><br/>
|
|
|
106 </xsl:for-each>
|
|
|
107 </div>
|
|
|
108 </xsl:template>
|
|
|
109 </xsl:stylesheet>
|
|
|
110 </p:inline>
|
|
|
111 </p:input>
|
|
|
112 </p:xslt>
|
|
|
113 <p:insert match="x:h2" position="after">
|
|
|
114 <p:input port="source">
|
|
|
115 <p:pipe step="wrap" port="result"/>
|
|
|
116 </p:input>
|
|
|
117 <p:input port="insertion">
|
|
|
118 <p:pipe step="toc" port="result"/>
|
|
|
119 </p:input>
|
|
|
120 </p:insert>
|
|
54
|
121 </p:pipeline>
|