/[suikacvs]/www/2005/urimap/urimap-html.ja.xsl
Suika

Contents of /www/2005/urimap/urimap-html.ja.xsl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download) (as text)
Sat Jan 14 10:36:15 2012 UTC (12 years, 10 months ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
File MIME type: application/xml
Error occurred while calculating annotation data.
Current

1 <!DOCTYPE t:stylesheet [
2 <!ENTITY prop "http://suika.fam.cx/admin/assign/urn-20050519#DT-">
3 ]>
4 <t:stylesheet version="1.0"
5 xmlns:t="http://www.w3.org/1999/XSL/Transform"
6 xmlns="http://www.w3.org/1999/xhtml"
7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8 xmlns:prop="http://suika.fam.cx/admin/assign/urn-20050519#DT-"
9 xmlns:map="http://suika.fam.cx/~wakaba/2005/6/uri-table#"
10 xmlns:replace="http://suika.fam.cx/~wakaba/archive/2005/6/replace#">
11
12 <t:template match="/">
13 <t:processing-instruction name="xml-stylesheet">
14 href="<t:call-template name="document-style-sheet-uri"/>" media="all"
15 </t:processing-instruction>
16 <t:variable name="style2"><t:call-template
17 name="document-style-sheet-add-uri"/></t:variable>
18 <t:if test="string-length($style2)">
19 <t:processing-instruction name="xml-stylesheet">
20 href="<t:value-of select="$style2"/>" media="all"
21 </t:processing-instruction>
22 </t:if>
23 <html xml:lang="ja" lang="ja">
24 <t:attribute name="class">
25 <t:call-template name="document-class"/>
26 </t:attribute>
27 <head>
28 <title><t:call-template name="document-title"/></title>
29 <link rel="stylesheet" media="all">
30 <t:attribute name="href">
31 <t:call-template name="document-style-sheet-uri"/>
32 </t:attribute>
33 </link>
34 <t:if test="string-length($style2)">
35 <link rel="stylesheet" media="all">
36 <t:attribute name="href">
37 <t:value-of select="$style2"/>
38 </t:attribute>
39 </link>
40 </t:if>
41 </head>
42 <body>
43 <t:call-template name="document-header"/>
44 <t:apply-templates select="child::rdf:RDF"/>
45 <t:call-template name="document-footer"/>
46 </body>
47 </html>
48 </t:template>
49
50 <t:template name="document-title">
51 URI $B<LA|I=(B
52 </t:template>
53
54 <t:template name="document-class"/>
55
56 <t:template name="document-style-sheet-uri">/www/style/html/xhtml</t:template>
57
58 <t:template name="document-style-sheet-add-uri"/>
59
60 <t:template name="document-header">
61 <h1><t:call-template name="uri"/> $B<LA|I=(B</h1>
62 </t:template>
63
64 <t:template name="document-footer">
65 <div class="footer">
66 <div class="navigation">[<a href="/" rel="home">/</a>
67 <t:value-of select="' '"/>
68 <a href="/search/" rel="search">$B8!:w(B</a>]</div>
69 </div>
70 </t:template>
71
72 <t:template match="child::rdf:RDF">
73 <t:apply-templates select="child::*"/>
74 </t:template>
75
76 <t:template match="child::map:Resource">
77 <div class="section">
78 <h2>
79 <t:call-template name="uri"/>
80 <t:value-of select="' '"/>
81 <t:call-template name="uriref">
82 <t:with-param name="uri" select="attribute::rdf:about"/>
83 </t:call-template>
84 </h2>
85 <t:call-template name="entry-props">
86 <t:with-param name="entry" select="self::node()"/>
87 <t:with-param name="entry-type" select="'Resource'"/>
88 </t:call-template>
89 </div>
90 </t:template>
91
92 <t:template match="child::map:ResourceGroup">
93 <div class="section">
94 <h2>
95 <t:call-template name="text-uri-group"/>
96 <t:call-template name="uriref">
97 <t:with-param name="uri" select="attribute::rdf:about"/>
98 </t:call-template>
99 </h2>
100 <t:call-template name="entry-props">
101 <t:with-param name="entry" select="self::node()"/>
102 <t:with-param name="entry-type" select="'ResourceGroup'"/>
103 </t:call-template>
104 </div>
105 </t:template>
106
107 <t:template match="/child::rdf:RDF/child::*" priority="-100">
108 <div class="section">
109 <h2>
110 <t:call-template name="uriref">
111 <t:with-param name="uri"
112 select="concat(namespace-uri(), local-name())"/>
113 </t:call-template>
114 </h2>
115 </div>
116 <t:call-template name="entry-props">
117 <t:with-param name="entry" select="self::node()"/>
118 <t:with-param name="entry-type" select="'Other'"/>
119 </t:call-template>
120 </t:template>
121
122 <t:template name="entry-props">
123 <t:param name="entry"/>
124 <t:param name="entry-type"/>
125 <dl>
126 <t:call-template name="entry-map-props">
127 <t:with-param name="entry" select="self::node()"/>
128 <t:with-param name="entry-type" select="string($entry-type)"/>
129 </t:call-template>
130 <t:apply-templates
131 select="$entry/child::*[not(self::prop:*) and not (self::map:*)]"/>
132 </dl>
133 </t:template>
134
135 <t:template name="entry-map-props">
136 <t:param name="entry"/>
137 <t:param name="entry-type"/>
138 <dt>$B85$N(B <t:call-template name="uri"/></dt>
139 <dd>
140 <t:call-template name="uriref">
141 <t:with-param name="uri" select="$entry/attribute::rdf:about"/>
142 </t:call-template>
143 <t:if test="$entry-type = 'ResourceGroup'">
144 $B$G;O$^$k$b$N(B
145 </t:if>
146 </dd>
147 <t:apply-templates select="$entry/child::prop:* |
148 $entry/child::map:*"/>
149 </t:template>
150
151 <t:template match="child::prop:PRIMARY-RESOLVED-URI">
152 <dt>$B0l<!2r7h(B <t:call-template name="uri"/></dt>
153 <dd><t:call-template name="uritemplate">
154 <t:with-param name="template" select="self::node()"/>
155 </t:call-template></dd>
156 </t:template>
157
158 <t:template match="child::prop:SECONDARY-RESOLVED-URI">
159 <dt>$BFs<!2r7h(B <t:call-template name="uri"/></dt>
160 <dd><t:call-template name="uritemplate">
161 <t:with-param name="template" select="self::node()"/>
162 </t:call-template></dd>
163 </t:template>
164
165 <t:template match="child::map:see">
166 <dt>$B30It<LA|I=;2>H(B</dt>
167 <dd>
168 <t:call-template name="uriref">
169 <t:with-param name="uri" select="attribute::rdf:resource"/>
170 </t:call-template>
171 </dd>
172 </t:template>
173
174 <t:template match="/child::rdf:RDF/child::*/child::*" priority="-100">
175 <dt>
176 <t:call-template name="uriref">
177 <t:with-param name="uri" select="concat(namespace-uri(), local-name())"/>
178 </t:call-template>
179 </dt>
180 <dd><t:apply-templates/></dd>
181 </t:template>
182
183 <t:template name="uri">
184 <abbr lang="en" xml:lang="en"
185 title="Uniform Resource Identifiers">URI</abbr>
186 </t:template>
187
188 <t:template name="uriref">
189 <t:param name="uri"/>
190 <code class="URI">&lt;<a>
191 <t:attribute name="href"><t:value-of select="$uri"/></t:attribute>
192 <t:value-of select="$uri"/>
193 </a>&gt;</code>
194 </t:template>
195
196 <t:template name="mailref">
197 <t:param name="mail"/>
198 <code class="mail">&lt;<a>
199 <t:attribute name="href">mailto:<t:value-of select="$mail"/></t:attribute>
200 <t:value-of select="$mail"/>
201 </a>&gt;</code>
202 </t:template>
203
204 <t:template name="uritemplate">
205 <t:param name="template"/>
206 <t:choose>
207 <t:when test="descendant::replace:*">
208 <code class="URI">
209 <t:value-of select="'&lt;'"/>
210 <t:apply-templates select="child::node()"/>
211 <t:value-of select="'&gt;'"/>
212 </code>
213 </t:when>
214 <t:otherwise>
215 <t:call-template name="uriref">
216 <t:with-param name="uri" select="string($template)"/>
217 </t:call-template>
218 </t:otherwise>
219 </t:choose>
220 </t:template>
221
222 <t:template match="child::replace:*">
223 <var>
224 <t:value-of select="'('"/>
225 <t:value-of select="local-name()"/>
226 <t:apply-templates select="attribute::*"/>
227 <t:if test="child::node()">
228 <t:value-of select="': '"/>
229 <t:apply-templates select="child::node()"/>
230 </t:if>
231 <t:value-of select="')'"/>
232 </var>
233 </t:template>
234
235 <t:template match="child::replace:*/attribute::*">
236 <t:value-of select="' (@'"/>
237 <code class="XMLa">
238 <t:if test="namespace-uri()">
239 <t:value-of select="'{'"/>
240 <t:value-of select="namespace-uri()"/>
241 <t:value-of select="'}:'"/>
242 </t:if>
243 <t:value-of select="local-name()"/>
244 </code>
245 <t:value-of select="'='"/>
246 <t:value-of select="string(self::node())"/>
247 <t:value-of select="')'"/>
248 </t:template>
249
250 <t:template name="text-uri-group">
251 <t:call-template name="uri"/>
252 <t:value-of select="' $B72(B '"/>
253 </t:template>
254 </t:stylesheet>

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24