1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
\r
3 xmlns="http://www.w3.org/1999/xhtml">
\r
5 omit-xml-declaration="no"
\r
9 doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
\r
10 doctype-system="http://www.w3.org/TR/html4/loose.dtd"
\r
12 <xsl:template match="/">
\r
13 <xsl:apply-templates/>
\r
16 <xsl:template match="comic">
\r
19 <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
\r
20 <meta http-equiv="Content-Style-Type" content="text/css" />
\r
21 <meta http-equiv="imagetoolbar" content="no" />
\r
24 <xsl:if test="@subtitle">
\r
25 <xsl:value-of select="concat(@episode,' | ')"/>
\r
27 <xsl:value-of select="@title" />
\r
28 <xsl:if test="@author">
\r
29 <xsl:value-of select="concat(' | ',@author)"/>
\r
33 <link href="pettanr.css" rel="stylesheet" type="text/css" />
\r
37 <h1><xsl:value-of select="@title" /></h1>
\r
38 <h2><xsl:value-of select="@episode" /></h2>
\r
39 <p class='author'>author:<xsl:value-of select="@author" /></p>
\r
41 <div id="panelContainer">
\r
42 <xsl:attribute name="style">
\r
43 <xsl:value-of select="concat('width:',@w,'px;')"/>
\r
46 <xsl:apply-templates/>
\r
50 (c)<xsl:value-of select="/comic/@author" /> , flash publishing system 'pettan' is powered by pettan_dev.
\r
56 <xsl:template match="panel">
\r
57 <div class="panel-wrapper">
\r
58 <xsl:for-each select=".">
\r
60 <xsl:variable name="height" select="concat('height:',@h,'px;')" />
\r
61 <xsl:variable name="bgcolor" select="concat('background-color:',@bgcolor,';')" />
\r
62 <xsl:attribute name="style">
\r
63 <xsl:value-of select="concat($height,$bgcolor)"/>
\r
65 <xsl:apply-templates/>
\r
68 <xsl:for-each select="./img">
\r
69 <xsl:if test="@name">
\r
71 <div class="tooltip-container">
\r
72 <xsl:comment><![CDATA[[if lte IE 6]><a href="#"><table><tr><td><![endif]]]></xsl:comment>
\r
73 <img src="4x4.gif" class="image-shadow"><!-- 当初divで書いていたら、ie5.5~8で正しくレンダリングできない。なぜかDomが狂う、、、xsl:attribute name="style"が頭にきたせい? -->
\r
74 <xsl:attribute name="width">
\r
75 <xsl:value-of select="@w"/>
\r
77 <xsl:attribute name="height">
\r
78 <xsl:value-of select="@h"/>
\r
80 <xsl:attribute name="style">
\r
81 <xsl:value-of select="concat('left:',@x,'px;','top:',@y,'px;')"/>
\r
84 <dl class="tooltip">
\r
85 <xsl:attribute name="style">
\r
86 <xsl:value-of select="concat('margin-left:',position(),'9px;left:',/comic/@w,'px;','top:',@y,'px;')"/><!-- 要素が完全に重なることを防ぐためにposition()で要素のindexを取ってmargin-leftしている -->
\r
89 <dd><xsl:value-of select="@name" /></dd>
\r
91 <dd><xsl:value-of select="@author" /></dd>
\r
93 <dd><xsl:value-of select="@site" /></dd>
\r
95 <xsl:comment><![CDATA[[if lte IE 6]></td></tr></table></a><![endif]]]></xsl:comment>
\r
103 <xsl:template match="img">
\r
104 <xsl:for-each select=".">
\r
106 <xsl:attribute name="src">
\r
107 <xsl:value-of select="@url"/>
\r
109 <xsl:attribute name="width">
\r
110 <xsl:value-of select="@w"/>
\r
112 <xsl:attribute name="height">
\r
113 <xsl:value-of select="@h"/>
\r
115 <xsl:variable name="left" select="concat('left:',@x,'px;')" />
\r
116 <xsl:variable name="top" select="concat('top:',@y,'px;')" />
\r
117 <xsl:attribute name="style">
\r
118 <xsl:value-of select="concat($left,$top)"/>
\r
124 <xsl:template match="balloon">
\r
125 <xsl:for-each select=".">
\r
127 <xsl:variable name="type">
\r
128 <xsl:if test="contains(@type,'0')">fukidasi/mfuki</xsl:if>
\r
129 <xsl:if test="contains(@type,'1')">fukidasi/omoiFuki</xsl:if>
\r
131 <xsl:attribute name="src">
\r
132 <xsl:value-of select="concat($type,@tail,'.gif')"/>
\r
134 <xsl:attribute name="width">
\r
135 <xsl:value-of select="@w"/>
\r
137 <xsl:attribute name="height">
\r
138 <xsl:value-of select="@h"/>
\r
140 <xsl:variable name="left" select="concat('left:',@x,'px;')" />
\r
141 <xsl:variable name="top" select="concat('top:',@y,'px;')" />
\r
142 <xsl:attribute name="style">
\r
143 <xsl:value-of select="concat($top,$left)"/>
\r
147 <div class="speach">
\r
148 <xsl:variable name="width" select="concat('width:',@w,'px;')" />
\r
149 <xsl:variable name="height" select="concat('height:',@h,'px;')" />
\r
150 <xsl:variable name="left2" select="concat('left:',@x,'px;')" />
\r
151 <xsl:variable name="top2" select="concat('top:',@y,'px;')" />
\r
152 <xsl:variable name="fontsize">
\r
153 <xsl:if test="@size">
\r
154 <xsl:value-of select="concat('font-size:',@size,'px;')"/>
\r
157 <xsl:variable name="fontbold">
\r
158 <xsl:if test="@bold">font-weight:bold;</xsl:if>
\r
160 <xsl:attribute name="style">
\r
161 <xsl:value-of select="concat($width,$height,$top2,$left2,$fontsize,$fontbold)"/>
\r
163 <xsl:comment><![CDATA[[if lte IE 7]><table><tr><td><![endif]]]></xsl:comment>
\r
165 <xsl:apply-templates/>
\r
167 <xsl:comment><![CDATA[[if lte IE 7]></td></tr></table><![endif]]]></xsl:comment>
\r