-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmemo2html.xsl
31 lines (31 loc) · 1.07 KB
/
memo2html.xsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?xml version="1.0" encoding="UTF-8"?>
<s:stylesheet version="1.0" xmlns:s="http://www.w3.org/1999/XSL/Transform">
<s:output method="html" omit-xml-declaration="yes" indent="no" />
<s:template match="memo/header">
<s:text disable-output-escaping="yes"><!DOCTYPE html></s:text>
<s:text disable-output-escaping="yes">
<html>
<head>
<meta charset="utf-8" />
<base href="." />
<style type="text/css">
body {font-family: sans-serif; width: 90%; font-size: 90%}
img {width: 60%; margin: 0.6em auto}
p {font-size: 100%; line-height: 1.618}
</style>
</s:text>
<s:value-of select="concat('<title>',meta/@title,'</title>')" disable-output-escaping="yes" />
<s:text disable-output-escaping="yes">
</head>
<body>
</s:text>
<s:value-of select="concat('<h1>',meta/@title,'</h1>')" disable-output-escaping="yes" />
</s:template>
<s:template match="memo/contents">
<s:value-of select="content" disable-output-escaping="yes" />
<s:text disable-output-escaping="yes">
</body>
</html>
</s:text>
</s:template>
</s:stylesheet>