• R/O
  • SSH
  • HTTPS

sotp: Commit


Commit MetaInfo

Revision110 (tree)
Time2009-08-31 17:41:33
Authormiyabe

Log Message

(empty log message)

Change Summary

Incremental Difference

--- reiki/trunk/tools/make-pdf.pl (revision 109)
+++ reiki/trunk/tools/make-pdf.pl (revision 110)
@@ -69,7 +69,6 @@
6969 }
7070 elsif ($elem->{Name} eq "r:statute") {
7171 my $file = $attrs->{'{}file'}->{Value};
72- print "$dir/content/$file\n";
7372
7473 my %params = (file => "'$file'");
7574 if ($self->{partHead}) {
@@ -78,6 +77,7 @@
7877
7978 my $session = Ajino::get_cssj_session();
8079 $file =~ /(.*)-/;
80+ print "$1\n";
8181 open(CONTENT, ">$pdfWorkDir/$1.pdf");
8282 $session->set_output(*CONTENT);
8383 $session->start_main(*STDOUT, '.', 'text/html', 'UTF-8');
@@ -135,6 +135,7 @@
135135 $params{'markerOffset'} = $1 % 20 * 10 - 22;
136136
137137 # 例規
138+ print "$dir/content/$file\n";
138139 my $results = $statuteStyle->transform_file("$dir/content/$file.xml", %params);
139140
140141 my $session = Ajino::get_cssj_session();
--- reiki/trunk/htdocs/style/pdf-common.css (revision 109)
+++ reiki/trunk/htdocs/style/pdf-common.css (nonexistent)
@@ -1,77 +0,0 @@
1-@page {
2- margin-top: 22mm;
3- margin-left: 16mm;
4- margin-right: 16mm;
5- margin-bottom: 22mm;
6- counter-increment: page;
7-}
8-@page:right {
9- margin-left: 28mm;
10-}
11-
12-@page:left {
13- margin-right: 28mm;
14-}
15-
16-/* 最終ページは常に左に来させるため。 */
17-body {
18- page-break-after: left;
19-}
20-
21-body,td {
22- font: normal 8pt/1.35 IPAPMincho;
23- text-align: justify;
24- margin: 0;
25-}
26-
27-a:link {
28- text-decoration: none;
29- color: Black;
30-}
31-span.number {
32- display: inline-block;
33- min-width: 1.2em;
34- text-align: center;
35- text-indent: 0;
36-}
37-#nombre-left, #nombre-right {
38- bottom: -10mm;
39- width: 100%;
40- font: normal 7pt/1 sans-serif;
41-}
42-
43-#nombre-left {
44- -cssj-page-content: nombre-left left;
45- text-align: left;
46- padding-left: 2em;
47-}
48-
49-#nombre-right {
50- -cssj-page-content: nombre-right right;
51- text-align: right;
52- padding-right: 2em;
53-}
54-
55-#nombre-left:after,
56-#nombre-right:after {
57- content: counter(page);
58-}
59-
60-#header-left,
61-#header-right {
62- top: -10mm;
63- width: 100%;
64- border-bottom: .5pt solid Black;
65- vertical-align: middle;
66- line-height: 2.4;
67-}
68-
69-#header-left {
70- -cssj-page-content: header-left left;
71- text-align: left;
72-}
73-
74-#header-right {
75- -cssj-page-content: header-right right;
76- text-align: right;
77-}
--- reiki/trunk/htdocs/style/pdf-toc.css (revision 109)
+++ reiki/trunk/htdocs/style/pdf-toc.css (nonexistent)
@@ -1,59 +0,0 @@
1-@import 'pdf-common.css';
2-
3-div.title h1 {
4- page-break-after: left;
5- text-align: center;
6- margin-top: 23mm;
7- font-size: 20pt;
8-}
9-
10-h1 {
11- font-size: 12pt;
12-}
13-h2 {
14- font-size: 12pt;
15- border-bottom: 1pt solid;
16- border-left: 1em solid;
17- padding-left: .5em;
18- margin-top: 2em;
19-}
20-h3 {
21- font-size: 10pt;
22- margin-left: 1em;
23-}
24-h1, h2, h3 {
25- font-weight: normal;
26-}
27-h2 b,
28-h3 b {
29- margin-right: 1em;
30-}
31-div.statute {
32- clear: both;
33- position: relative;
34- page-break-inside: avoid;
35-}
36-span.title {
37- display: inline-block;
38- max-width: 80mm;
39- padding-right: 1em;
40-}
41-span.title span {
42- background-color: White;
43- padding-left: 1em;
44-}
45-span.page {
46- position: absolute;
47- background-color: White;
48- padding-left: .5em;
49- bottom: 0;
50- right: 0;
51-}
52-div.statute div {
53- height: .6em;
54- margin-top: -.6em;
55- border-top: 1pt dotted;
56-}
57-div.page-break {
58- page-break-before: right;
59-}
\ No newline at end of file
--- reiki/trunk/htdocs/style/pdf-statute.css (revision 109)
+++ reiki/trunk/htdocs/style/pdf-statute.css (nonexistent)
@@ -1,207 +0,0 @@
1-@import 'pdf-common.css';
2-
3-img {
4- max-width: 83mm;
5- max-height: 143mm;
6-}
7-ul {
8- page-break-before: auto;
9- margin-left: 0;
10-}
11-b {
12- font-family: sans-serif;
13- font-weight: normal;
14-}
15-table {
16- border-collapse: collapse;
17-}
18-table[border='1'],
19-table[border='1'] td,
20-table[border='1'] th {
21- border: .1mm solid Black;
22-}
23-td, th {
24- page-break-inside: auto;
25- widows: 10;
26- orphans: 10;
27-}
28-
29-#marker-left,
30-#marker-right {
31- width: 10mm;
32- height: 10mm;
33- background-color: -cssj-gray(80%);
34-}
35-#marker-left {
36- -cssj-page-content: marker-left left;
37- left: -19mm;
38-}
39-
40-#marker-right {
41- -cssj-page-content: marker-right right;
42- right: -19mm;
43-}
44-span.h1 {
45- padding-left: 1em;
46-}
47-
48-span.h1:before {
49- content: -cssj-heading(1);
50-}
51-
52-span.h2 {
53- display: inline-block;
54- max-width: 60mm;
55- line-height: 1.2;
56- vertical-align: middle;
57- text-align: left;
58- padding: 0 1em;
59- position: relative;
60- padding-right: 1em;
61-}
62-
63-img.lb,
64-img.rb {
65- position: absolute;
66- top: 0;
67- width: .3em;
68- height: 95%;
69-}
70-
71-img.lb {
72- left: -.5em;
73-}
74-
75-img.rb {
76- right: -.5em;
77-}
78-
79-span.h2:before {
80- content: -cssj-heading(2);
81-}
82-
83-div.established {
84- float: right;
85- position: relative;
86-}
87-table.revisions {
88- clear: both;
89- float: right;
90- margin: 1em 2em 0 1em;
91- border-spacing: .25em;
92- border-collapse: separate;
93- border: none;
94-}
95-table.revisions td,
96-table.revisions th {
97- vertical-align: top;
98- font-size: 6pt;
99- border: none;
100-}
101-div.main ul {
102- clear: both;
103- margin: 0;
104- padding: 0;
105-}
106-div.main ul ul {
107- padding-left: 1em;
108-}
109-div.main li {
110- list-style-type: none;
111-}
112-div.main ul ul li {
113- text-indent: -1em;
114-}
115-div.main ul ul li.item {
116- padding-left: 1em;
117-}
118-div.main li.note {
119- margin-left: 3em;
120-}
121-div.main h1 {
122- white-space: nowrap;
123- margin: 5mm 0;
124-}
125-div.main h2 {
126- font-size: 12pt;
127- font-weight: normal;
128- margin: 0;
129-}
130-div.main h3,
131-div.main h4,
132-div.main h5 {
133- font-size: 8pt;
134- font-weight: normal;
135- margin: 0;
136-}
137-div.main h3 {
138- text-indent: 1em;
139-}
140-div.main h4 {
141- text-indent: 2em;
142-}
143-div.main h5 {
144- text-indent: 3em;
145-}
146-div.main h6 {
147- font-size: 8pt;
148- font-weight: normal;
149- margin: 0 0 0 1em;
150-}
151-div.main b.marker,
152-div.main a.marker {
153- margin-right: 1em;
154-}
155-div.main div.fusoku {
156- margin-left: 3em;
157- page-break-after: avoid;
158-}
159-div.main div.fusoku b {
160- letter-spacing: 1em;
161-}
162-div.main li.appended {
163- margin-top: 1em;
164-}
165-div.main li.item-revisions {
166- margin-left: 4em;
167-}
168-div.main li.text {
169- text-indent: 1em;
170-}
171-
172-div.main div.sagari2 {
173- margin-left: 1em;
174-}
175-div.main div.sagari3 {
176- margin-left: 1em;
177-}
178-div.main div.sagari4 {
179- margin-left: 2em;
180-}
181-div.main div.sagari5 {
182- margin-left: 3em;
183-}
184-div.main div.sagari6 {
185- margin-left: 4em;
186-}
187-div.main div.sagari23 {
188- margin-left: 1em;
189- text-indent: 1em;
190-}
191-div.main div.sagari31 {
192- margin-left: 1em;
193-}
194-div.main div.sagari34 {
195- margin-left: 2em;
196-}
197-table td,
198-table th {
199- font-size: 6pt;
200-}
201-
202-li.appended {
203- page-break-before: always;
204-}
205-div.blank {
206- page-break-after: always;
207-}
--- reiki/trunk/htdocs/style/browse-toc.xsl (revision 109)
+++ reiki/trunk/htdocs/style/browse-toc.xsl (revision 110)
@@ -55,8 +55,9 @@
5555 <div class="sidebar">
5656 <xsl:call-template name="navigator" />
5757 <div class="buttons">
58- <a href="../data/toc.xml">XML</a>
59- <a href="../data/pdf/!010toc.pdf">PDF</a>
58+ <a href="../data/toc.xml" target="_blank">XML</a>
59+ <a href="../data/pdf/!010toc.pdf" target="_blank">PDF</a>
60+ <a href="../publish/">例規集図書</a>
6061 </div>
6162 <hr/>
6263 <h3>体系</h3>
@@ -107,8 +108,7 @@
107108 <thead>
108109 <tr>
109110 <th>件名</th>
110- <th>制定年月日</th>
111- <th>種別・番号</th>
111+ <th>制定年月日/種別番号</th>
112112 </tr>
113113 </thead>
114114 <tbody><xsl:apply-templates select="r:statute" mode="main"/></tbody></table>
@@ -117,8 +117,7 @@
117117 <xsl:template match="r:statute" mode="main">
118118 <tr id="{@file}">
119119 <td class="title"><a href="{@file}.html"><xsl:value-of select="r:title/text()" /></a></td>
120- <td class="revision"><xsl:value-of select="r:revision/@date" /></td>
121- <td class="revision"><xsl:value-of select="r:revision/text()" /></td>
120+ <td class="revision"><xsl:value-of select="r:revision/@date" /><br/><xsl:value-of select="r:revision/text()" /></td>
122121 </tr>
123122 </xsl:template>
124123 <xsl:template match="node()" priority="-1" mode="main" />
--- reiki/trunk/htdocs/style/pdf-toc.xsl (revision 109)
+++ reiki/trunk/htdocs/style/pdf-toc.xsl (revision 110)
@@ -10,7 +10,7 @@
1010 <html>
1111 <head>
1212 <style type="text/css">
13- @import 'style/pdf-toc.css';
13+ @import 'style/pdf/pdf-toc.css';
1414 </style>
1515 </head>
1616 <body>
@@ -21,7 +21,7 @@
2121 <div id="nombre-right"></div>
2222 <div id="header-left"><xsl:value-of select="$title" /> 体系目次</div>
2323 <div id="header-right"><xsl:value-of select="$title" /> 体系目次</div>
24- <h1>体系目次</h1>
24+ <h1 class="page-reset">体系目次</h1>
2525 <xsl:apply-templates select="r:part|r:chapter|r:section|r:subsection|r:division" mode="main"/>
2626
2727 <div class="page-break"></div>
--- reiki/trunk/htdocs/style/pdf-statute.xsl (revision 109)
+++ reiki/trunk/htdocs/style/pdf-statute.xsl (revision 110)
@@ -13,13 +13,13 @@
1313 <html>
1414 <head>
1515 <style type="text/css">
16- @import 'style/pdf-statute.css';
16+ @import 'style/pdf/pdf-statute.css';
1717 #marker-left,
1818 #marker-right {
1919 top: <xsl:value-of select="$markerOffset"/>mm;
2020 }
21- <xsl:if test="$chapterHead">
22- h1 {
21+ <xsl:if test="not($chapterHead)">
22+ div.main h1 {
2323 visibility: hidden;
2424 margin: 0;
2525 height: 0;
@@ -30,11 +30,9 @@
3030 </head>
3131 <body>
3232 <div class="main">
33-
3433 <xsl:variable name="page">
3534 <xsl:value-of select="number(substring-before($file,'-'))"/>-<xsl:value-of select="number(substring-after($file,'-'))"/>
3635 </xsl:variable>
37-
3836 <div id="nombre-left"><xsl:value-of select="$page"/>-</div>
3937 <div id="nombre-right"><xsl:value-of select="$page"/>-</div>
4038 <div id="header-left"><span class="h1"></span><span class="h2"><img src="style/pdf/lb.svgz" class="lb"/><img src="style/pdf/rb.svgz" class="rb"/></span></div>
--- reiki/trunk/htdocs/style/browse-aiueo.xsl (revision 109)
+++ reiki/trunk/htdocs/style/browse-aiueo.xsl (revision 110)
@@ -377,8 +377,7 @@
377377 <table>
378378 <thead>
379379 <th>件名</th>
380- <th>制定年月日</th>
381- <th>種別・番号</th>
380+ <th>制定年月日/種別番号</th>
382381 </thead>
383382 <tbody>
384383 <xsl:apply-templates select="descendant::r:statute[substring(r:title/r:kana/html:u/text(),1,1)=$prefix]" mode="main">
@@ -396,8 +395,7 @@
396395 <div class="kana"><xsl:apply-templates select="r:title/r:kana/node()" mode="html"/></div>
397396 <a href="{@file}.html"><xsl:apply-templates select="r:title/node()" mode="html"/></a>
398397 </td>
399- <td class="revision"><xsl:value-of select="r:revision/@date" /></td>
400- <td class="revision"><xsl:value-of select="r:revision/text()" /></td>
398+ <td class="revision"><xsl:value-of select="r:revision/@date" /><br /><xsl:value-of select="r:revision/text()" /></td>
401399 </tr>
402400 </xsl:template>
403401 <xsl:template match="node()" priority="-1" mode="main" />
--- reiki/trunk/htdocs/style/pdf/pdf-toc.css (nonexistent)
+++ reiki/trunk/htdocs/style/pdf/pdf-toc.css (revision 110)
@@ -0,0 +1,62 @@
1+@import 'pdf-common.css';
2+
3+div.title h1 {
4+ page-break-after: right;
5+ text-align: center;
6+ margin-top: 23mm;
7+ font-size: 20pt;
8+}
9+
10+h1 {
11+ font-size: 12pt;
12+}
13+h2 {
14+ font-size: 12pt;
15+ border-bottom: 1pt solid;
16+ border-left: 1em solid;
17+ padding-left: .5em;
18+ margin-top: 2em;
19+}
20+h3 {
21+ font-size: 10pt;
22+ margin-left: 1em;
23+}
24+h1, h2, h3 {
25+ font-weight: normal;
26+}
27+h2 b,
28+h3 b {
29+ margin-right: 1em;
30+}
31+div.statute {
32+ clear: both;
33+ position: relative;
34+ page-break-inside: avoid;
35+}
36+span.title {
37+ display: inline-block;
38+ max-width: 80mm;
39+ padding-right: 1em;
40+}
41+span.title span {
42+ background-color: White;
43+ padding-left: 1em;
44+}
45+span.page {
46+ position: absolute;
47+ background-color: White;
48+ padding-left: .5em;
49+ bottom: 0;
50+ right: 0;
51+}
52+div.statute div {
53+ height: .6em;
54+ margin-top: -.6em;
55+ border-top: 1pt dotted;
56+}
57+.page-reset {
58+ counter-reset: page 1;
59+}
60+.page-break {
61+ page-break-before: right;
62+}
\ No newline at end of file
--- reiki/trunk/htdocs/style/pdf/pdf-common.css (nonexistent)
+++ reiki/trunk/htdocs/style/pdf/pdf-common.css (revision 110)
@@ -0,0 +1,77 @@
1+@page {
2+ margin-top: 22mm;
3+ margin-left: 16mm;
4+ margin-right: 16mm;
5+ margin-bottom: 22mm;
6+ counter-increment: page;
7+}
8+@page:right {
9+ margin-left: 28mm;
10+}
11+
12+@page:left {
13+ margin-right: 28mm;
14+}
15+
16+/* 最終ページは常に左に来させるため。 */
17+body {
18+ page-break-after: left;
19+}
20+
21+body,td {
22+ font: normal 8pt/1.35 IPAPMincho;
23+ text-align: justify;
24+ margin: 0;
25+}
26+
27+a:link {
28+ text-decoration: none;
29+ color: Black;
30+}
31+span.number {
32+ display: inline-block;
33+ min-width: 1.2em;
34+ text-align: center;
35+ text-indent: 0;
36+}
37+#nombre-left, #nombre-right {
38+ bottom: -10mm;
39+ width: 100%;
40+ font: normal 7pt/1 sans-serif;
41+}
42+
43+#nombre-left {
44+ -cssj-page-content: nombre-left left;
45+ text-align: left;
46+ padding-left: 2em;
47+}
48+
49+#nombre-right {
50+ -cssj-page-content: nombre-right right;
51+ text-align: right;
52+ padding-right: 2em;
53+}
54+
55+#nombre-left:after,
56+#nombre-right:after {
57+ content: counter(page);
58+}
59+
60+#header-left,
61+#header-right {
62+ top: -10mm;
63+ width: 100%;
64+ border-bottom: .5pt solid Black;
65+ vertical-align: middle;
66+ line-height: 2.4;
67+}
68+
69+#header-left {
70+ -cssj-page-content: header-left left;
71+ text-align: left;
72+}
73+
74+#header-right {
75+ -cssj-page-content: header-right right;
76+ text-align: right;
77+}
--- reiki/trunk/htdocs/style/pdf/pdf-statute.css (nonexistent)
+++ reiki/trunk/htdocs/style/pdf/pdf-statute.css (revision 110)
@@ -0,0 +1,207 @@
1+@import 'pdf-common.css';
2+
3+img {
4+ max-width: 83mm;
5+ max-height: 143mm;
6+}
7+ul {
8+ page-break-before: auto;
9+ margin-left: 0;
10+}
11+b {
12+ font-family: sans-serif;
13+ font-weight: normal;
14+}
15+table {
16+ border-collapse: collapse;
17+}
18+table[border='1'],
19+table[border='1'] td,
20+table[border='1'] th {
21+ border: .1mm solid Black;
22+}
23+td, th {
24+ page-break-inside: auto;
25+ widows: 10;
26+ orphans: 10;
27+}
28+
29+#marker-left,
30+#marker-right {
31+ width: 10mm;
32+ height: 10mm;
33+ background-color: -cssj-gray(80%);
34+}
35+#marker-left {
36+ -cssj-page-content: marker-left left;
37+ left: -19mm;
38+}
39+
40+#marker-right {
41+ -cssj-page-content: marker-right right;
42+ right: -19mm;
43+}
44+span.h1 {
45+ padding-left: 1em;
46+}
47+
48+span.h1:before {
49+ content: -cssj-heading(1);
50+}
51+
52+span.h2 {
53+ display: inline-block;
54+ max-width: 60mm;
55+ line-height: 1.2;
56+ vertical-align: middle;
57+ text-align: left;
58+ padding: 0 1em;
59+ position: relative;
60+ padding-right: 1em;
61+}
62+
63+img.lb,
64+img.rb {
65+ position: absolute;
66+ top: 0;
67+ width: .3em;
68+ height: 95%;
69+}
70+
71+img.lb {
72+ left: -.5em;
73+}
74+
75+img.rb {
76+ right: -.5em;
77+}
78+
79+span.h2:before {
80+ content: -cssj-heading(2);
81+}
82+
83+div.established {
84+ float: right;
85+ position: relative;
86+}
87+table.revisions {
88+ clear: both;
89+ float: right;
90+ margin: 1em 2em 0 1em;
91+ border-spacing: .25em;
92+ border-collapse: separate;
93+ border: none;
94+}
95+table.revisions td,
96+table.revisions th {
97+ vertical-align: top;
98+ font-size: 6pt;
99+ border: none;
100+}
101+div.main ul {
102+ clear: both;
103+ margin: 0;
104+ padding: 0;
105+}
106+div.main ul ul {
107+ padding-left: 1em;
108+}
109+div.main li {
110+ list-style-type: none;
111+}
112+div.main ul ul li {
113+ text-indent: -1em;
114+}
115+div.main ul ul li.item {
116+ padding-left: 1em;
117+}
118+div.main li.note {
119+ margin-left: 3em;
120+}
121+div.main h1 {
122+ white-space: nowrap;
123+ margin: 5mm 0;
124+}
125+div.main h2 {
126+ font-size: 12pt;
127+ font-weight: normal;
128+ margin: 0;
129+}
130+div.main h3,
131+div.main h4,
132+div.main h5 {
133+ font-size: 8pt;
134+ font-weight: normal;
135+ margin: 0;
136+}
137+div.main h3 {
138+ text-indent: 1em;
139+}
140+div.main h4 {
141+ text-indent: 2em;
142+}
143+div.main h5 {
144+ text-indent: 3em;
145+}
146+div.main h6 {
147+ font-size: 8pt;
148+ font-weight: normal;
149+ margin: 0 0 0 1em;
150+}
151+div.main b.marker,
152+div.main a.marker {
153+ margin-right: 1em;
154+}
155+div.main div.fusoku {
156+ margin-left: 3em;
157+ page-break-after: avoid;
158+}
159+div.main div.fusoku b {
160+ letter-spacing: 1em;
161+}
162+div.main li.appended {
163+ margin-top: 1em;
164+}
165+div.main li.item-revisions {
166+ margin-left: 4em;
167+}
168+div.main li.text {
169+ text-indent: 1em;
170+}
171+
172+div.main div.sagari2 {
173+ margin-left: 1em;
174+}
175+div.main div.sagari3 {
176+ margin-left: 1em;
177+}
178+div.main div.sagari4 {
179+ margin-left: 2em;
180+}
181+div.main div.sagari5 {
182+ margin-left: 3em;
183+}
184+div.main div.sagari6 {
185+ margin-left: 4em;
186+}
187+div.main div.sagari23 {
188+ margin-left: 1em;
189+ text-indent: 1em;
190+}
191+div.main div.sagari31 {
192+ margin-left: 1em;
193+}
194+div.main div.sagari34 {
195+ margin-left: 2em;
196+}
197+table td,
198+table th {
199+ font-size: 6pt;
200+}
201+
202+li.appended {
203+ page-break-before: always;
204+}
205+div.blank {
206+ page-break-after: always;
207+}
--- reiki/trunk/htdocs/style/browse-publish.xsl (nonexistent)
+++ reiki/trunk/htdocs/style/browse-publish.xsl (revision 110)
@@ -0,0 +1,139 @@
1+<?xml version="1.0" encoding="UTF-8"?>
2+<xsl:stylesheet version="1.0"
3+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4+ xmlns:r="http://www.cssj.jp/ns/reiki">
5+ <xsl:import href="common-statute.xsl" />
6+ <xsl:variable name="title" select="/r:toc/r:title"/>
7+ <xsl:variable name="date" select="/r:toc/r:date"/>
8+
9+ <xsl:template match="/r:toc">
10+ <html>
11+ <head>
12+ <style type="text/css">
13+ @import '../style/browse-toc.css';
14+ </style>
15+ <xsl:call-template name="head" />
16+ </head>
17+ <body>
18+ <div class="wrapper"><form action="publish/reiki.pdf" method="post">
19+ <div class="marginate">
20+ <xsl:value-of select="$date"/>
21+ <xsl:value-of select="$title"/>
22+ </div>
23+ <xsl:call-template name="sidebar" />
24+
25+ <div class="main">
26+ <div>掲載例規 <xsl:value-of select="count(descendant::r:statute)" />件 /
27+例規集図書 <xsl:value-of select="sum(descendant::r:statute/r:number-of-pages/text())" />頁
28+ </div>
29+ <div>
30+ <label><input type="checkbox" name="dummy" value="1"/>全て</label><br/>
31+ <label><input type="checkbox" name="item" value="!010toc"/>目次</label><br/>
32+ </div>
33+ <xsl:apply-templates select="r:part|r:chapter|r:section|r:subsection|r:division" mode="main"/>
34+ </div>
35+ </form></div>
36+ <hr/>
37+ <div class="footer">
38+ <xsl:value-of select="$date"/>
39+ <xsl:value-of select="$title"/>
40+ </div>
41+ </body>
42+ </html>
43+ </xsl:template>
44+
45+ <xsl:template name="navigator">
46+ <h1><xsl:value-of select="$title"/></h1>
47+ <div class="date">
48+ <xsl:value-of select="$date"/>現在
49+ </div>
50+ <hr/>
51+ <div class="navigator">
52+ <a href="../reiki/index.html">体系目次</a><br />
53+ <hr/>
54+ </div>
55+ </xsl:template>
56+
57+ <xsl:template name="sidebar">
58+ <div class="sidebar">
59+ <xsl:call-template name="navigator" />
60+ <p>右側の一覧から印刷したい部分をチェックして、ダウンロードボタンを押してください。</p>
61+ <label>面付け:
62+ <select name="imp">
63+ <option value="1">なし</option>
64+ <option value="2">中とじ8ページ掛け</option>
65+ </select>
66+ </label>
67+ <button type="submit">ダウンロード</button>
68+ <hr/>
69+ <h3>体系</h3>
70+ <div class="outline">
71+ <ul>
72+<xsl:apply-templates select="r:part|r:chapter|r:section|r:subsection|r:division" mode="sidebar"/>
73+ </ul>
74+ </div>
75+ <hr/>
76+ </div>
77+ </xsl:template>
78+
79+ <xsl:template match="r:part|r:chapter|r:section|r:subsection|r:division" mode="sidebar">
80+ <li><a href="#{generate-id()}">
81+ <b><xsl:value-of select="r:marker/text()" /></b>
82+ <xsl:value-of select="r:text/text()" /></a>
83+<ul>
84+<xsl:apply-templates select="r:part|r:chapter|r:section|r:subsection|r:division" mode="sidebar"/>
85+</ul>
86+ </li>
87+ </xsl:template>
88+ <xsl:template match="node()" priority="-1" mode="sidebar" />
89+
90+ <!-- 体系見出し -->
91+ <xsl:template match="r:part" mode="main">
92+ <div id="{generate-id()}">
93+ <div class="volume">
94+ <xsl:value-of select="count(descendant::r:statute)" />件 /
95+ <xsl:value-of select="sum(descendant::r:statute/r:number-of-pages/text())" />頁
96+ </div>
97+ <h2><input type="checkbox" name="item" value="{@file}"/>
98+ <b><xsl:value-of select="r:marker/text()" /></b>
99+ <xsl:value-of select="r:text/text()" /></h2>
100+<xsl:call-template name="statutes" />
101+<xsl:apply-templates select="r:part|r:chapter|r:section|r:subsection|r:division" mode="main"/>
102+ </div>
103+ </xsl:template>
104+ <xsl:template match="r:chapter|r:section|r:subsection|r:division" mode="main">
105+ <div id="{generate-id()}">
106+ <h3><input type="checkbox" name="item" value="{@file}"/>
107+ <b><xsl:value-of select="r:marker/text()" /></b>
108+ <xsl:value-of select="r:text/text()" /></h3>
109+<xsl:call-template name="statutes" />
110+<xsl:apply-templates select="r:part|r:chapter|r:section|r:subsection|r:division" mode="main"/>
111+ </div>
112+ </xsl:template>
113+ <!-- 例規 -->
114+ <xsl:template name="statutes">
115+<xsl:if test="r:statute">
116+<table>
117+<thead>
118+ <th></th>
119+ <th>件名</th>
120+ <th>制定年月日/種別番号</th>
121+ <th>図書掲載頁</th>
122+</thead>
123+<tbody><xsl:apply-templates select="r:statute" mode="main"/></tbody></table>
124+</xsl:if>
125+ </xsl:template>
126+ <xsl:template match="r:statute" mode="main">
127+ <tr id="{@file}">
128+ <td><input type="checkbox" name="item" value="{@file}"/></td>
129+ <td class="title"><a href="../data/pdf/{@file}.pdf" target="_blank"><xsl:value-of select="r:title/text()" /></a></td>
130+ <td class="revision"><xsl:value-of select="r:revision/@date" /><br/><xsl:value-of select="r:revision/text()" /></td>
131+ <td class="revision">
132+ <xsl:value-of select="number(substring-before(@file,'-'))"/>-<xsl:value-of select="number(substring-after(@file,'-'))"/>-1
133+ ~
134+ <xsl:value-of select="r:number-of-pages/text()" /></td>
135+ </tr>
136+ </xsl:template>
137+ <xsl:template match="node()" priority="-1" mode="main" />
138+
139+</xsl:stylesheet>
--- reiki/trunk/htdocs/style/browse-toc.css (revision 109)
+++ reiki/trunk/htdocs/style/browse-toc.css (revision 110)
@@ -45,10 +45,13 @@
4545 border: 1px solid Black;
4646 font-size: 10.5pt;
4747 }
48+div.main table th {
49+ white-space: nowrap;
50+}
4851 div.main table td.title {
49- width: 50%;
52+ width: 90%;
5053 }
5154 div.main table td.revision {
52- width: 17%;
55+ width: 10%;
5356 white-space: nowrap;
5457 }
\ No newline at end of file
--- reiki/trunk/htdocs/lib/Ajino.pm (revision 109)
+++ reiki/trunk/htdocs/lib/Ajino.pm (revision 110)
@@ -32,39 +32,38 @@
3232 $session->set_property( 'output.page-height', '210mm' );
3333 $session->set_property( 'output.clip', 'false' );
3434
35- my $dir = dirname(__FILE__).'/../';
36- $session->start_resource( *STDOUT, "style/pdf-common.css", 'text/css');
37- binmode(STDOUT);
38- open( IN_RSRC, "$dir/style/pdf-common.css");
39- while (<IN_RSRC>) { print; }
40- close(IN_RSRC);
41- $session->end_resource(*STDOUT);
42- $session->start_resource( *STDOUT, "style/pdf-statute.css", 'text/css');
43- binmode(STDOUT);
44- open( IN_RSRC, "$dir/style/pdf-statute.css");
45- while (<IN_RSRC>) { print; }
46- close(IN_RSRC);
47- $session->end_resource(*STDOUT);
48- $session->start_resource( *STDOUT, "style/pdf-toc.css", 'text/css');
49- binmode(STDOUT);
50- open( IN_RSRC, "$dir/style/pdf-toc.css");
51- while (<IN_RSRC>) { print; }
52- close(IN_RSRC);
53- $session->end_resource(*STDOUT);
35+ my $dir = dirname(__FILE__).'/../';
5436
55- my $imgbase = "$dir/style/pdf";
56- opendir DH, $imgbase;
57- while ( my $imgfile = readdir DH ) {
58- next if substr($imgfile, 0, 1) eq '.';
59- $session->start_resource( *STDOUT, "style/pdf/$imgfile" );
60- binmode(STDOUT);
61- open( IN_IMG, "$imgbase/$imgfile" );
62- while (<IN_IMG>) { print; }
63- close(IN_IMG);
64- $session->end_resource(*STDOUT);
37+ {
38+ my $rsrcDir = "$dir/style/pdf";
39+ opendir DH, $rsrcDir;
40+ while ( my $file = readdir DH ) {
41+ next if substr($file, 0, 1) eq '.';
42+ $session->start_resource( *STDOUT, "style/pdf/$file" );
43+ binmode(STDOUT);
44+ open( IN_IMG, "$rsrcDir/$file" );
45+ while (<IN_IMG>) { print; }
46+ close(IN_IMG);
47+ $session->end_resource(*STDOUT);
48+ }
49+ closedir DH;
6550 }
66- closedir DH;
6751
52+ {
53+ my $rsrcDir = "$dir/data/object";
54+ opendir DH, $rsrcDir;
55+ while ( my $file = readdir DH ) {
56+ next if substr($file, 0, 1) eq '.';
57+ $session->start_resource( *STDOUT, "../data/object/$file" );
58+ binmode(STDOUT);
59+ open( IN_IMG, "$rsrcDir/$file" );
60+ while (<IN_IMG>) { print; }
61+ close(IN_IMG);
62+ $session->end_resource(*STDOUT);
63+ }
64+ closedir DH;
65+ }
66+
6867 return $session;
6968 }
7069
--- reiki/trunk/htdocs/lib/ReikiBase/StatuteParser.pm (revision 109)
+++ reiki/trunk/htdocs/lib/ReikiBase/StatuteParser.pm (revision 110)
@@ -117,11 +117,13 @@
117117 $text = trim($text);
118118 if ($text) {
119119 # 体系名
120- $text =~ /^([^ ]+)( )(.+)/;
121- print $outfp "<r:marker>$1<\/r:marker>\n";
122- $text = $3;
120+ my $marker = '';
121+ if ($text =~ /^([^ ]+)( )(.+)/) {;
122+ $marker = "<r:marker>$1<\/r:marker>\n";
123+ $text = $3;
124+ }
123125 $text =~ s/ //g;
124- $text = "<r:text>$text</r:text>";
126+ $text = "$marker<r:text>$text</r:text>";
125127 if ( $depth == 1 ) {
126128 print $outfp "<r:part>$text</r:part>\n";
127129 }
Show on old repository browser