OSDN Git Service

* Added New Feature.
authorAtsushi Konno <konn@users.sourceforge.jp>
Thu, 31 Mar 2011 16:58:07 +0000 (01:58 +0900)
committerAtsushi Konno <konn@users.sourceforge.jp>
Thu, 31 Mar 2011 16:58:07 +0000 (01:58 +0900)
    - iPhone can be recognized.
    - "raw:" can be specified in jphone, iphone, and the part ezweb of the
      emoji definition.
      ex) <string>raw:[OK]</string>
    - Added ChxjUseEmojiImage directive.
    - Added ChxjEmojiImageUrl directive.
    - "image" can be specified in iphone of the pictograph definition,
      jphone, and the part ezweb.
       When URL is set to ChxjEmojiImageUrl with On, ChxjUseEmojiImage.
       the emoji is converted int <img> tag with follow case:
       1) "Image" is specified by the pictograph definition.
       2) For iphone2
    - Added CSS converter for iphone

  * Fixed Bug
    - wrap-input-format --> wap-input-format
    - When CrLf is contained in the style tag, it is not read correctly.

21 files changed:
etc/device_data.xml
etc/emoji.xml
include/chxj_iphone.h [new file with mode: 0644]
include/chxj_specified_device.h
include/mod_chxj.h
src/Makefile.am
src/Makefile.in
src/chxj_add_device_env.c
src/chxj_img_conv_format.c
src/chxj_iphone.c [new file with mode: 0644]
src/chxj_ixhtml10.c
src/chxj_jhtml.c
src/chxj_jxhtml.c
src/chxj_load_device_data.c
src/chxj_load_emoji_data.c
src/chxj_node_convert.c
src/chxj_specified_device.c
src/chxj_tag_util.c
src/chxj_xhtml_mobile_1_0.c
src/mod_chxj.c
src/serf/Makefile.in

index f25dd6a..d161a8b 100644 (file)
@@ -21475,6 +21475,125 @@ Mozilla/4.0 (compatible; MSIE 6.0; KYOCERA/AH-K3001V/1.4.1.67.000000/0.1) Opera
       <dpi_heigh>96</dpi_heigh>
     </device>
   </user_agent>
+  <!--=======================================================================-->
+  <!-- iPhone/iPod                                                           -->
+  <!--=======================================================================-->
+  <!--
+    old iPhone/iPod
+  -->
+  <user_agent pattern="^Mozilla/5.0 \(([^;]+); U; CPU like Mac OS X;.+$">
+    <device>
+      <device_id>iPhone</device_id>
+      <device_name>iPhone(old)</device_name>
+      <html_spec_type>iPhone2</html_spec_type>
+      <width>320</width>
+      <heigh>480</heigh>
+      <gif>true</gif>
+      <jpeg>true</jpeg>
+      <png>true</png>
+      <bmp2>false</bmp2>
+      <bmp4>true</bmp4>
+      <color>262144</color>
+      <emoji_type></emoji_type>
+
+      <wp_width>320</wp_width>
+      <wp_heigh>480</wp_heigh>
+      <cache>300000</cache>
+      <dpi_width>96</dpi_width>
+      <dpi_heigh>96</dpi_heigh>
+      <output_encoding>UTF-8</output_encoding>
+    </device>
+    <device>
+      <device_id>iPod</device_id>
+      <device_name>iPod(old)</device_name>
+      <html_spec_type>iPhone2</html_spec_type>
+      <width>320</width>
+      <heigh>480</heigh>
+      <gif>true</gif>
+      <jpeg>true</jpeg>
+      <png>true</png>
+      <bmp2>false</bmp2>
+      <bmp4>true</bmp4>
+      <color>262144</color>
+      <emoji_type></emoji_type>
+
+      <wp_width>320</wp_width>
+      <wp_heigh>480</wp_heigh>
+      <cache>300000</cache>
+      <dpi_width>96</dpi_width>
+      <dpi_heigh>96</dpi_heigh>
+      <output_encoding>UTF-8</output_encoding>
+    </device>
+  </user_agent>
+  <!--
+       Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_0 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5A345 Safari/525.20
+       iPhone 2.0-2.2.1
+  -->
+  <user_agent pattern="^Mozilla/5.0 \(iPhone; U; CPU (iPhone OS [^ _]+)_[^ ]+ like Mac OS X;.+$">
+    <device>
+      <device_id>iPhone OS 2</device_id>
+      <device_name>iPhone 2</device_name>
+      <html_spec_type>iPhone2</html_spec_type>
+      <width>320</width>
+      <heigh>480</heigh>
+      <gif>true</gif>
+      <jpeg>true</jpeg>
+      <png>true</png>
+      <bmp2>false</bmp2>
+      <bmp4>false</bmp4>
+      <color>262144</color>
+      <emoji_type></emoji_type>
+
+      <wp_width>320</wp_width>
+      <wp_heigh>480</wp_heigh>
+      <cache>300000</cache>
+      <dpi_width>96</dpi_width>
+      <dpi_heigh>96</dpi_heigh>
+      <output_encoding>UTF-8</output_encoding>
+    </device>
+    <device>
+      <device_id>iPhone OS 3</device_id>
+      <device_name>iPhone 3</device_name>
+      <html_spec_type>iPhone3</html_spec_type>
+      <width>320</width>
+      <heigh>480</heigh>
+      <gif>true</gif>
+      <jpeg>true</jpeg>
+      <png>true</png>
+      <bmp2>false</bmp2>
+      <bmp4>false</bmp4>
+      <color>262144</color>
+      <emoji_type></emoji_type>
+
+      <wp_width>320</wp_width>
+      <wp_heigh>480</wp_heigh>
+      <cache>300000</cache>
+      <dpi_width>96</dpi_width>
+      <dpi_heigh>96</dpi_heigh>
+      <output_encoding>UTF-8</output_encoding>
+    </device>
+    <device>
+      <device_id>iPhone OS 4</device_id>
+      <device_name>iPhone 4</device_name>
+      <html_spec_type>iPhone4</html_spec_type>
+      <width>320</width>
+      <heigh>480</heigh>
+      <gif>true</gif>
+      <jpeg>true</jpeg>
+      <png>true</png>
+      <bmp2>false</bmp2>
+      <bmp4>false</bmp4>
+      <color>262144</color>
+      <emoji_type></emoji_type>
+
+      <wp_width>640</wp_width>
+      <wp_heigh>960</wp_heigh>
+      <cache>300000</cache>
+      <dpi_width>96</dpi_width>
+      <dpi_heigh>96</dpi_heigh>
+      <output_encoding>UTF-8</output_encoding>
+    </device>
+  </user_agent>
 
 </devices>
 <!--
index b6074a0..2bcb0e8 100644 (file)
@@ -19,6 +19,9 @@
     <jphone>
       <string>$Gj</string>
     </jphone>
+    <iphone>
+      <string>&#xE04A</string>
+    </iphone>
   </set>
   <set>
     <no>2</no>
@@ -38,6 +41,9 @@
     <jphone>
       <string>$Gi</string>
     </jphone>
+    <iphone>
+      <string>&#xE049</string>
+    </iphone>
   </set>
   <set>
     <no>3</no>
@@ -57,6 +63,9 @@
     <jphone>
       <string>$Gk</string>
     </jphone>
+    <iphone>
+      <string>&#xE04B</string>
+    </iphone>
   </set>
   <set>
     <no>4</no>
@@ -76,6 +85,9 @@
     <jphone>
       <string>$Gh</string>
     </jphone>
+    <iphone>
+      <string>&#xE048</string>
+    </iphone>
   </set>
   <set>
     <no>5</no>
     <jphone>
       <string>$GU</string>
     </jphone>
+    <iphone>
+      <string>&#xE13D</string>
+    </iphone>
   </set>
   <set>
     <no>6</no>
     <jphone>
       <string>$Pc</string>
     </jphone>
+    <iphone>
+      <string>&#xE443</string>
+    </iphone>
   </set>
   <set>
     <no>7</no>
     <jphone>
       <string>$Gi</string>
     </jphone>
+    <iphone>
+      <string>&#xE049</string>
+    </iphone>
   </set>
   <set>
     <no>8</no>
     <jphone>
       <string>$Gk</string>
     </jphone>
+    <iphone>
+      <string>&#xE43C</string>
+    </iphone>
   </set>
   <set>
     <no>9</no>
     <jphone>
       <string>$F_</string>
     </jphone>
+    <iphone>
+      <string>&#xE23F</string>
+    </iphone>
   </set>
   <set>
     <no>10</no>
     <jphone>
       <string>$F`</string>
     </jphone>
+    <iphone>
+      <string>&#xE240</string>
+    </iphone>
   </set>
   <set>
     <no>11</no>
     <jphone>
       <string>$Fa</string>
     </jphone>
+    <iphone>
+      <string>&#xE241</string>
+    </iphone>
   </set>
   <set>
     <no>12</no>
     <jphone>
       <string>$Fb</string>
     </jphone>
+    <iphone>
+      <string>&#xE242</string>
+    </iphone>
   </set>
   <set>
     <no>13</no>
     <jphone>
       <string>$Fc</string>
     </jphone>
+    <iphone>
+      <string>&#xE243</string>
+    </iphone>
   </set>
   <set>
     <no>14</no>
     <jphone>
       <string>$Fd</string>
     </jphone>
+    <iphone>
+      <string>&#xE244</string>
+    </iphone>
   </set>
   <set>
     <no>15</no>
     <jphone>
       <string>$Fe</string>
     </jphone>
+    <iphone>
+      <string>&#xE245</string>
+    </iphone>
   </set>
   <set>
     <no>16</no>
     <jphone>
       <string>$Ff</string>
     </jphone>
+    <iphone>
+      <string>&#xE246</string>
+    </iphone>
   </set>
   <set>
     <no>17</no>
     <jphone>
       <string>$Fg</string>
     </jphone>
+    <iphone>
+      <string>&#xE247</string>
+    </iphone>
   </set>
   <set>
     <no>18</no>
     <jphone>
       <string>$Fh</string>
     </jphone>
+    <iphone>
+      <string>&#xE248</string>
+    </iphone>
   </set>
   <set>
     <no>19</no>
     <jphone>
       <string>$Fi</string>
     </jphone>
+    <iphone>
+      <string>&#xE249</string>
+    </iphone>
   </set>
   <set>
     <no>20</no>
     <jphone>
       <string>$Fj</string>
     </jphone>
+    <iphone>
+      <string>&#xE24A</string>
+    </iphone>
   </set>
   <set>
     <no>21</no>
     <jphone>
       <string>$E5</string>
     </jphone>
+    <iphone>
+      <string>&#xE015</string>
+    </iphone>
   </set>
   <set>
     <no>22</no>
     <jphone>
       <string>$G6</string>
     </jphone>
+    <iphone>
+      <string>&#xE016</string>
+    </iphone>
   </set>
   <set>
     <no>23</no>
     <jphone>
       <string>$G4</string>
     </jphone>
+    <iphone>
+      <string>&#xE014</string>
+    </iphone>
   </set>
   <set>
     <no>24</no>
     <jphone>
       <string>$G5</string>
     </jphone>
+    <iphone>
+      <string>&#xE015</string>
+    </iphone>
   </set>
   <set>
     <no>25</no>
     <jphone>
       <string>$G8</string>
     </jphone>
+    <iphone>
+      <string>&#xE018</string>
+    </iphone>
   </set>
   <set>
     <no>26</no>
     <jphone>
       <string>$G3</string>
     </jphone>
+    <iphone>
+      <string>&#xE013</string>
+    </iphone>
   </set>
   <set>
     <no>27</no>
     <jphone>
       <string>$PJ</string>
     </jphone>
+    <iphone>
+      <string>&#xE42A</string>
+    </iphone>
   </set>
   <set>
     <no>28</no>
     <jphone>
       <string>$ER</string>
     </jphone>
+    <iphone>
+      <string>&#xE132</string>
+    </iphone>
   </set>
   <set>
     <no>29</no>
       <D>308</D>
     </ezweb>
     <jphone>
-      <string></string>
+      <string>raw:[Îß¹ÍÞÙ]</string>
     </jphone>
+    <iphone>
+      <string>raw:[Îß¹ÍÞÙ]</string>
+    </iphone>
   </set>
   <set>
     <no>30</no>
     <jphone>
       <string>$G&gt;</string>
     </jphone>
+    <iphone>
+      <string>&#xE01E</string>
+    </iphone>
   </set>
   <set>
     <no>31</no>
     <jphone>
       <string>$PT</string>
     </jphone>
+    <iphone>
+      <string>&#xE434</string>
+    </iphone>
   </set>
   <set>
     <no>32</no>
     <jphone>
       <string>$G?</string>
     </jphone>
+    <iphone>
+      <string>&#xE435</string>
+    </iphone>
   </set>
   <set>
     <no>33</no>
     <jphone>
       <string>$Ez</string>
     </jphone>
+    <iphone>
+      <string>&#xE01B</string>
+    </iphone>
   </set>
   <set>
     <no>34</no>
     <jphone>
       <string>$Ez</string>
     </jphone>
+    <iphone>
+      <string>&#xE42E</string>
+    </iphone>
   </set>
   <set>
     <no>35</no>
     <jphone>
       <string>$Ey</string>
     </jphone>
+    <iphone>
+      <string>&#xE159</string>
+    </iphone>
   </set>
   <set>
     <no>36</no>
       <D>169</D>
     </ezweb>
     <jphone>
-      <string></string>
+      <string>raw:[\82Ó\82Ë]</string>
     </jphone>
+    <iphone>
+      <string>&#xE202</string>
+    </iphone>
   </set>
   <set>
     <no>37</no>
     <jphone>
       <string>$G=</string>
     </jphone>
+    <iphone>
+      <string>&#xE01D</string>
+    </iphone>
   </set>
   <set>
     <no>38</no>
     <jphone>
       <string>$GV</string>
     </jphone>
+    <iphone>
+      <string>&#xE036</string>
+    </iphone>
   </set>
   <set>
     <no>39</no>
     <jphone>
       <string>$GX</string>
     </jphone>
+    <iphone>
+      <string>&#xE038</string>
+    </iphone>
   </set>
   <set>
     <no>40</no>
     <jphone>
       <string>$Es</string>
     </jphone>
+    <iphone>
+      <string>&#xE153</string>
+    </iphone>
   </set>
   <set>
     <no>41</no>
     <jphone>
       <string>$Eu</string>
     </jphone>
+    <iphone>
+      <string>&#xE155</string>
+    </iphone>
   </set>
   <set>
     <no>42</no>
     <jphone>
       <string>$Em</string>
     </jphone>
+    <iphone>
+      <string>&#xE14D</string>
+    </iphone>
   </set>
   <set>
     <no>43</no>
     <jphone>
       <string>$Et</string>
     </jphone>
+    <iphone>
+      <string>&#xE154</string>
+    </iphone>
   </set>
   <set>
     <no>44</no>
     <jphone>
       <string>$Ex</string>
     </jphone>
+    <iphone>
+      <string>&#xE158</string>
+    </iphone>
   </set>
   <set>
     <no>45</no>
     <jphone>
       <string>$Ev</string>
     </jphone>
+    <iphone>
+      <string>&#xE156</string>
+    </iphone>
   </set>
   <set>
     <no>46</no>
     <jphone>
       <string>$GZ</string>
     </jphone>
+    <iphone>
+      <string>&#xE03A</string>
+    </iphone>
   </set>
   <set>
     <no>47</no>
     <jphone>
       <string>$Eo</string>
     </jphone>
+    <iphone>
+      <string>&#xE14F</string>
+    </iphone>
   </set>
   <set>
     <no>48</no>
     <jphone>
       <string>$En</string>
     </jphone>
+    <iphone>
+      <string>&#xE14E</string>
+    </iphone>
   </set>
   <set>
     <no>49</no>
     <jphone>
       <string>$Eq</string>
     </jphone>
+    <iphone>
+      <string>&#xE151</string>
+    </iphone>
   </set>
   <set>
     <no>50</no>
     <jphone>
       <string>$Gc</string>
     </jphone>
+    <iphone>
+      <string>&#xE043</string>
+    </iphone>
   </set>
   <set>
     <no>51</no>
     <jphone>
       <string>$Ge</string>
     </jphone>
+    <iphone>
+      <string>&#xE045</string>
+    </iphone>
   </set>
   <set>
     <no>52</no>
     <jphone>
       <string>$Gd</string>
     </jphone>
+    <iphone>
+      <string>&#xE044</string>
+    </iphone>
   </set>
   <set>
     <no>53</no>
     <jphone>
       <string>$Gg</string>
     </jphone>
+    <iphone>
+      <string>&#xE047</string>
+    </iphone>
   </set>
   <set>
     <no>54</no>
     <jphone>
       <string>$E@</string>
     </jphone>
+    <iphone>
+      <string>&#xE120</string>
+    </iphone>
   </set>
   <set>
     <no>55</no>
     <jphone>
       <string>$E^</string>
     </jphone>
+    <iphone>
+      <string>&#xE13E</string>
+    </iphone>
   </set>
   <set>
     <no>56</no>
     <jphone>
       <string>$O3</string>
     </jphone>
+    <iphone>
+      <string>&#xE313</string>
+    </iphone>
   </set>
   <set>
     <no>57</no>
     <jphone>
       <string>$G\</string>
     </jphone>
+    <iphone>
+      <string>&#xE03C</string>
+    </iphone>
   </set>
   <set>
     <no>58</no>
     <jphone>
       <string>$G]</string>
     </jphone>
+    <iphone>
+      <string>&#xE03D</string>
+    </iphone>
   </set>
   <set>
     <no>59</no>
     <jphone>
       <string>$FV</string>
     </jphone>
+    <iphone>
+      <string>&#xE236</string>
+    </iphone>
   </set>
   <set>
     <no>60</no>
     <jphone>
       <string>$ED</string>
     </jphone>
+    <iphone>
+      <string>&#xE433</string>
+    </iphone>
   </set>
   <set>
     <no>61</no>
     <jphone>
       <string>$G^</string>
     </jphone>
+    <iphone>
+      <string>&#xE30A</string>
+    </iphone>
   </set>
   <set>
     <no>62</no>
     <jphone>
       <string>$Q"</string>
     </jphone>
+    <iphone>
+      <string>&#xE502</string>
+    </iphone>
   </set>
   <set>
     <no>63</no>
     <jphone>
       <string>$Q#</string>
     </jphone>
+    <iphone>
+      <string>&#xE503</string>
+    </iphone>
   </set>
   <set>
     <no>64</no>
     <jphone>
       <string>$Ec</string>
     </jphone>
+    <iphone>
+      <string>&#xE437</string>
+    </iphone>
   </set>
   <set>
     <no>65</no>
     <jphone>
       <string>$EE</string>
     </jphone>
+    <iphone>
+      <string>&#xE125</string>
+    </iphone>
   </set>
   <set>
     <no>66</no>
     <jphone>
       <string>$O.</string>
     </jphone>
+    <iphone>
+      <string>&#xE30E</string>
+    </iphone>
   </set>
   <set>
     <no>67</no>
     <jphone>
       <string>$F(</string>
     </jphone>
+    <iphone>
+      <string>&#xE208</string>
+    </iphone>
   </set>
   <set>
     <no>68</no>
     <jphone>
       <string>$G(</string>
     </jphone>
+    <iphone>
+      <string>&#xE008</string>
+    </iphone>
   </set>
   <set>
     <no>69</no>
     <jphone>
       <string>$E&gt;</string>
     </jphone>
+    <iphone>
+      <string>&#xE11E</string>
+    </iphone>
   </set>
   <set>
     <no>70</no>
     <jphone>
       <string>$Eh</string>
     </jphone>
+    <iphone>
+      <string>&#xE148</string>
+    </iphone>
   </set>
   <set>
     <no>71</no>
     <jphone>
       <string>$O4</string>
     </jphone>
+    <iphone>
+      <string>&#xE314</string>
+    </iphone>
   </set>
   <set>
     <no>72</no>
     <jphone>
       <string>$E2</string>
     </jphone>
+    <iphone>
+      <string>&#xE112</string>
+    </iphone>
   </set>
   <set>
     <no>73</no>
     <jphone>
       <string>$Ok</string>
     </jphone>
+    <iphone>
+      <string>&#xE34B</string>
+    </iphone>
   </set>
   <set>
     <no>74</no>
     <jphone>
       <string>$G)</string>
     </jphone>
+    <iphone>
+      <string>&#xE009</string>
+    </iphone>
   </set>
   <set>
     <no>75</no>
     <jphone>
       <string>$G*</string>
     </jphone>
+    <iphone>
+      <string>&#xE00A</string>
+    </iphone>
   </set>
   <set>
     <no>76</no>
     <jphone>
       <string>$O!</string>
     </jphone>
+    <iphone>
+      <string>&#xE301</string>
+    </iphone>
   </set>
   <set>
     <no>77</no>
     <jphone>
       <string>$EJ</string>
     </jphone>
+    <iphone>
+      <string>&#xE12A</string>
+    </iphone>
   </set>
   <set>
     <no>78</no>
     <jphone>
       <string>$EK</string>
     </jphone>
+    <iphone>
+      <string>raw:[¹Þ°Ñ]</string>
+    </iphone>
   </set>
   <set>
     <no>79</no>
     <jphone>
       <string>$EF</string>
     </jphone>
+    <iphone>
+      <string>&#xE126</string>
+    </iphone>
   </set>
   <set>
     <no>80</no>
     <jphone>
       <string>$GB</string>
     </jphone>
+    <iphone>
+      <string>&#xE20C</string>
+    </iphone>
   </set>
   <set>
     <no>81</no>
     <jphone>
       <string>$F.</string>
     </jphone>
+    <iphone>
+      <string>&#xE20E</string>
+    </iphone>
   </set>
   <set>
     <no>82</no>
     <jphone>
       <string>$F-</string>
     </jphone>
+    <iphone>
+      <string>&#xE20D</string>
+    </iphone>
   </set>
   <set>
     <no>83</no>
     <jphone>
       <string>$F/</string>
     </jphone>
+    <iphone>
+      <string>&#xE20F</string>
+    </iphone>
   </set>
   <set>
     <no>84</no>
     <jphone>
       <string>$P9</string>
     </jphone>
+    <iphone>
+      <string>&#xE419</string>
+    </iphone>
   </set>
   <set>
     <no>85</no>
     <jphone>
       <string>$P;</string>
     </jphone>
+    <iphone>
+      <string>&#xE41B</string>
+    </iphone>
   </set>
   <set>
     <no>86</no>
     <jphone>
       <string>$G-</string>
     </jphone>
+    <iphone>
+      <string>&#xE010</string>
+    </iphone>
   </set>
   <set>
     <no>87</no>
     <jphone>
       <string>$G1</string>
     </jphone>
+    <iphone>
+      <string>&#xE011</string>
+    </iphone>
   </set>
   <set>
     <no>88</no>
     <jphone>
       <string>$G2</string>
     </jphone>
+    <iphone>
+      <string>&#xE012</string>
+    </iphone>
   </set>
   <set>
     <no>89</no>
     <jphone>
       <string>$FX</string>
     </jphone>
+    <iphone>
+      <string>&#xE238</string>
+    </iphone>
   </set>
   <set>
     <no>90</no>
     <jphone>
       <string>$FW</string>
     </jphone>
+    <iphone>
+      <string>&#xE237</string>
+    </iphone>
   </set>
   <set>
     <no>91</no>
     <jphone>
       <string>$QV</string>
     </jphone>
+    <iphone>
+      <string>&#xE536</string>
+    </iphone>
   </set>
   <set>
     <no>92</no>
     <jphone>
       <string>$G'</string>
     </jphone>
+    <iphone>
+      <string>&#xE007</string>
+    </iphone>
   </set>
   <set>
     <no>93</no>
     <jphone>
       <string>$F1</string>
     </jphone>
+    <iphone>
+      <string>raw:[Ò¶ÞÈ]</string>
+    </iphone>
   </set>
   <set>
     <no>94</no>
     <jphone>
       <string>$F*</string>
     </jphone>
+    <iphone>
+      <string>&#xE20A</string>
+    </iphone>
   </set>
   <set>
     <no>95</no>
     <jphone>
       <string>$Gl</string>
     </jphone>
+    <iphone>
+      <string>raw:\81\9c</string>
+    </iphone>
   </set>
   <set>
     <no>96</no>
     <jphone>
       <string>$Gl</string>
     </jphone>
+    <iphone>
+      <string>&#xE04C</string>
+    </iphone>
   </set>
   <set>
     <no>97</no>
     <jphone>
       <string>$Gl</string>
     </jphone>
+    <iphone>
+      <string>&#xE04C</string>
+    </iphone>
   </set>
   <set>
     <no>98</no>
     <jphone>
       <string>$Gl</string>
     </jphone>
+    <iphone>
+      <string>&#xE04C</string>
+    </iphone>
   </set>
   <set>
     <no>99</no>
     <jphone>
       <string>$Gl</string>
     </jphone>
+    <iphone>
+      <string>raw:\81\9b</string>
+    </iphone>
   </set>
   <set>
     <no>100</no>
     <jphone>
       <string>$Gr</string>
     </jphone>
+    <iphone>
+      <string>&#xE052</string>
+    </iphone>
   </set>
   <set>
     <no>101</no>
     <jphone>
       <string>$Go</string>
     </jphone>
+    <iphone>
+      <string>&#xE051</string>
+    </iphone>
   </set>
   <set>
     <no>102</no>
     <jphone>
       <string>$G&lt;</string>
     </jphone>
+    <iphone>
+      <string>&#xE01C</string>
+    </iphone>
   </set>
   <set>
     <no>103</no>
     <jphone>
       <string>$GS</string>
     </jphone>
+    <iphone>
+      <string>&#xE033</string>
+    </iphone>
   </set>
   <set>
     <no>104</no>
     <jphone>
       <string>$FY</string>
     </jphone>
+    <iphone>
+      <string>&#xE239</string>
+    </iphone>
   </set>
   <set>
     <no>105</no>
     <jphone>
       <string>$E$</string>
     </jphone>
+    <iphone>
+      <string>&#xE104</string>
+    </iphone>
   </set>
   <set>
     <no>106</no>
     <jphone>
       <string>$E#</string>
     </jphone>
+    <iphone>
+      <string>&#xE103</string>
+    </iphone>
   </set>
   <set>
     <no>107</no>
     <jphone>
       <string>$G+</string>
     </jphone>
+    <iphone>
+      <string>&#xE00B</string>
+    </iphone>
   </set>
   <set>
     <no>108</no>
     <jphone>
       <string>$Fu</string>
     </jphone>
+    <iphone>
+      <string>raw:[iÓ°ÄÞ]</string>
+    </iphone>
   </set>
   <set>
     <no>109</no>
     <jphone>
       <string>$Fu</string>
     </jphone>
+    <iphone>
+      <string>raw:[iÓ°ÄÞ]</string>
+    </iphone>
   </set>
   <set>
     <no>110</no>
     <jphone>
       <string>$E#</string>
     </jphone>
+    <iphone>
+      <string>&#xE103</string>
+    </iphone>
   </set>
   <set>
     <no>111</no>
     <jphone>
       <string>$Fu</string>
     </jphone>
+    <iphone>
+      <string>raw:[ÄÞºÓ]</string>
+    </iphone>
   </set>
   <set>
     <no>112</no>
     <jphone>
       <string>$Fu</string>
     </jphone>
+    <iphone>
+      <string>raw:[ÄÞºÓ]</string>
+    </iphone>
   </set>
   <set>
     <no>113</no>
     <jphone>
       <string>$F5</string>
     </jphone>
+    <iphone>
+      <string>raw:\81\8f</string>
+    </iphone>
   </set>
   <set>
     <no>114</no>
     <jphone>
       <string>$F6</string>
     </jphone>
+    <iphone>
+      <string>raw:[FREE]</string>
+    </iphone>
   </set>
   <set>
     <no>115</no>
     <jphone>
       <string>$FI</string>
     </jphone>
+    <iphone>
+      <string>&#xE229</string>
+    </iphone>
   </set>
   <set>
     <no>116</no>
     <jphone>
       <string>$G_</string>
     </jphone>
+    <iphone>
+      <string>&#xE03F</string>
+    </iphone>
   </set>
   <set>
     <no>117</no>
     <jphone>
       <string>$FZ</string>
     </jphone>
+    <iphone>
+      <string>&#xE23A</string>
+    </iphone>
   </set>
   <set>
     <no>118</no>
     <jphone>
       <string>$Gz</string>
     </jphone>
+    <iphone>
+      <string>raw:[CL]</string>
+    </iphone>
   </set>
   <set>
     <no>119</no>
     <jphone>
       <string>$E4</string>
     </jphone>
+    <iphone>
+      <string>&#xE114</string>
+    </iphone>
   </set>
   <set>
     <no>120</no>
     <jphone>
       <string>$F2</string>
     </jphone>
+    <iphone>
+      <string>&#xE212</string>
+    </iphone>
   </set>
   <set>
     <no>121</no>
     <jphone>
       <string>$Ek</string>
     </jphone>
+    <iphone>
+      <string>&#xE203</string>
+    </iphone>
   </set>
   <set>
     <no>122</no>
     <jphone>
       <string>$F1</string>
     </jphone>
+    <iphone>
+      <string>&#xE211</string>
+    </iphone>
   </set>
   <set>
     <no>123</no>
     <jphone>
       <string>$F0</string>
     </jphone>
+    <iphone>
+      <string>&#xE210</string>
+    </iphone>
   </set>
   <set>
     <no>124</no>
     <jphone>
       <string>$Ft</string>
     </jphone>
+    <iphone>
+      <string>raw:[Q]</string>
+    </iphone>
   </set>
   <set>
     <no>125</no>
     <jphone>
       <string>$F&lt;</string>
     </jphone>
+    <iphone>
+      <string>&#xE21C</string>
+    </iphone>
   </set>
   <set>
     <no>126</no>
     <jphone>
       <string>$F=</string>
     </jphone>
+    <iphone>
+      <string>&#xE21D</string>
+    </iphone>
   </set>
   <set>
     <no>127</no>
     <jphone>
       <string>$F&gt;</string>
     </jphone>
+    <iphone>
+      <string>&#xE21E</string>
+    </iphone>
   </set>
   <set>
     <no>128</no>
     <jphone>
       <string>$F?</string>
     </jphone>
+    <iphone>
+      <string>&#xE21F</string>
+    </iphone>
   </set>
   <set>
     <no>129</no>
     <jphone>
       <string>$F@</string>
     </jphone>
+    <iphone>
+      <string>&#xE220</string>
+    </iphone>
   </set>
   <set>
     <no>130</no>
     <jphone>
       <string>$FA</string>
     </jphone>
+    <iphone>
+      <string>&#xE221</string>
+    </iphone>
   </set>
   <set>
     <no>131</no>
     <jphone>
       <string>$FB</string>
     </jphone>
+    <iphone>
+      <string>&#xE222</string>
+    </iphone>
   </set>
   <set>
     <no>132</no>
     <jphone>
       <string>$FC</string>
     </jphone>
+    <iphone>
+      <string>&#xE223</string>
+    </iphone>
   </set>
   <set>
     <no>133</no>
     <jphone>
       <string>$FD</string>
     </jphone>
+    <iphone>
+      <string>&#xE224</string>
+    </iphone>
   </set>
   <set>
     <no>134</no>
     <jphone>
       <string>$FE</string>
     </jphone>
+    <iphone>
+      <string>&#xE225</string>
+    </iphone>
   </set>
   <set>
     <no>135</no>
     <jphone>
       <string>$Fm</string>
     </jphone>
+    <iphone>
+      <string>&#xE24D</string>
+    </iphone>
   </set>
   <set>
     <no>136</no>
     <jphone>
       <string>$GB</string>
     </jphone>
+    <iphone>
+      <string>&#xE022</string>
+    </iphone>
   </set>
   <set>
     <no>137</no>
     <jphone>
       <string>$GB</string>
     </jphone>
+    <iphone>
+      <string>&#xE328</string>
+    </iphone>
   </set>
   <set>
     <no>138</no>
     <jphone>
       <string>$GC</string>
     </jphone>
+    <iphone>
+      <string>&#xE023</string>
+    </iphone>
   </set>
   <set>
     <no>139</no>
     <jphone>
       <string>$GB</string>
     </jphone>
+    <iphone>
+      <string>&#xE328</string>
+    </iphone>
   </set>
   <set>
     <no>140</no>
     <jphone>
       <string>$Gw</string>
     </jphone>
+    <iphone>
+      <string>&#xE415</string>
+    </iphone>
   </set>
   <set>
     <no>141</no>
     <jphone>
       <string>$Gy</string>
     </jphone>
+    <iphone>
+      <string>&#xE416</string>
+    </iphone>
   </set>
   <set>
     <no>142</no>
     <jphone>
       <string>$Gx</string>
     </jphone>
+    <iphone>
+      <string>&#xE401</string>
+    </iphone>
   </set>
   <set>
     <no>143</no>
     <jphone>
       <string>$E'</string>
     </jphone>
+    <iphone>
+      <string>&#xE407</string>
+    </iphone>
   </set>
   <set>
     <no>144</no>
     <jphone>
       <string>$E(</string>
     </jphone>
+    <iphone>
+      <string>&#xE40B</string>
+    </iphone>
   </set>
   <set>
     <no>145</no>
     <jphone>
       <string>$FR</string>
     </jphone>
+    <iphone>
+      <string>&#xE236</string>
+    </iphone>
   </set>
   <set>
     <no>146</no>
     <jphone>
       <string>$G^</string>
     </jphone>
+    <iphone>
+      <string>&#xE326</string>
+    </iphone>
   </set>
   <set>
     <no>147</no>
     <jphone>
       <string>$EC</string>
     </jphone>
+    <iphone>
+      <string>&#xE123</string>
+    </iphone>
   </set>
   <set>
     <no>148</no>
     <jphone>
       <string>$GB</string>
     </jphone>
+    <iphone>
+      <string>&#xE204</string>
+    </iphone>
   </set>
   <set>
     <no>149</no>
     <jphone>
       <string>$G#</string>
     </jphone>
+    <iphone>
+      <string>&#xE003</string>
+    </iphone>
   </set>
   <set>
     <no>150</no>
     <jphone>
       <string>$GU</string>
     </jphone>
+    <iphone>
+      <string>&#xE32E</string>
+    </iphone>
   </set>
   <set>
     <no>151</no>
     <jphone>
       <string>$E/</string>
     </jphone>
+    <iphone>
+      <string>&#xE10F</string>
+    </iphone>
   </set>
   <set>
     <no>152</no>
     <jphone>
       <string>$Gy</string>
     </jphone>
+    <iphone>
+      <string>&#xE334</string>
+    </iphone>
   </set>
   <set>
     <no>153</no>
     <jphone>
       <string>$G-</string>
     </jphone>
+    <iphone>
+      <string>&#xE00D</string>
+    </iphone>
   </set>
   <set>
     <no>154</no>
     <jphone>
       <string>$O1</string>
     </jphone>
+    <iphone>
+      <string>&#xE311</string>
+    </iphone>
   </set>
   <set>
     <no>155</no>
     <jphone>
       <string>$G^</string>
     </jphone>
+    <iphone>
+      <string>&#xE326</string>
+    </iphone>
   </set>
   <set>
     <no>156</no>
     <jphone>
       <string>$FS</string>
     </jphone>
+    <iphone>
+      <string>&#xE238</string>
+    </iphone>
   </set>
   <set>
     <no>157</no>
     <jphone>
       <string>$E\</string>
     </jphone>
+    <iphone>
+      <string>&#xE13C</string>
+    </iphone>
   </set>
   <set>
     <no>158</no>
     <jphone>
       <string>$GA</string>
     </jphone>
+    <iphone>
+      <string>&#xE021</string>
+    </iphone>
   </set>
   <set>
     <no>159</no>
     <jphone>
       <string>$G@</string>
     </jphone>
+    <iphone>
+      <string>raw:!?</string>
+    </iphone>
   </set>
   <set>
     <no>160</no>
     <jphone>
       <string>$GA</string>
     </jphone>
+    <iphone>
+      <string>raw:!!</string>
+    </iphone>
   </set>
   <set>
     <no>161</no>
     <jphone>
       <string>$Ft</string>
     </jphone>
+    <iphone>
+      <string>raw:\83°</string>
+    </iphone>
   </set>
   <set>
     <no>162</no>
     <jphone>
       <string>$E(</string>
     </jphone>
+    <iphone>
+      <string>&#xE331</string>
+    </iphone>
   </set>
   <set>
     <no>163</no>
     <jphone>
       <string>$E(</string>
     </jphone>
+    <iphone>
+      <string>&#xE331</string>
+    </iphone>
   </set>
   <set>
     <no>164</no>
     <jphone>
       <string>$E5</string>
     </jphone>
+    <iphone>
+      <string>&#xE330</string>
+    </iphone>
   </set>
   <set>
     <no>165</no>
       <D>0</D>
     </ezweb>
     <jphone>
-      <string></string>
+      <string>raw:\81`</string>
     </jphone>
+    <iphone>
+      <string>raw:\81`</string>
+    </iphone>
   </set>
   <set>
     <no>166</no>
       <D>0</D>
     </ezweb>
     <jphone>
-      <string></string>
+      <string>raw:\81`</string>
     </jphone>
+    <iphone>
+      <string>raw:\81`</string>
+    </iphone>
   </set>
   <set>
     <no>167</no>
     <jphone>
       <string>$OD</string>
     </jphone>
+    <iphone>
+      <string>&#xE324</string>
+    </iphone>
   </set>
   <set>
     <no>168</no>
     <jphone>
       <string>$EO</string>
     </jphone>
+    <iphone>
+      <string>raw:[\82Ó\82­\82ë]</string>
+    </iphone>
   </set>
   <set>
     <no>169</no>
     <jphone>
       <string>$O!</string>
     </jphone>
+    <iphone>
+      <string>raw:[\83y\83\93]</string>
+    </iphone>
   </set>
   <set>
     <no>170</no>
       <D>236</D>
     </ezweb>
     <jphone>
-      <string></string>
+      <string>raw:[\90l\89e]</string>
     </jphone>
+    <iphone>
+      <string>raw:[\90l\89e]</string>
+    </iphone>
   </set>
   <set>
     <no>171</no>
     <jphone>
       <string>$E?</string>
     </jphone>
+    <iphone>
+      <string>&#xE11F</string>
+    </iphone>
   </set>
   <set>
     <no>172</no>
     <jphone>
       <string>$Gl</string>
     </jphone>
+    <iphone>
+      <string>&#xE44B</string>
+    </iphone>
   </set>
   <set>
     <no>173</no>
       <D>105</D>
     </ezweb>
     <jphone>
-      <string></string>
+      <string>raw:[soon]</string>
     </jphone>
+    <iphone>
+      <string>raw:[soon]</string>
+    </iphone>
   </set>
   <set>
     <no>174</no>
       <D>0</D>
     </ezweb>
     <jphone>
-      <string></string>
+      <string>raw:[soon]</string>
     </jphone>
+    <iphone>
+      <string>raw:[on]</string>
+    </iphone>
   </set>
   <set>
     <no>175</no>
       <D>0</D>
     </ezweb>
     <jphone>
-      <string></string>
+      <string>raw:[end]</string>
     </jphone>
+    <iphone>
+      <string>raw:[end]</string>
+    </iphone>
   </set>
   <set>
     <no>176</no>
     <jphone>
       <string>$GD</string>
     </jphone>
+    <iphone>
+      <string>&#xE02D</string>
+    </iphone>
   </set>
 
   <!-- \8ag\92£\8aG\95\8e\9a -->
     <jphone>
       <string>$QX</string>
     </jphone>
+    <iphone>
+      <string>raw:[i±ÌßØ]</string>
+    </iphone>
   </set>
   <!-- \8ag2 -->
   <set>
     <jphone>
       <string>$QX</string>
     </jphone>
+    <iphone>
+      <string>raw:[i±ÌßØ]</string>
+    </iphone>
   </set>
   <!-- \8ag3 -->
   <set>
     <jphone>
       <string>$G&</string>
     </jphone>
+    <iphone>
+      <string>&#xE006</string>
+    </iphone>
   </set>
   <!-- \8ag4 -->
   <set>
     <jphone>
       <string>$OC</string><!-- \97Ç\82¢\82à\82Ì\82ª\96³\82¢\82Ì\82Å\83u\83\89\83\93\83h\83o\83b\83N -->
     </jphone>
+    <iphone>
+      <string>&#xE323</string>
+    </iphone>
   </set>
   <!-- \8ag5 -->
   <set>
     <jphone>
       <string>$O&lt;</string><!-- \8cû\8dg -->
     </jphone>
+    <iphone>
+      <string>&#xE31C</string>
+    </iphone>
   </set>
   <!-- \8ag6 -->
   <set>
     <jphone>
       <string>$G&</string><!-- \97Ç\82¢\82à\82Ì\82ª\96³\82¢\82Ì\82Å\97m\95\9e -->
     </jphone>
+    <iphone>
+      <string>&#xE006</string>
+    </iphone>
   </set>
   <!-- \8ag7 -->
   <set>
     <jphone>
       <string>$G3</string><!-- \97Ç\82¢\82à\82Ì\82ª\96³\82¢\82Ì\82Å\83X\83L\81[ -->
     </jphone>
+    <iphone>
+      <string>&#xE013</string>
+    </iphone>
   </set>
   <!-- \8ag8 -->
   <set>
     <jphone>
       <string>$OE</string><!-- \82·\82¸ -->
     </jphone>
+    <iphone>
+      <string>&#xE037</string><!-- \8b³\89ï -->
+    </iphone>
   </set>
   <!-- \8ag9 -->
   <set>
     <jphone>
       <string>$GV</string><!-- \89Æ -->
     </jphone>
+    <iphone>
+      <string>&#xE036</string><!-- \89Æ -->
+    </iphone>
   </set>
   <!-- \8ag10 -->
   <set>
     <jphone>
       <string>$EO</string><!-- \8fÜ\8bà -->
     </jphone>
+    <iphone>
+      <string>&#xE12F</string><!-- \8fÜ\8bà -->
+    </iphone>
   </set>
   <!-- \8ag11 -->
   <set>
     <jphone>
       <string>$G,</string><!-- \83p\83\\83R\83\93 -->
     </jphone>
+    <iphone>
+      <string>&#xE00C</string><!-- \83p\83\\83R\83\93 -->
+    </iphone>
   </set>
   <!-- \8ag12 -->
   <set>
     <jphone>
       <string>$E#</string><!-- \83\81\81[\83\8b\88\90æ -->
     </jphone>
+    <iphone>
+      <string>&#xE103</string><!-- \83\81\81[\83\8bto -->
+    </iphone>
   </set>
   <!-- \8ag13 -->
   <set>
       <D>152</D><!-- \83\8c\83\93\83` -->
     </ezweb>
     <jphone>
-      <string>$QX</string><!-- \97Ç\82¢\82à\82Ì\82ª\82È\82¢\82Ì\82ÅJs\83}\81[\83N -->
+      <string>raw:[\83\8c\83\93\83`]</string><!-- \97Ç\82¢\82à\82Ì\82ª\82È\82¢\82Ì\82ÅJs\83}\81[\83N -->
     </jphone>
+    <iphone>
+      <string>raw:[\83\8c\83\93\83`]</string>
+    </iphone>
   </set>
   <!-- \8ag14 -->
   <set>
     <jphone>
       <string>$O!</string><!-- \97Ç\82¢\82à\82Ì\82ª\82È\82¢\82Ì\82Å\83\81\83\82 -->
     </jphone>
+    <iphone>
+      <string>&#xE301</string>
+    </iphone>
   </set>
   <!-- \8ag15 -->
   <set>
     <jphone>
       <string>$E.</string><!-- \89¤\8a¥ -->
     </jphone>
+    <iphone>
+      <string>&#xE10E</string>
+    </iphone>
   </set>
   <!-- \8ag16 -->
   <set>
     <jphone>
       <string>$GT</string><!-- \8ew\97Ö -->
     </jphone>
+    <iphone>
+      <string>&#xE034</string>
+    </iphone>
   </set>
   <!-- \8ag17 -->
   <set>
     <jphone>
       <string>$GF</string><!-- \97Ç\82¢\82à\82Ì\82ª\82È\82¢\82Ì\82Å\8e\9e\8cv -->
     </jphone>
+    <iphone>
+      <string>&#xE02D</string><!-- \8e\9e\8cv -->
+    </iphone>
   </set>
   <!-- \8ag18 -->
   <set>
     <jphone>
       <string>$EV</string><!-- \97Ç\82¢\82à\82Ì\82ª\82È\82¢\82Ì\82Å\8b£\97Ö -->
     </jphone>
+    <iphone>
+      <string>&#xE136</string><!-- \8e©\93]\8eÔ -->
+    </iphone>
   </set>
   <!-- \8ag19 -->
   <set>
     <jphone>
       <string>$Ge</string><!-- \83R\81[\83q\81[ -->
     </jphone>
+    <iphone>
+      <string>&#xE045</string><!-- \83R\81[\83q\81[ -->
+    </iphone>
   </set>
   <!-- \8ag20 -->
   <set>
     <jphone>
       <string>$GF</string><!-- \8e\9e\8cv -->
     </jphone>
+    <iphone>
+      <string>&#xE02D</string><!-- \8e\9e\8cv -->
+    </iphone>
   </set>
   <!-- \8ag21 -->
   <set>
     <jphone>
       <string>$E(</string><!-- \97Ç\82¢\82à\82Ì\82ª\82È\82¢\82Ì\82Å\81A\83^\83\89\81[ -->
     </jphone>
+    <iphone>
+      <string>&#xE406</string>
+    </iphone>
   </set>
   <!-- \8ag22 -->
   <set>
     <jphone>
       <string>$E(</string><!-- \97Ç\82¢\82à\82Ì\82ª\82È\82¢\82Ì\82Å\81A\83^\83\89\81[ -->
     </jphone>
+    <iphone>
+      <string>&#xE401</string>
+    </iphone>
   </set>
   <!-- \8ag23 -->
   <set>
     <jphone>
       <string>$E(</string><!-- \97Ç\82¢\82à\82Ì\82ª\82È\82¢\82Ì\82Å\81A\83^\83\89\81[ -->
     </jphone>
+    <iphone>
+      <string>&#xE401</string>
+    </iphone>
   </set>
   <!-- \8ag24 -->
   <set>
     <jphone>
       <string>$P/</string><!-- \97â\8a¾ -->
     </jphone>
+    <iphone>
+      <string>&#xE40F</string>
+    </iphone>
   </set>
   <!-- \8ag25 -->
   <set>
     <jphone>
       <string>$Gy</string><!-- \97Ç\82¢\82à\82Ì\82ª\82È\82¢\82Ì\82Å\81A\93{ -->
     </jphone>
+    <iphone>
+      <string>&#xE416</string>
+    </iphone>
   </set>
   <!-- \8ag26 -->
   <set>
     <jphone>
       <string>$P.</string><!-- \97Ç\82¢\82à\82Ì\82ª\82È\82¢\82Ì\82Å\81A\82µ\82ç\82¯\8aç -->
     </jphone>
+    <iphone>
+      <string>&#xE40E</string>
+    </iphone>
   </set>
   <!-- \8ag27 -->
   <set>
     <jphone>
       <string>$E&</string><!-- \83\89\83u\83\89\83u -->
     </jphone>
+    <iphone>
+      <string>&#xE106</string>
+    </iphone>
   </set>
   <!-- \8ag28 -->
   <set>
     <jphone>
       <string>$G.</string><!-- GOOD! -->
     </jphone>
+    <iphone>
+      <string>&#xE00E</string>
+    </iphone>
   </set>
   <!-- \8ag29 -->
   <set>
     <jphone>
       <string>$P)</string><!-- \82 \82Á\82©\82ñ\82×\82¦ -->
     </jphone>
+    <iphone>
+      <string>&#xE105</string>
+    </iphone>
   </set>
   <!-- \8ag30 -->
   <set>
     <jphone>
       <string>$P8</string><!-- \93\8a\82°\83L\83b\83X -->
     </jphone>
+    <iphone>
+      <string>&#xE418</string>
+    </iphone>
   </set>
   <!-- \8ag31 -->
   <set>
     <jphone>
       <string>$Gw</string><!-- \8aì -->
     </jphone>
+    <iphone>
+      <string>&#xE057</string>
+    </iphone>
   </set>
   <!-- \8ag32 -->
   <set>
     <jphone>
       <string>$P6</string><!-- \97Ç\82¢\82à\82Ì\82ª\82È\82¢\82Ì\82Å\81A\82ß\82¿\82á\82ß\82¿\82á\93{\82Á\82Ä\82¢\82é -->
     </jphone>
+    <iphone>
+      <string>&#xE059</string>
+    </iphone>
   </set>
   <!-- \8ag33 -->
   <set>
     <jphone>
       <string>$Go</string><!-- \82Ë\82± -->
     </jphone>
+    <iphone>
+      <string>&#xE051</string>
+    </iphone>
   </set>
   <!-- \8ag34 -->
   <set>
     <jphone>
       <string>$P1</string><!-- \8b\83\82« -->
     </jphone>
+    <iphone>
+      <string>&#xE411</string>
+    </iphone>
   </set>
   <!-- \8ag35 -->
   <set>
     <jphone>
       <string>$P1</string><!-- \8b\83\82« -->
     </jphone>
+    <iphone>
+      <string>&#xE411</string>
+    </iphone>
   </set>
   <!-- \8ag36 -->
   <set>
     <jphone>
       <string>$OS</string><!-- \81~ -->
     </jphone>
+    <iphone>
+      <string>&#xE333</string>
+    </iphone>
   </set>
   <!-- \8ag37 -->
   <set>
     <jphone>
       <string>$O!</string><!-- \97Ç\82¢\82à\82Ì\82ª\82È\82¢\82Ì\82Å\81A\83\81\83\82 -->
     </jphone>
+    <iphone>
+      <string>&#xE301</string>
+    </iphone>
   </set>
   <!-- \8ag38 -->
   <set>
     <jphone>
       <string>$Fn</string><!-- \92\98\8dì\8c  -->
     </jphone>
+    <iphone>
+      <string>&#xE24E</string>
+    </iphone>
   </set>
   <!-- \8ag39 -->
   <set>
     <jphone>
       <string>$QW</string><!-- TM -->
     </jphone>
+    <iphone>
+      <string>&#xE537</string>
+    </iphone>
   </set>
   <!-- \8ag40 -->
   <set>
     <jphone>
       <string>$E5</string><!-- \97¤\8fã -->
     </jphone>
+    <iphone>
+      <string>&#xE115</string>
+    </iphone>
   </set>
   <!-- \8ag41 -->
   <set>
     <jphone>
       <string>$O5</string><!-- \83}\83\8b\94é -->
     </jphone>
+    <iphone>
+      <string>&#xE315</string>
+    </iphone>
   </set>
   <!-- \8ag42 -->
   <set>
     <jphone>
       <string>$OK</string><!-- \97Ç\82¢\82à\82Ì\82ª\82È\82¢\82Ì\82Å\81A\83n\81[\83g\97Π-->
     </jphone>
+    <iphone>
+      <string>&#xE32B</string>
+    </iphone>
   </set>
   <!-- \8ag43 -->
   <set>
     <jphone>
       <string>$Fo</string><!-- \8f¤\95W\93o\98^ -->
     </jphone>
+    <iphone>
+      <string>&#xE24F</string>
+    </iphone>
   </set>
   <!-- \8ag44 -->
   <set>
     <jphone>
       <string>$Fr</string><!-- \82²\92\8d\88Ó -->
     </jphone>
+    <iphone>
+      <string>&#xE252</string>
+    </iphone>
   </set>
   <!-- \8ag45 -->
   <set>
     <jphone>
       <string>$OS</string><!-- \97Ç\82¢\82à\82Ì\82ª\82È\82¢\82Ì\82Å\81A\81~ -->
     </jphone>
+    <iphone>
+      <string>&#xE333</string>
+    </iphone>
   </set>
   <!-- \8ag46 -->
   <set>
     <jphone>
       <string>$FK</string><!-- \8bó\90È -->
     </jphone>
+    <iphone>
+      <string>&#xE22B</string>
+    </iphone>
   </set>
   <!-- \8ag47 -->
   <set>
     <jphone>
       <string>$O-</string><!-- \97Ç\82¢\82à\82Ì\82ª\82È\82¢\82Ì\82Å\81A\8fj -->
     </jphone>
+    <iphone>
+      <string>&#xE30D</string>
+    </iphone>
   </set>
   <!-- \8ag48 -->
   <set>
     <jphone>
       <string>$FJ</string><!-- \96\9e\90È -->
     </jphone>
+    <iphone>
+      <string>&#xE22A</string>
+    </iphone>
   </set>
   <!-- \8ag49 -->
   <set>
       <D>808</D><!-- \8d\89E\97¼\95û\8cü\96î\88ó -->
     </ezweb>
     <jphone>
-      <string>$QX</string><!-- \97Ç\82¢\82à\82Ì\82ª\82È\82¢\82Ì\82Å\81AJs\83}\81[\83N -->
+      <string>raw:[\8d\89E]</string><!-- \97Ç\82¢\82à\82Ì\82ª\82È\82¢\82Ì\82Å\81AJs\83}\81[\83N -->
     </jphone>
+    <iphone>
+      <string>raw:[\8d\89E]</string>
+    </iphone>
   </set>
   <!-- \8ag50 -->
   <set>
       <D>809</D><!-- \8fã\89º\97¼\95û\8cü\96î\88ó -->
     </ezweb>
     <jphone>
-      <string>$QX</string><!-- \97Ç\82¢\82à\82Ì\82ª\82È\82¢\82Ì\82Å\81AJs\83}\81[\83N -->
+      <string>raw:[\8fã\89º]</string><!-- \97Ç\82¢\82à\82Ì\82ª\82È\82¢\82Ì\82Å\81AJs\83}\81[\83N -->
     </jphone>
+    <iphone>
+      <string>raw:[\8fã\89º]</string>
+    </iphone>
   </set>
   <!-- \8ag51 -->
   <set>
     <jphone>
       <string>$Ew</string><!-- \8aw\8dZ -->
     </jphone>
+    <iphone>
+      <string>&#xE157</string>
+    </iphone>
   </set>
   <!-- \8ag52 -->
   <set>
     <jphone>
       <string>$P^</string><!-- \94g\82ª\83U\81[\83\93 -->
     </jphone>
+    <iphone>
+      <string>&#xE43E</string>
+    </iphone>
   </set>
   <!-- \8ag53 -->
   <set>
     <jphone>
       <string>$G[</string><!-- \8eR -->
     </jphone>
+    <iphone>
+      <string>&#xE03B</string>
+    </iphone>
   </set>
   <!-- \8ag54 -->
   <set>
     <jphone>
       <string>$E0</string><!-- \82æ\82Â\82Π-->
     </jphone>
+    <iphone>
+      <string>&#xE110</string>
+    </iphone>
   </set>
   <!-- \8ag55 -->
   <set>
     <jphone>
       <string>$Oe</string><!-- \97Ç\82¢\82à\82Ì\82ª\82È\82¢\82Ì\82Å\81A\82è\82ñ\82² -->
     </jphone>
+    <iphone>
+      <string>&#xE345</string>
+    </iphone>
   </set>
   <!-- \8ag56 -->
   <set>
     <jphone>
       <string>$O$</string><!-- \83`\83\85\81[\83\8a\83b\83v -->
     </jphone>
+    <iphone>
+      <string>&#xE304</string>
+    </iphone>
   </set>
   <!-- \8ag57 -->
   <set>
     <jphone>
       <string>$Oh</string><!-- \97Ç\82¢\82à\82Ì\82ª\82È\82¢\82Ì\82Å\81A\83X\83C\83J -->
     </jphone>
+    <iphone>
+      <string>&#xE348</string>
+    </iphone>
   </set>
   <!-- \8ag58 -->
   <set>
     <jphone>
       <string>$Oe</string><!-- \82è\82ñ\82² -->
     </jphone>
+    <iphone>
+      <string>&#xE345</string>
+    </iphone>
   </set>
   <!-- \8ag59 -->
   <set>
     <jphone>
       <string>$E0</string><!-- \97Ç\82¢\82à\82Ì\82ª\82È\82¢\82Ì\82Å\81A\82æ\82Â\82Π-->
     </jphone>
+    <iphone>
+      <string>&#xE110</string>
+    </iphone>
   </set>
   <!-- \8ag60 -->
   <set>
     <jphone>
       <string>$E8</string><!-- \82à\82Ý\82¶ -->
     </jphone>
+    <iphone>
+      <string>&#xE118</string>
+    </iphone>
   </set>
   <!-- \8ag61 -->
   <set>
     <jphone>
       <string>$GP</string><!-- \82¨\89Ô\8c© -->
     </jphone>
+    <iphone>
+      <string>&#xE030</string>
+    </iphone>
   </set>
   <!-- \8ag62 -->
   <set>
     <jphone>
       <string>$Ob</string><!-- \82¨\82É\82¬\82è -->
     </jphone>
+    <iphone>
+      <string>&#xE342</string>
+    </iphone>
   </set>
   <!-- \8ag63 -->
   <set>
     <jphone>
       <string>$Gf</string><!-- \83P\81[\83L -->
     </jphone>
+    <iphone>
+      <string>&#xE046</string>
+    </iphone>
   </set>
   <!-- \8ag64 -->
   <set>
     <jphone>
       <string>$O+</string><!-- \94Ó\8eÞ -->
     </jphone>
+    <iphone>
+      <string>&#xE30B</string>
+    </iphone>
   </set>
   <!-- \8ag65 -->
   <set>
     <jphone>
       <string>$O`</string><!-- \97Ç\82¢\82à\82Ì\82ª\82È\82¢\82Ì\82Å\81A\83\89\81[\83\81\83\93 -->
     </jphone>
+    <iphone>
+      <string>&#xE340</string>
+    </iphone>
   </set>
   <!-- \8ag66 -->
   <set>
     <jphone>
       <string>$OY</string><!-- \83p\83\93 -->
     </jphone>
+    <iphone>
+      <string>&#xE339</string>
+    </iphone>
   </set>
   <!-- \8ag67 -->
   <set>
       <D>812</D><!-- \82©\82½\82Â\82Þ\82è -->
     </ezweb>
     <jphone>
-      <string>$QX</string><!-- \97Ç\82¢\82à\82Ì\82ª\82È\82¢\82Ì\82Å\81AJs\83}\81[\83N -->
+      <string>raw:[\82©\82½\82Â\82Þ\82è]</string><!-- \97Ç\82¢\82à\82Ì\82ª\82È\82¢\82Ì\82Å\81AJs\83}\81[\83N -->
     </jphone>
+    <iphone>
+      <string>raw:[\82©\82½\82Â\82Þ\82è]</string>
+    </iphone>
   </set>
   <!-- \8ag68 -->
   <set>
     <jphone>
       <string>$QC</string><!-- \82Ð\82æ\82± -->
     </jphone>
+    <iphone>
+      <string>&#xE523</string>
+    </iphone>
   </set>
   <!-- \8ag69 -->
   <set>
     <jphone>
       <string>$Gu</string><!-- \83y\83\93\83M\83\93 -->
     </jphone>
+    <iphone>
+      <string>&#xE055</string>
+    </iphone>
   </set>
   <!-- \8ag70 -->
   <set>
     <jphone>
       <string>$G9</string><!-- \8b\9b -->
     </jphone>
+    <iphone>
+      <string>&#xE019</string>
+    </iphone>
   </set>
   <!-- \8ag71 -->
   <set>
     <jphone>
       <string>$Gw</string><!-- \97Ç\82¢\82à\82Ì\82ª\82È\82¢\82Ì\82Å\81A\8aì -->
     </jphone>
+    <iphone>
+      <string>&#xE056</string>
+    </iphone>
   </set>
   <!-- \8ag72 -->
   <set>
     <jphone>
       <string>$E%</string><!-- \97Ç\82¢\82à\82Ì\82ª\82È\82¢\82Ì\82Å\81A\83A\83J\83\93\83x\81[ -->
     </jphone>
+    <iphone>
+      <string>&#xE409</string>
+    </iphone>
   </set>
   <!-- \8ag73 -->
   <set>
     <jphone>
       <string>$G:</string><!-- \82¤\82Ü -->
     </jphone>
+    <iphone>
+      <string>&#xE01A</string>
+    </iphone>
   </set>
   <!-- \8ag74 -->
   <set>
     <jphone>
       <string>$E+</string><!-- \82Ô\82½ -->
     </jphone>
+    <iphone>
+      <string>&#xE10B</string>
+    </iphone>
   </set>
   <!-- \8ag75 -->
   <set>
     <jphone>
       <string>$Gd</string><!-- \83J\83N\83e\83\8b -->
     </jphone>
+    <iphone>
+      <string>&#xE044</string>
+    </iphone>
   </set>
   <!-- \8ag76 -->
   <set>
     <jphone>
       <string>$P+</string><!-- \97Ç\82¢\82à\82Ì\82ª\82È\82¢\82Ì\82Å\81A\82°\82ë\82°\82ë -->
     </jphone>
+    <iphone>
+      <string>&#xE40B</string>
+    </iphone>
   </set>
 </emoji>
diff --git a/include/chxj_iphone.h b/include/chxj_iphone.h
new file mode 100644 (file)
index 0000000..28600da
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2005-2009 Atsushi Konno All rights reserved.
+ * Copyright (C) 2005 QSDN,Inc. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef __CHXJ_IPHONE_H__
+#define __CHXJ_IPHONE_H__
+
+/* #define DUMP_IPHONE "" */
+
+#include "mod_chxj.h"
+#include "chxj_cookie.h"
+#include "chxj_css.h"
+
+/*----------------------------------------------------------------------------*/
+/* Structure for J-PHONE HTML                                                 */
+/*----------------------------------------------------------------------------*/
+typedef struct iphone_t iphone_t;
+
+struct iphone_t {
+  Doc                 *doc;
+  char                *out;
+  int                 out_len;
+  int                 pre_flag;
+  int                 textarea_flag;
+  int                 h1_align_flag;
+  int                 h2_align_flag;
+  int                 h3_align_flag;
+  int                 h4_align_flag;
+  int                 h5_align_flag;
+  int                 h6_align_flag;
+  int                 font_flag;
+  int                 font_size_flag;
+  int                 start_html_flag;
+  char                *prev_style_data;
+  char                *style_data;
+
+  device_table        *spec;
+  mod_chxj_config     *conf;
+  chxjconvrule_entry  *entryp;
+  cookie_t            *cookie;
+  css_stylesheet_t    *style;
+  css_prop_list_stack_t *css_prop_stack;
+
+  int head_tag_out; /* 1 if <head> out */
+  int blink_keyframe_out; 
+};
+
+typedef struct _iphone_flags_t iphone_flags_t;
+struct _iphone_flags_t {
+  int with_font_flag;
+  int with_blink_flag;
+  int font_color_flag;
+  int font_size_flag;
+  int with_div_flag;
+};
+
+/*----------------------------------------------------------------------------*/
+/* Prototype                                                                  */
+/*----------------------------------------------------------------------------*/
+extern char *chxj_convert_iphone(
+  request_rec               *r,
+  device_table              *spec,
+  const char                *src,
+  apr_size_t                srclen,
+  apr_size_t                *dstlen,
+  chxjconvrule_entry        *entryp,
+  cookie_t                  *cookie);
+
+
+extern char *chxj_iphone_emoji_only_converter(request_rec *r, device_table *spec, const char *src, apr_size_t len);
+
+#endif
index ca955cb..d697d09 100755 (executable)
@@ -30,12 +30,17 @@ typedef enum {
   CHXJ_SPEC_Hdml,
   CHXJ_SPEC_Jhtml,
   CHXJ_SPEC_Jxhtml,    /* use XHTML */
+  CHXJ_SPEC_iPhone2,   /* use XHTML */
+  CHXJ_SPEC_iPhone3,   /* use XHTML */
+  CHXJ_SPEC_iPhone4,   /* use XHTML */
   CHXJ_SPEC_HTML,
 } spec_type;
 
 #define CHXJ_PIC_OK                (0x01)
 #define CHXJ_PIC_NG                (0x00)
 
+#define IS_IPHONE(X) (((X) == CHXJ_SPEC_iPhone2) || ((X) == CHXJ_SPEC_iPhone3) || ((X) == CHXJ_SPEC_iPhone4))
+
 #include "mod_chxj.h"
 #include "chxj_cookie.h"
 
index 0047f21..f7dd1e3 100755 (executable)
@@ -189,6 +189,12 @@ struct jphone_emoji_t {
   char* string;
 };
 
+typedef struct iphone_emoji_t iphone_emoji_t;
+
+struct iphone_emoji_t {
+  char* string;
+};
+
 typedef struct emoji_t emoji_t;
 
 struct emoji_t {
@@ -197,6 +203,7 @@ struct emoji_t {
   imode_emoji_t*   imode;
   ezweb_emoji_t*   ezweb;
   jphone_emoji_t*  jphone;
+  iphone_emoji_t*  iphone;
 };
 
 typedef struct chxjconvrule_entry chxjconvrule_entry;
@@ -377,6 +384,9 @@ struct mod_chxj_config {
   int                   image_rewrite;
   char                  *image_rewrite_url;
   int                   image_rewrite_mode;
+
+  int                   use_emoji_image;
+  char                  *emoji_image_url;
 };
 
 struct mod_chxj_req_config_t {
@@ -523,6 +533,7 @@ extern tag_handler  xhtml_handler[];
 extern tag_handler  hdml_handler[];
 extern tag_handler  jhtml_handler[];
 extern tag_handler  jxhtml_handler[];
+extern tag_handler  iphone_handler[];
 
 extern char* chxj_node_convert( 
   device_table *spec,
index 4f50980..299492f 100644 (file)
@@ -22,6 +22,7 @@ libmod_chxj_la_SOURCES = mod_chxj.c \
     chxj_ixhtml10.c \
     chxj_jhtml.c \
     chxj_jxhtml.c \
+    chxj_iphone.c \
     chxj_str_util.c  \
     chxj_img_conv.c  \
     chxj_dump.c \
index c6c80ed..2c4d788 100644 (file)
@@ -84,7 +84,8 @@ am_libmod_chxj_la_OBJECTS = libmod_chxj_la-mod_chxj.lo \
        libmod_chxj_la-chxj_chtml20.lo libmod_chxj_la-chxj_chtml30.lo \
        libmod_chxj_la-chxj_chtml40.lo libmod_chxj_la-chxj_chtml50.lo \
        libmod_chxj_la-chxj_ixhtml10.lo libmod_chxj_la-chxj_jhtml.lo \
-       libmod_chxj_la-chxj_jxhtml.lo libmod_chxj_la-chxj_str_util.lo \
+       libmod_chxj_la-chxj_jxhtml.lo libmod_chxj_la-chxj_iphone.lo \
+       libmod_chxj_la-chxj_str_util.lo \
        libmod_chxj_la-chxj_img_conv.lo libmod_chxj_la-chxj_dump.lo \
        libmod_chxj_la-chxj_img_conv_format.lo \
        libmod_chxj_la-chxj_qr_code.lo libmod_chxj_la-chxj_calc_ecc.lo \
@@ -277,6 +278,7 @@ libmod_chxj_la_SOURCES = mod_chxj.c \
     chxj_ixhtml10.c \
     chxj_jhtml.c \
     chxj_jxhtml.c \
+    chxj_iphone.c \
     chxj_str_util.c  \
     chxj_img_conv.c  \
     chxj_dump.c \
@@ -421,6 +423,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmod_chxj_la-chxj_header_inf.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmod_chxj_la-chxj_img_conv.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmod_chxj_la-chxj_img_conv_format.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmod_chxj_la-chxj_iphone.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmod_chxj_la-chxj_ixhtml10.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmod_chxj_la-chxj_jhtml.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmod_chxj_la-chxj_jreserved_tag.Plo@am__quote@
@@ -622,6 +625,13 @@ libmod_chxj_la-chxj_jxhtml.lo: chxj_jxhtml.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmod_chxj_la_CFLAGS) $(CFLAGS) -c -o libmod_chxj_la-chxj_jxhtml.lo `test -f 'chxj_jxhtml.c' || echo '$(srcdir)/'`chxj_jxhtml.c
 
+libmod_chxj_la-chxj_iphone.lo: chxj_iphone.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmod_chxj_la_CFLAGS) $(CFLAGS) -MT libmod_chxj_la-chxj_iphone.lo -MD -MP -MF $(DEPDIR)/libmod_chxj_la-chxj_iphone.Tpo -c -o libmod_chxj_la-chxj_iphone.lo `test -f 'chxj_iphone.c' || echo '$(srcdir)/'`chxj_iphone.c
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libmod_chxj_la-chxj_iphone.Tpo $(DEPDIR)/libmod_chxj_la-chxj_iphone.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='chxj_iphone.c' object='libmod_chxj_la-chxj_iphone.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmod_chxj_la_CFLAGS) $(CFLAGS) -c -o libmod_chxj_la-chxj_iphone.lo `test -f 'chxj_iphone.c' || echo '$(srcdir)/'`chxj_iphone.c
+
 libmod_chxj_la-chxj_str_util.lo: chxj_str_util.c
 @am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmod_chxj_la_CFLAGS) $(CFLAGS) -MT libmod_chxj_la-chxj_str_util.lo -MD -MP -MF $(DEPDIR)/libmod_chxj_la-chxj_str_util.Tpo -c -o libmod_chxj_la-chxj_str_util.lo `test -f 'chxj_str_util.c' || echo '$(srcdir)/'`chxj_str_util.c
 @am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libmod_chxj_la-chxj_str_util.Tpo $(DEPDIR)/libmod_chxj_la-chxj_str_util.Plo
index f3eaec9..a025813 100644 (file)
@@ -40,6 +40,9 @@ chxj_add_device_env(request_rec *r, device_table *spec)
     break;
   case CHXJ_SPEC_Jhtml:
   case CHXJ_SPEC_Jxhtml:
+  case CHXJ_SPEC_iPhone2:
+  case CHXJ_SPEC_iPhone3:
+  case CHXJ_SPEC_iPhone4:
     apr_table_setn(r->headers_in, HTTP_X_CHXJ_PROVIDER, "3");
     apr_table_setn(r->headers_in, HTTP_X_CHXJ_PROVIDER_STRING, "SoftBank");
     break;
@@ -64,6 +67,9 @@ chxj_add_device_env(request_rec *r, device_table *spec)
   case CHXJ_SPEC_Hdml:             apr_table_setn(r->headers_in, HTTP_X_CHXJ_HTMLSPECTYPE, "HDML");     break;
   case CHXJ_SPEC_Jhtml:            apr_table_setn(r->headers_in, HTTP_X_CHXJ_HTMLSPECTYPE, "JHTML");    break;
   case CHXJ_SPEC_Jxhtml:           apr_table_setn(r->headers_in, HTTP_X_CHXJ_HTMLSPECTYPE, "JXHTML");   break;
+  case CHXJ_SPEC_iPhone2:          apr_table_setn(r->headers_in, HTTP_X_CHXJ_HTMLSPECTYPE, "iPhone2");  break;
+  case CHXJ_SPEC_iPhone3:          apr_table_setn(r->headers_in, HTTP_X_CHXJ_HTMLSPECTYPE, "iPhone3");  break;
+  case CHXJ_SPEC_iPhone4:          apr_table_setn(r->headers_in, HTTP_X_CHXJ_HTMLSPECTYPE, "iPhone4");  break;
   default:                         apr_table_setn(r->headers_in, HTTP_X_CHXJ_HTMLSPECTYPE, "UNKNOWN");  break;
   }
 
@@ -155,6 +161,15 @@ chxj_get_device_env(request_rec *r)
   else if (STRCASEEQ('j','j', "JXHTML", tmp)) {
     spec->html_spec_type = CHXJ_SPEC_Jxhtml;
   }
+  else if (STRCASEEQ('j','j', "iPhone2", tmp)) {
+    spec->html_spec_type = CHXJ_SPEC_iPhone2;
+  }
+  else if (STRCASEEQ('j','j', "iPhone3", tmp)) {
+    spec->html_spec_type = CHXJ_SPEC_iPhone3;
+  }
+  else if (STRCASEEQ('j','j', "iPhone4", tmp)) {
+    spec->html_spec_type = CHXJ_SPEC_iPhone4;
+  }
   else {
     spec->html_spec_type = CHXJ_SPEC_UNKNOWN;
   }
index 2a45287..5a49322 100644 (file)
@@ -666,8 +666,14 @@ s_create_cache_file(request_rec          *r,
     int oldw = MagickGetImageWidth(magick_wand);
     int oldh = MagickGetImageHeight(magick_wand);
     int done_fixup_size = 0;
+    int ww = spec->width;
+    int hh = spec->heigh;
+    if (IS_IPHONE(spec->html_spec_type)) {
+      ww = (int)((double)ww * (double)1.5);
+      hh = (int)((double)hh * (double)1.5);
+    }
     if ((qsp->mode == IMG_CONV_MODE_WALLPAPER && spec->wp_width < oldw && spec->wp_heigh < oldh)
-      || (qsp->mode != IMG_CONV_MODE_WALLPAPER && spec->width < oldw && spec->heigh < oldh)) {
+      || (qsp->mode != IMG_CONV_MODE_WALLPAPER && ww < oldw && hh < oldh)) {
       /*
        * The size of the image is changed.
        */
@@ -1106,8 +1112,14 @@ s_create_blob_data(request_rec          *r,
     int oldw = MagickGetImageWidth(magick_wand);
     int oldh = MagickGetImageHeight(magick_wand);
     int done_fixup_size = 0;
+    int ww = spec->width;
+    int hh = spec->heigh;
+    if (IS_IPHONE(spec->html_spec_type)) {
+      ww = (int)((double)ww * (double)1.5);
+      hh = (int)((double)hh * (double)1.5);
+    }
     if ((qsp->mode == IMG_CONV_MODE_WALLPAPER && spec->wp_width < oldw && spec->wp_heigh < oldh)
-      || (qsp->mode != IMG_CONV_MODE_WALLPAPER && spec->width < oldw && spec->heigh < oldh)) {
+      || (qsp->mode != IMG_CONV_MODE_WALLPAPER && ww < oldw && hh < oldh)) {
       /*
        * The size of the image is changed.
        */
@@ -1276,6 +1288,13 @@ s_fixup_size(MagickWand           *magick_wand,
   c_width = spec->width;
   c_heigh = spec->heigh;
 
+  if (IS_IPHONE(spec->html_spec_type)) {
+    c_width = (int)((double)c_width * (double)1.5);
+    c_heigh = (int)((double)c_heigh * (double)1.5);
+    DBG(r,"REQ[%X] detect iphone width=[%d]", TO_ADDR(r),c_width);
+    DBG(r,"REQ[%X] detect iphone heigh=[%d]", TO_ADDR(r),c_heigh);
+  }
+
   switch(mode) {
   case IMG_CONV_MODE_THUMBNAIL:
 
diff --git a/src/chxj_iphone.c b/src/chxj_iphone.c
new file mode 100644 (file)
index 0000000..1fa912f
--- /dev/null
@@ -0,0 +1,7030 @@
+/*
+ * Copyright (C) 2005-2011 Atsushi Konno All rights reserved.
+ * Copyright (C) 2005 QSDN,Inc. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "chxj_iphone.h"
+#include "chxj_hdml.h"
+#include "chxj_dump.h"
+#include "chxj_img_conv.h"
+#include "chxj_qr_code.h"
+#include "chxj_encoding.h"
+#include "chxj_url_encode.h"
+#include "chxj_str_util.h"
+#include "chxj_header_inf.h"
+#include "chxj_jreserved_tag.h"
+#include "chxj_conv_z2h.h"
+
+
+#define GET_IPHONE(X) ((iphone_t *)(X))
+#undef W_L
+#undef W_V
+#define W_L(X)          do { iphone->out = BUFFERED_WRITE_LITERAL(iphone->out, &doc->buf, (X)); } while(0)
+#define W_V(X)          do { iphone->out = (X) ? BUFFERED_WRITE_VALUE(iphone->out, &doc->buf, (X))  \
+                                               : BUFFERED_WRITE_LITERAL(iphone->out, &doc->buf, ""); } while(0)
+#undef W_NLCODE
+#define W_NLCODE()     do { char *nlcode = TO_NLCODE(iphone->conf); W_V(nlcode); } while (0)
+
+#define BLINK_KEYFRAME \
+"@-webkit-keyframes blink {" \
+" 0% {" \
+"   opacity: 1.0;" \
+" }" \
+" 100% {" \
+"   opacity: 0.0;" \
+" }" \
+"}" 
+
+#define STYLE_BLINK \
+"-webkit-animation-name: blink;" \
+"-webkit-animation-duration: 0.6s;" \
+"-webkit-animation-iteration-count:infinite;" \
+"-webkit-animation-timing-function:ease-in-out;" \
+"-webkit-animation-direction: alternate;" \
+"-webkit-animation-delay: 0s;"
+
+
+
+static char *s_iphone_start_html_tag     (void *pdoc, Node *node);
+static char *s_iphone_end_html_tag       (void *pdoc, Node *node);
+static char *s_iphone_start_meta_tag     (void *pdoc, Node *node);
+static char *s_iphone_end_meta_tag       (void *pdoc, Node *node);
+static char *s_iphone_start_head_tag     (void *pdoc, Node *node);
+static char *s_iphone_end_head_tag       (void *pdoc, Node *node);
+static char *s_iphone_start_title_tag    (void *pdoc, Node *node);
+static char *s_iphone_end_title_tag      (void *pdoc, Node *node);
+static char *s_iphone_start_base_tag     (void *pdoc, Node *node);
+static char *s_iphone_end_base_tag       (void *pdoc, Node *node);
+static char *s_iphone_start_body_tag     (void *pdoc, Node *node);
+static char *s_iphone_end_body_tag       (void *pdoc, Node *node);
+static char *s_iphone_start_a_tag        (void *pdoc, Node *node);
+static char *s_iphone_end_a_tag          (void *pdoc, Node *node);
+static char *s_iphone_start_pre_tag      (void *pdoc, Node *node);
+static char *s_iphone_end_pre_tag        (void *pdoc, Node *node);
+static char *s_iphone_start_p_tag        (void *pdoc, Node *node);
+static char *s_iphone_end_p_tag          (void *pdoc, Node *node);
+static char *s_iphone_start_ul_tag       (void *pdoc, Node *node);
+static char *s_iphone_end_ul_tag         (void *pdoc, Node *node);
+static char *s_iphone_start_ol_tag       (void *pdoc, Node *node);
+static char *s_iphone_end_ol_tag         (void *pdoc, Node *node);
+static char *s_iphone_start_li_tag       (void *pdoc, Node *node);
+static char *s_iphone_end_li_tag         (void *pdoc, Node *node);
+static char *s_iphone_start_br_tag       (void *pdoc, Node *node);
+static char *s_iphone_end_br_tag         (void *pdoc, Node *node);
+
+static char *s_iphone_start_table_tag    (void *pdoc, Node *node);
+static char *s_iphone_end_table_tag      (void *pdoc, Node *node);
+static char *s_iphone_start_tr_tag       (void *pdoc, Node *node);
+static char *s_iphone_end_tr_tag         (void *pdoc, Node *node);
+static char *s_iphone_start_td_or_th_tag       (void *pdoc, Node *node,char *tagName);
+static char *s_iphone_end_td_or_th_tag         (void *pdoc, Node *node,char *tagName);
+static char *s_iphone_start_td_tag       (void *pdoc, Node *node);
+static char *s_iphone_end_td_tag         (void *pdoc, Node *node);
+static char *s_iphone_start_th_tag       (void *pdoc, Node *node);
+static char *s_iphone_end_th_tag         (void *pdoc, Node *node);
+
+static char *s_iphone_start_font_tag     (void *pdoc, Node *node);
+static char *s_iphone_end_font_tag       (void *pdoc, Node *node);
+static char *s_iphone_start_form_tag     (void *pdoc, Node *node);
+static char *s_iphone_end_form_tag       (void *pdoc, Node *node);
+static char *s_iphone_start_input_tag    (void *pdoc, Node *node);
+static char *s_iphone_end_input_tag      (void *pdoc, Node *node);
+static char *s_iphone_start_center_tag   (void *pdoc, Node *node);
+static char *s_iphone_end_center_tag     (void *pdoc, Node *node);
+static char *s_iphone_start_hr_tag       (void *pdoc, Node *node);
+static char *s_iphone_end_hr_tag         (void *pdoc, Node *node);
+static char *s_iphone_start_img_tag      (void *pdoc, Node *node);
+static char *s_iphone_end_img_tag        (void *pdoc, Node *node);
+static char *s_iphone_start_select_tag   (void *pdoc, Node *node);
+static char *s_iphone_end_select_tag     (void *pdoc, Node *node);
+static char *s_iphone_start_option_tag   (void *pdoc, Node *node);
+static char *s_iphone_end_option_tag     (void *pdoc, Node *node);
+static char *s_iphone_start_div_tag      (void *pdoc, Node *node);
+static char *s_iphone_end_div_tag        (void *pdoc, Node *node);
+static char *s_iphone_start_textarea_tag (void *pdoc, Node *node);
+static char *s_iphone_end_textarea_tag   (void *pdoc, Node *node);
+static char *s_iphone_start_b_tag        (void *pdoc, Node *node);
+static char *s_iphone_end_b_tag          (void *pdoc, Node *node);
+static char *s_iphone_chxjif_tag         (void *pdoc, Node *node); 
+static char *s_iphone_text_tag           (void *pdoc, Node *node);
+static char *s_iphone_start_blockquote_tag (void *pdoc, Node *node);
+static char *s_iphone_end_blockquote_tag  (void *pdoc, Node *node);
+static char *s_iphone_start_dir_tag      (void *pdoc, Node *node);
+static char *s_iphone_end_dir_tag        (void *pdoc, Node *node);
+static char *s_iphone_start_dl_tag       (void *pdoc, Node *node);
+static char *s_iphone_end_dl_tag         (void *pdoc, Node *node);
+static char *s_iphone_start_dt_tag       (void *pdoc, Node *node);
+static char *s_iphone_end_dt_tag         (void *pdoc, Node *node);
+static char *s_iphone_start_dd_tag       (void *pdoc, Node *node);
+static char *s_iphone_end_dd_tag         (void *pdoc, Node *node);
+static char *s_iphone_start_h1_tag       (void *pdoc, Node *node);
+static char *s_iphone_end_h1_tag         (void *pdoc, Node *node);
+static char *s_iphone_start_h2_tag       (void *pdoc, Node *node);
+static char *s_iphone_end_h2_tag         (void *pdoc, Node *node);
+static char *s_iphone_start_h3_tag       (void *pdoc, Node *node);
+static char *s_iphone_end_h3_tag         (void *pdoc, Node *node);
+static char *s_iphone_start_h4_tag       (void *pdoc, Node *node);
+static char *s_iphone_end_h4_tag         (void *pdoc, Node *node);
+static char *s_iphone_start_h5_tag       (void *pdoc, Node *node);
+static char *s_iphone_end_h5_tag         (void *pdoc, Node *node);
+static char *s_iphone_start_h6_tag       (void *pdoc, Node *node);
+static char *s_iphone_end_h6_tag         (void *pdoc, Node *node);
+static char *s_iphone_start_menu_tag     (void *pdoc, Node *node);
+static char *s_iphone_end_menu_tag       (void *pdoc, Node *node);
+static char *s_iphone_start_plaintext_tag       (void *pdoc, Node *node);
+static char *s_iphone_start_plaintext_tag_inner (void *pdoc, Node *node);
+static char *s_iphone_end_plaintext_tag         (void *pdoc, Node *node);
+static char *s_iphone_start_blink_tag  (void *pdoc, Node *node);
+static char *s_iphone_end_blink_tag    (void *pdoc, Node *node);
+static char *s_iphone_start_marquee_tag (void *pdoc, Node *node);
+static char *s_iphone_end_marquee_tag  (void *pdoc, Node *node);
+static char *s_iphone_newline_mark       (void *pdoc, Node *node);
+static char *s_iphone_link_tag           (void *pdoc, Node *node);
+static char *s_iphone_start_span_tag     (void *pdoc, Node *node);
+static char *s_iphone_end_span_tag       (void *pdoc, Node *node);
+static char *s_iphone_style_tag       (void *pdoc, Node *node);
+static char *s_iphone_start_object_tag     (void *pdoc, Node *node);
+static char *s_iphone_end_object_tag       (void *pdoc, Node *node);
+static char *s_iphone_start_param_tag     (void *pdoc, Node *node);
+static char *s_iphone_start_caption_tag     (void *pdoc, Node *node);
+static char *s_iphone_end_caption_tag       (void *pdoc, Node *node);
+
+static void  s_init_iphone(iphone_t *iphone, Doc *doc, request_rec *r, device_table *spec);
+
+static int   s_iphone_search_emoji(iphone_t *iphone, char *txt, char **rslt);
+
+static css_prop_list_t *s_iphone_nopush_and_get_now_style(void *pdoc, Node *node, const char *style_attr_value);
+static css_prop_list_t *s_iphone_push_and_get_now_style(void *pdoc, Node *node, const char *style_attr_value);
+static char *s_iphone_create_style_data(apr_pool_t *pool, const char *style_data);
+
+
+
+tag_handler iphone_handler[] = {
+  /* tagHTML */
+  {
+    s_iphone_start_html_tag,
+    s_iphone_end_html_tag,
+  },
+  /* tagMETA */
+  {
+    s_iphone_start_meta_tag,
+    s_iphone_end_meta_tag,
+  },
+  /* tagTEXTAREA */
+  {
+    s_iphone_start_textarea_tag,
+    s_iphone_end_textarea_tag,
+  },
+  /* tagP */
+  {
+    s_iphone_start_p_tag,
+    s_iphone_end_p_tag,
+  },
+  /* tagPRE */
+  {
+    s_iphone_start_pre_tag,
+    s_iphone_end_pre_tag,
+  },
+  /* tagUL */
+  {
+    s_iphone_start_ul_tag,
+    s_iphone_end_ul_tag,
+  },
+  /* tagLI */
+  {
+    s_iphone_start_li_tag,
+    s_iphone_end_li_tag,
+  },
+  /* tagOL */
+  {
+    s_iphone_start_ol_tag,
+    s_iphone_end_ol_tag,
+  },
+  /* tagH1 */
+  {
+    s_iphone_start_h1_tag,
+    s_iphone_end_h1_tag,
+  },
+  /* tagH2 */
+  {
+    s_iphone_start_h2_tag,
+    s_iphone_end_h2_tag,
+  },
+  /* tagH3 */
+  {
+    s_iphone_start_h3_tag,
+    s_iphone_end_h3_tag,
+  },
+  /* tagH4 */
+  {
+    s_iphone_start_h4_tag,
+    s_iphone_end_h4_tag,
+  },
+  /* tagH5 */
+  {
+    s_iphone_start_h5_tag,
+    s_iphone_end_h5_tag,
+  },
+  /* tagH6 */
+  {
+    s_iphone_start_h6_tag,
+    s_iphone_end_h6_tag,
+  },
+  /* tagHEAD */
+  {
+    s_iphone_start_head_tag,
+    s_iphone_end_head_tag,
+  },
+  /* tagTITLE */
+  {
+    s_iphone_start_title_tag,
+    s_iphone_end_title_tag,
+  },
+  /* tagBASE */
+  {
+    s_iphone_start_base_tag,
+    s_iphone_end_base_tag,
+  },
+  /* tagBODY */
+  {
+    s_iphone_start_body_tag,
+    s_iphone_end_body_tag,
+  },
+  /* tagA */
+  {
+    s_iphone_start_a_tag,
+    s_iphone_end_a_tag,
+  },
+  /* tagBR */
+  {
+    s_iphone_start_br_tag,
+    s_iphone_end_br_tag,
+  },
+  /* tagTABLE */
+  {
+    s_iphone_start_table_tag,
+    s_iphone_end_table_tag,
+  },
+  /* tagTR */
+  {
+    s_iphone_start_tr_tag,
+    s_iphone_end_tr_tag,
+  },
+  /* tagTD */
+  {
+    s_iphone_start_td_tag,
+    s_iphone_end_td_tag,
+  },
+  /* tagTBODY */
+  {
+    NULL,
+    NULL,
+  },
+  /* tagFONT */
+  {
+    s_iphone_start_font_tag,
+    s_iphone_end_font_tag,
+  },
+  /* tagFORM */
+  {
+    s_iphone_start_form_tag,
+    s_iphone_end_form_tag,
+  },
+  /* tagINPUT */
+  {
+    s_iphone_start_input_tag,
+    s_iphone_end_input_tag,
+  },
+  /* tagCENTER */
+  {
+    s_iphone_start_center_tag,
+    s_iphone_end_center_tag,
+  },
+  /* tagHR */
+  {
+    s_iphone_start_hr_tag,
+    s_iphone_end_hr_tag,
+  },
+  /* tagIMG */
+  {
+    s_iphone_start_img_tag,
+    s_iphone_end_img_tag,
+  },
+  /* tagSELECT */
+  {
+    s_iphone_start_select_tag,
+    s_iphone_end_select_tag,
+  },
+  /* tagOPTION */
+  {
+    s_iphone_start_option_tag,
+    s_iphone_end_option_tag,
+  },
+  /* tagDIV */
+  {
+    s_iphone_start_div_tag,
+    s_iphone_end_div_tag,
+  },
+  /* tagCHXJIF */
+  {
+    s_iphone_chxjif_tag,
+    NULL,
+  },
+  /* tagCHXJRAW */
+  {
+    s_iphone_chxjif_tag,
+    NULL,
+  },
+  /* tagNOBR */
+  {
+    NULL,
+    NULL,
+  },
+  /* tagSMALL */
+  {
+    NULL,
+    NULL,
+  },
+  /* tagSTYLE */
+  {
+    s_iphone_style_tag,
+    NULL,
+  },
+  /* tagSPAN */
+  {
+    s_iphone_start_span_tag,
+    s_iphone_end_span_tag,
+  },
+  /* tagTEXT */
+  {
+    s_iphone_text_tag,
+    NULL,
+  },
+  /* tagTH */
+  {
+    s_iphone_start_th_tag,
+    s_iphone_end_th_tag,
+  },
+  /* tagB */
+  {
+    s_iphone_start_b_tag,
+    s_iphone_end_b_tag,
+  },
+  /* tagFIELDSET */
+  {
+    NULL,
+    NULL,
+  },
+  /* tagDT */
+  {
+    s_iphone_start_dt_tag,
+    s_iphone_end_dt_tag,
+  },
+  /* tagLEGEND */
+  {
+    NULL,
+    NULL,
+  },
+  /* tagLABEL */
+  {
+    NULL,
+    NULL,
+  },
+  /* tagBLOCKQUOTE */
+  {
+    s_iphone_start_blockquote_tag,
+    s_iphone_end_blockquote_tag,
+  },
+  /* tagDIR */
+  {
+    s_iphone_start_dir_tag,
+    s_iphone_end_dir_tag,
+  },
+  /* tagDL */
+  {
+    s_iphone_start_dl_tag,
+    s_iphone_end_dl_tag,
+  },
+  /* tagDD */
+  {
+    s_iphone_start_dd_tag,
+    s_iphone_end_dd_tag,
+  },
+  /* tagMENU */
+  {
+    s_iphone_start_menu_tag,
+    s_iphone_end_menu_tag,
+  },
+  /* tagPLAINTEXT */
+  {
+    s_iphone_start_plaintext_tag,
+    s_iphone_end_plaintext_tag,
+  },
+  /* tagBLINK */
+  {
+    s_iphone_start_blink_tag,
+    s_iphone_end_blink_tag,
+  },
+  /* tagMARQUEE */
+  {
+    s_iphone_start_marquee_tag,
+    s_iphone_end_marquee_tag,
+  },
+  /* tagLINK */
+  {
+    s_iphone_link_tag,
+    NULL,
+  },
+  /* tagNLMARK */
+  {
+    s_iphone_newline_mark,
+    NULL,
+  },
+  /* tagObject */
+  {
+    s_iphone_start_object_tag,
+    s_iphone_end_object_tag,
+  },
+  /* tagParam */
+  {
+    s_iphone_start_param_tag,
+    NULL,
+  },
+  /* tagCAPTION */
+  {
+    s_iphone_start_caption_tag,
+    s_iphone_end_caption_tag,
+  },
+};
+
+
+/**
+ * converts from CHTML5.0 to IPHONE.
+ *
+ * @param r     [i]   Requet_rec is appointed.
+ * @param spec  [i]   The result of the device specification processing which 
+ *                    was done in advance is appointed.
+ * @param src   [i]   The character string before the converting is appointed.
+ * @return The character string after the converting is returned.
+ */
+char *
+chxj_convert_iphone(
+  request_rec         *r,
+  device_table        *spec,
+  const char          *src,
+  apr_size_t          srclen,
+  apr_size_t          *dstlen,
+  chxjconvrule_entry  *entryp,
+  cookie_t            *cookie
+)
+{
+  char      *dst;
+  char      *ss;
+  iphone_t   iphone;
+  Doc       doc;
+
+  dst = NULL;
+
+  /*--------------------------------------------------------------------------*/
+  /* If qrcode xml                                                            */
+  /*--------------------------------------------------------------------------*/
+  *dstlen = srclen;
+  dst = chxj_qr_code_blob_handler(r, src, (size_t*)dstlen);
+  if (dst) {
+    DBG(r,"REQ[%X] I found qrcode xml",TO_ADDR(r));
+    return dst;
+  }
+
+  /*--------------------------------------------------------------------------*/
+  /* The CHTML structure is initialized.                                      */
+  /*--------------------------------------------------------------------------*/
+  s_init_iphone(&iphone, &doc, r, spec);
+
+  iphone.entryp = entryp;
+  iphone.cookie = cookie;
+  iphone.head_tag_out = 0;
+  if (strcasecmp(spec->output_encoding,"UTF-8") == 0 ){
+    apr_table_setn(r->headers_out,HTTP_X_CHXJ_SET_CONTENT_TYPE,"application/xhtml+xml; charset=UTF-8");
+  }
+  chxj_set_content_type(r, chxj_header_inf_set_content_type(r, "application/xhtml+xml; charset=Windows-31J"));
+
+  /*--------------------------------------------------------------------------*/
+  /* The character string of the input is analyzed.                           */
+  /*--------------------------------------------------------------------------*/
+  qs_init_malloc(&doc);
+  qs_init_root_node(&doc);
+
+  ss = apr_pcalloc(r->pool, srclen + 1);
+
+  memset(ss,   0, srclen + 1);
+  memcpy(ss, src, srclen);
+
+  if (IS_CSS_ON(iphone.entryp)) {
+    /* current property list */
+    iphone.css_prop_stack = chxj_new_prop_list_stack(&doc);
+  }
+#ifdef DUMP_LOG
+  chxj_dump_out("[src] CHTML -> IPHONE", ss, srclen);
+#endif
+
+  qs_parse_string(&doc,ss,strlen(ss));
+
+  chxj_buffered_write_init(r->pool, &doc.buf);
+  /*--------------------------------------------------------------------------*/
+  /* It converts it from CHTML to IPHONE.                                     */
+  /*--------------------------------------------------------------------------*/
+  chxj_node_convert(spec,r,(void*)&iphone, &doc, qs_get_root(&doc), 0);
+  iphone.out = chxj_buffered_write_flush(iphone.out, &doc.buf);
+  dst = apr_pstrcat(r->pool, (! iphone.prev_style_data) ? "" : iphone.prev_style_data,
+                             s_iphone_create_style_data(doc.pool, iphone.style_data),
+                             iphone.out, NULL);
+  chxj_buffered_write_terminate(&doc.buf);
+
+
+  qs_all_free(&doc,QX_LOGMARK);
+
+  if (! dst) 
+    return apr_pstrdup(r->pool,ss);
+
+  if (! strlen(dst)) 
+    dst = apr_psprintf(r->pool, "\n");
+
+  *dstlen = strlen(dst);
+
+#ifdef DUMP_LOG
+  chxj_dump_out("[dst] CHTML -> IPHONE", dst, *dstlen);
+#endif
+
+  return dst;
+}
+
+
+/**
+ * The IPHONE structure is initialized.
+ *
+ * @param iphone [i/o] The pointer to the IPHONE structure that wants to be
+ *                   initialized is specified.
+ * @param doc   [i]   The Doc structure that should be set to the initialized
+ *                   IPHONE structure is specified.
+ * @param r     [i]   To use POOL, the pointer to request_rec is specified.
+ * @param spec  [i]   The pointer to the device_table
+ */
+static void
+s_init_iphone(iphone_t *iphone, Doc *doc, request_rec *r, device_table *spec)
+{
+  memset(doc,   0, sizeof(Doc));
+  memset(iphone, 0, sizeof(iphone_t));
+
+  doc->r      = r;
+  iphone->doc  = doc;
+  iphone->spec = spec;
+  iphone->out  = qs_alloc_zero_byte_string(r->pool);
+  iphone->conf = chxj_get_module_config(r->per_dir_config, &chxj_module);
+  iphone->doc->parse_mode = PARSE_MODE_CHTML;
+  iphone->prev_style_data = NULL;
+  iphone->style_data = NULL;
+  iphone->blink_keyframe_out = 0;
+}
+
+
+/**
+ * Corresponding EMOJI to a current character-code is retrieved. 
+ * The substitution character string is stored in the rslt pointer if agreeing.
+ *
+ * @param iphone   [i]   The pointer to the IPHONE structure is specified. 
+ * @param txt     [i]   The character string to want to examine whether it is 
+ *                      EMOJI is specified. 
+ * @param rslt    [o]   The pointer to the pointer that stores the result is 
+ *                      specified. 
+ * @return When corresponding EMOJI exists, it returns it excluding 0. 
+ */
+static int
+s_iphone_search_emoji(iphone_t *iphone, char *txt, char **rslt)
+{
+  emoji_t       *ee;
+  request_rec   *r;
+  device_table  *spec;
+  int           len;
+
+  spec = iphone->spec;
+
+  len = strlen(txt);
+  r = iphone->doc->r;
+
+  if (! spec) DBG(r,"REQ[%X] spec is NULL",TO_ADDR(r));
+
+  for (ee = iphone->conf->emoji;
+       ee;
+       ee = ee->next) {
+
+    unsigned char hex1byte;
+    unsigned char hex2byte;
+
+    if (! ee->imode) { 
+      DBG(r,"REQ[%X] emoji->imode is NULL",TO_ADDR(r));
+      continue;
+    }
+
+    hex1byte = ee->imode->hex1byte & 0xff;
+    hex2byte = ee->imode->hex2byte & 0xff;
+
+    if (ee->imode->string
+    &&  strlen(ee->imode->string) > 0
+    &&  strncasecmp(ee->imode->string, txt, strlen(ee->imode->string)) == 0) {
+      if (spec == NULL || spec->emoji_type == NULL) {
+        if (ee->iphone != NULL && ee->iphone->string != NULL) {
+          if (iphone->conf->use_emoji_image
+              && iphone->conf->emoji_image_url
+              && (spec->html_spec_type == CHXJ_SPEC_iPhone2
+                || strcasecmp(ee->iphone->string,"image") == 0)) {
+            *rslt = apr_psprintf(r->pool, "<img src=\"%s/%d\" />",iphone->conf->emoji_image_url, ee->no);
+          }
+          else if (strncasecmp(ee->iphone->string, "raw:", 4) == 0) {
+            *rslt = apr_psprintf(r->pool,"%s", &(ee->iphone->string[4]));
+          }
+          else {
+            *rslt = apr_psprintf(r->pool,"%s;", ee->iphone->string);
+          }
+        }
+        return strlen(ee->imode->string);
+      }
+      return 0;
+    }
+
+    if (len >= 2
+    && ((unsigned char)txt[0] & 0xff) == ((unsigned char)hex1byte)
+    && ((unsigned char)txt[1] & 0xff) == ((unsigned char)hex2byte)) {
+      if (spec == NULL || spec->emoji_type == NULL) {
+        if (ee->iphone != NULL && ee->iphone->string != NULL) {
+          if (iphone->conf->use_emoji_image
+              && iphone->conf->emoji_image_url
+              && (spec->html_spec_type == CHXJ_SPEC_iPhone2
+                || strcasecmp(ee->iphone->string,"image") == 0)) {
+            *rslt = apr_psprintf(r->pool, "<img src=\"%s/%d\" />",iphone->conf->emoji_image_url, ee->no);
+          }
+          else if (strncasecmp(ee->iphone->string, "raw:", 4) == 0) {
+            *rslt = apr_psprintf(r->pool,"%s", &(ee->iphone->string[4]));
+          }
+          else {
+            *rslt = apr_psprintf(r->pool,"%s;", ee->iphone->string);
+          }
+        }
+        return 2;
+      }
+
+      return 0;
+    }
+  }
+
+  return 0;
+}
+
+
+char *
+chxj_iphone_emoji_only_converter(request_rec *r, device_table *spec, const char *src, apr_size_t len)
+{
+  apr_size_t ii;
+  Doc __doc;
+  Doc *doc;
+  iphone_t __iphone;
+  iphone_t *iphone;
+  char one_byte[2];
+  char two_byte[3];
+  apr_pool_t *pool;
+
+  iphone = &__iphone;
+  doc    = &__doc;
+
+  DBG(r,"REQ[%X] start %s()",TO_ADDR(r),__func__);
+  memset(doc,    0, sizeof(Doc));
+  memset(iphone, 0, sizeof(iphone_t));
+
+  doc->r       = r;
+  iphone->doc  = doc;
+  iphone->spec = spec;
+  iphone->out  = qs_alloc_zero_byte_string(r->pool);
+  iphone->conf = chxj_get_module_config(r->per_dir_config, &chxj_module);
+  iphone->doc->parse_mode = PARSE_MODE_CHTML;
+
+  apr_pool_create(&pool, r->pool);
+
+  chxj_buffered_write_init(pool, &doc->buf);
+
+  for (ii=0; ii<len; ii++) {
+    char *out;
+    int   rtn;
+
+    rtn = s_iphone_search_emoji(iphone, (char *)&src[ii], &out);
+    if (rtn) {
+      W_V(out);
+      ii+=(rtn - 1);
+      continue;
+    }
+
+    if (is_sjis_kanji(src[ii])) {
+      two_byte[0] = src[ii+0];
+      two_byte[1] = src[ii+1];
+      two_byte[2] = 0;
+      W_V(two_byte);
+      ii++;
+    }
+    else {
+      one_byte[0] = src[ii+0];
+      one_byte[1] = 0;
+      W_V(one_byte);
+    }
+  }
+  iphone->out = chxj_buffered_write_flush(iphone->out, &doc->buf);
+
+  DBG(r,"REQ[%X] end %s()",TO_ADDR(r),__func__);
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the HTML tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The HTML tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_html_tag(void *pdoc, Node *UNUSED(node)) 
+{
+  iphone_t       *iphone;
+  Doc           *doc;
+  request_rec   *r;
+
+
+  iphone  = GET_IPHONE(pdoc);
+  doc    = iphone->doc;
+  r      = doc->r;
+  DBG(r,"REQ[%X] start %s()",TO_ADDR(r),__func__);
+
+  W_L("<?xml version=\"1.0\" encoding=\"");
+  W_V(iphone->spec->output_encoding);
+  W_L("\" ?>");
+  W_NLCODE();
+  W_L("<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.1//EN\" \"http://www.openmobilealliance.org/tech/DTD/xhtml-mobile11.dtd\">");
+  W_NLCODE();
+
+
+  /*--------------------------------------------------------------------------*/
+  /* start HTML tag                                                           */
+  /*--------------------------------------------------------------------------*/
+  W_L("<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"ja\" xml:lang=\"ja\">");
+
+  iphone->start_html_flag = 1;
+
+  DBG(r,"REQ[%X] end %s()",TO_ADDR(r),__func__);
+
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the HTML tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The HTML tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_html_tag(void *pdoc, Node *UNUSED(child)) 
+{
+  iphone_t      *iphone = GET_IPHONE(pdoc);
+  Doc           *doc = iphone->doc;
+
+  W_L("</html>");
+
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the META tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The META tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_meta_tag(void *pdoc, Node *node) 
+{
+  iphone_t     *iphone;
+  Doc          *doc;
+  request_rec  *r;
+  Attr         *attr;
+  int          content_type_flag;
+  int          refresh_flag;
+
+  iphone             = GET_IPHONE(pdoc);
+  doc               = iphone->doc;
+  r                 = doc->r;
+  refresh_flag      = 0;
+  content_type_flag = 0;
+
+  W_L("<meta");
+  /*--------------------------------------------------------------------------*/
+  /* Get Attributes                                                           */
+  /*--------------------------------------------------------------------------*/
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name   = qs_get_attr_name(doc,attr);
+    char *value  = qs_get_attr_value(doc,attr);
+    switch(*name) {
+    case 'h':
+    case 'H':
+      if (strcasecmp(name, "http-equiv") == 0 && value && *value) {
+        /*----------------------------------------------------------------------*/
+        /* CHTML 2.0                                                            */
+        /*----------------------------------------------------------------------*/
+        W_L(" http-equiv=\"");
+        W_V(value);
+        W_L("\"");
+        if (STRCASEEQ('c','C',"content-type",value)) {
+          content_type_flag = 1;
+        }
+        if (STRCASEEQ('r','R',"refresh",value)) {
+          refresh_flag = 1;
+        }
+      }
+      break;
+
+    case 'c':
+    case 'C':
+      if (strcasecmp(name, "content") == 0 && value && *value) {
+        /*----------------------------------------------------------------------*/
+        /* CHTML 2.0                                                            */
+        /*----------------------------------------------------------------------*/
+        if (content_type_flag)  {
+          W_L(" ");
+          W_V(name);
+          W_L("=\"");
+          W_V(chxj_header_inf_set_content_type(r, "application/xhtml+xml; charset=SHIFT_JIS"));
+          W_L("\"");
+        }
+        else
+        if (refresh_flag) {
+          char *buf;
+          char *sec;
+          char *url;
+  
+          buf = apr_pstrdup(r->pool, value);
+  
+          url = strchr(buf, ';');
+          if (url) {
+            sec = apr_pstrdup(r->pool, buf);
+            sec[url-buf] = 0;
+            url++;
+            url = chxj_encoding_parameter(r, url, 1);
+            W_L(" ");
+            W_V(name);
+            W_L("=\"");
+            W_V(sec);
+            W_L(";");
+            W_V(url);
+            W_L("\"");
+          }
+        }
+        else {
+          W_L(" ");
+          W_V(name);
+          W_L("=\"");
+          W_V(value);
+          W_L("\"");
+        }
+      }
+      break;
+    case 'n':
+    case 'N':
+      if (strcasecmp(name, "name") == 0 && value && *value) {
+        W_L(" name=\"");
+        W_V(value);
+        W_L("\"");
+      }
+      break;
+    default:
+      break;
+    }
+  }
+  W_L(" />");
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the META tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The META tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_meta_tag(void *pdoc, Node *UNUSED(child)) 
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the HEAD tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The HEAD tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_head_tag(void *pdoc, Node *node) 
+{
+  iphone_t      *iphone;
+  Attr          *attr;
+  Doc           *doc;
+  Node          *child;
+  request_rec   *r;
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = doc->r;
+  iphone->head_tag_out = 1;
+
+  W_L("<head>");
+
+  /* search <meta name="viewport"> */
+  int found_viewport = 0;
+  for (child = qs_get_child_node(doc,node);
+       child;
+       child = qs_get_next_node(doc,child)) {
+    char *name = qs_get_node_name(doc,child);
+    switch(*name) {
+    case 'm':
+    case 'M':
+      if (strcasecmp("meta",name) == 0) {
+        for (attr = qs_get_attr(doc,child);
+             attr;
+             attr = qs_get_next_attr(doc,attr)) {
+          char *aname  = qs_get_attr_name(doc,attr);
+          char *avalue = qs_get_attr_value(doc,attr);
+          if (STRCASEEQ('n','N',"name",aname)) {
+            if (STRCASEEQ('v','V',"viewport",avalue)) {
+              found_viewport = 1;
+              DBG(r, "REQ[%X] viewport Found!!",TO_ADDR(r));
+              break;
+            }
+          }
+        }
+      }
+      break;
+
+    default: 
+      break;
+    }
+    if (found_viewport) {
+      break;
+    }
+  }
+
+  if (!found_viewport) {
+    W_L("<meta ");
+    W_L("name=\"viewport\" ");
+    W_L("id=\"iphone-viewport\" ");
+    W_L("content=\"width=");
+    char *ww = apr_psprintf(r->pool, "%d", (int)((double)iphone->spec->width * (double)1.5));
+    W_V(ww);
+    W_L(",user-scalable=no,maximum-scale=0.6667\" />");
+    W_L("<meta name=\"format-detection\" content=\"telephone=no\" />");
+  }
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the HEAD tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The HEAD tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_head_tag(void *pdoc, Node *UNUSED(child)) 
+{
+  iphone_t       *iphone;
+  Doc           *doc;
+  request_rec   *r;
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = doc->r;
+
+#if 0
+  W_L("<style>");
+  W_NLCODE();
+  W_L(BLINK_KEYFRAME);
+  W_NLCODE();
+  W_L("</style>");
+#endif
+  iphone->out = chxj_buffered_write_flush(iphone->out, &doc->buf);
+  iphone->prev_style_data = apr_pstrdup(doc->pool, iphone->out);
+  iphone->out = qs_alloc_zero_byte_string(r->pool);
+
+  W_L("</head>");
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the TITLE tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The TITLE tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_title_tag(void *pdoc, Node *UNUSED(node)) 
+{
+  iphone_t      *iphone;
+  Doc          *doc;
+  request_rec  *r;
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = doc->r;
+
+  W_L("<title>");
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the TITLE tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The TITLE tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_title_tag(void *pdoc, Node *UNUSED(child)) 
+{
+  iphone_t      *iphone;
+  Doc           *doc;
+  request_rec   *r;
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = doc->r;
+
+  W_L("</title>");
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the BASE tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The BASE tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_base_tag(void *pdoc, Node *node) 
+{
+  iphone_t      *iphone;
+  Attr          *attr;
+  Doc           *doc;
+  request_rec   *r;
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = doc->r;
+
+  W_L("<base");
+  /*--------------------------------------------------------------------------*/
+  /* Get Attributes                                                           */
+  /*--------------------------------------------------------------------------*/
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name  = qs_get_attr_name(doc,attr);
+    char *value = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('h','H',"href",name)) {
+      W_L(" href=\"");
+      W_V(value);
+      W_L("\"");
+    }
+  }
+  W_L(" />");
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the BASE tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The BASE tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_base_tag(void *pdoc, Node *UNUSED(child)) 
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the BODY tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The BODY tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_body_tag(void *pdoc, Node *node) 
+{
+  iphone_t    *iphone;
+  Doc         *doc;
+  request_rec *r;
+  Attr        *attr;
+  char        *attr_bgcolor = NULL;
+  char        *attr_text    = NULL;
+  char        *attr_link    = NULL;
+  char        *attr_vlink   = NULL;
+  char        *attr_alink   = NULL;
+  char        *attr_style   = NULL;
+  char        *attr_background   = NULL;
+  char        *style_data   = NULL;
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = doc->r;
+
+
+  /*--------------------------------------------------------------------------*/
+  /* Get Attributes                                                           */
+  /*--------------------------------------------------------------------------*/
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name   = qs_get_attr_name(doc,attr);
+    char *value  = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('b','B',"bgcolor",name) && value && *value) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 2.0                                                            */
+      /*----------------------------------------------------------------------*/
+      attr_bgcolor = value;
+    }
+    else if (STRCASEEQ('t','T',"text",name) && value && *value) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 2.0                                                            */
+      /*----------------------------------------------------------------------*/
+      attr_text = value;
+    }
+    else if (STRCASEEQ('l','L',"link",name) && value && *value) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 2.0                                                            */
+      /*----------------------------------------------------------------------*/
+      attr_link = value;
+    }
+    else if (STRCASEEQ('a','A',"alink",name)) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 4.0                                                            */
+      /*----------------------------------------------------------------------*/
+      attr_alink = value;
+    }
+    else if (STRCASEEQ('v','V',"vlink",name)) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 4.0                                                            */
+      /*----------------------------------------------------------------------*/
+      attr_vlink = value;
+    }
+    else if (STRCASEEQ('b','B',"background",name) && value && *value) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 6.0                                                            */
+      /*----------------------------------------------------------------------*/
+      attr_background = value;
+    }
+    else if (STRCASEEQ('s','S',"style",name) && value && *value) {
+      attr_style = value;
+    }
+  }
+
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *color_prop      = chxj_css_get_property_value(doc, style, "color");
+      css_property_t *bgcolor_prop    = chxj_css_get_property_value(doc, style, "background-color");
+      css_property_t *bgimage_prop    = chxj_css_get_property_value(doc, style, "background-image");
+      css_property_t *cur;
+      for (cur = color_prop->next; cur != color_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          attr_text = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+      for (cur = bgcolor_prop->next; cur != bgcolor_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          attr_bgcolor = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+      for (cur = bgimage_prop->next; cur != bgimage_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          char *tmp = apr_pstrdup(doc->pool, cur->value);
+          char *tmps = strstr(tmp,"(");
+          if(tmps){
+            char *tmpe = strstr(tmp,")");
+            size_t len = strlen(tmps) - strlen(tmpe) -1 ;
+            tmps++;
+            attr_background = apr_pstrndup(doc->pool, tmps,len);
+          }
+        }
+      }
+    }
+    if (iphone->style) {
+      css_stylesheet_t *pseudos = chxj_find_pseudo_selectors(doc, iphone->style);
+      css_selector_t *cur_sel;
+      for (cur_sel = pseudos->selector_head.next; cur_sel != &pseudos->selector_head; cur_sel = cur_sel->next) {
+        if (cur_sel->name && strcasecmp(cur_sel->name, "a:link") == 0) {
+          css_property_t *cur;
+          for (cur = cur_sel->property_head.next; cur != &cur_sel->property_head; cur = cur->next) {
+            if (cur->name && strcasecmp(cur->name, "color") == 0) {
+              attr_link = apr_pstrdup(doc->pool, cur->value);
+            }
+          }
+        }
+        else if (cur_sel->name && strcasecmp(cur_sel->name, "a:visited") == 0) {
+          css_property_t *cur;
+          for (cur = cur_sel->property_head.next; cur != &cur_sel->property_head; cur = cur->next) {
+            if (cur->name && strcasecmp(cur->name, "color") == 0) {
+              attr_vlink = apr_pstrdup(doc->pool, cur->value);
+            }
+          }
+        }
+      }
+    }
+  }
+
+
+  W_L("<body");
+  if (attr_bgcolor || attr_text) {
+    W_L(" style=\"");
+    if (attr_bgcolor) {
+      attr_bgcolor = chxj_css_rgb_func_to_value(doc->pool, attr_bgcolor);
+      W_L("background-color:");
+      W_V(attr_bgcolor);
+      W_L(";");
+    }
+    if (attr_text) {
+      attr_text = chxj_css_rgb_func_to_value(doc->pool, attr_text);
+      W_L("color:");
+      W_V(attr_text);
+      W_L(";");
+    }
+    W_L("\"");
+  }
+  if (attr_link) {
+    attr_link = chxj_css_rgb_func_to_value(doc->pool, attr_link);
+    W_L(" link=\"");
+    W_V(attr_link);
+    W_L("\"");
+  }
+  if (attr_vlink) {
+    attr_vlink = chxj_css_rgb_func_to_value(doc->pool, attr_vlink);
+    W_L(" vlink=\"");
+    W_V(attr_vlink);
+    W_L("\"");
+  }
+  if (attr_alink) {
+    attr_alink = chxj_css_rgb_func_to_value(doc->pool, attr_alink);
+    style_data = apr_pstrcat(doc->pool, (style_data) ? style_data : "",
+                                        apr_psprintf(doc->pool, "a:focus { color:%s; }", attr_alink), NULL);
+  }
+  if (attr_background) {
+    W_L(" background=\"");
+    W_V(attr_background);
+    W_L("\"");
+  }
+  if (style_data) {
+    iphone->style_data = apr_pstrcat(doc->pool, (iphone->style_data) ? iphone->style_data : "",
+                                                style_data,
+                                                NULL);
+  }
+  W_L("><div>");
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the BODY tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The BODY tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_body_tag(void *pdoc, Node *UNUSED(child)) 
+{
+  iphone_t       *iphone;
+  Doc           *doc;
+  request_rec   *r;
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = doc->r;
+
+  W_L("</div></body>");
+  if (IS_CSS_ON(iphone->entryp)) {
+    chxj_css_pop_prop_list(iphone->css_prop_stack);
+  }
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the A tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The A tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_a_tag(void *pdoc, Node *node) 
+{
+  iphone_t    *iphone;
+  Doc         *doc;
+  request_rec *r;
+  Attr        *attr;
+  char        *attr_style = NULL;
+  char        *attr_id    = NULL;
+  char        *attr_name  = NULL;
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = doc->r;
+
+  W_L("<a");
+  /*--------------------------------------------------------------------------*/
+  /* Get Attributes                                                           */
+  /*--------------------------------------------------------------------------*/
+  for (attr = qs_get_attr(doc,node);
+       attr; 
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name  = qs_get_attr_name(doc,attr);
+    char *value = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('i','I',"id",name)){
+      attr_id = chxj_jreserved_to_safe_tag(r, value, iphone->entryp);
+    }
+    else if (STRCASEEQ('n','N',"name",name)) {
+      attr_name = chxj_jreserved_to_safe_tag(r, value, iphone->entryp);
+    }
+    else if (STRCASEEQ('h','H',"href",name)) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML1.0                                                             */
+      /*----------------------------------------------------------------------*/
+      value = chxj_encoding_parameter(r, value, 1);
+      if (! chxj_starts_with(value, "mailto:") && ! chxj_starts_with(value, "tel:")) {
+        value = chxj_jreserved_tag_to_safe_for_query_string(r, value, iphone->entryp, 1);
+      }
+      W_L(" href=\"");
+      W_V(value);
+      W_L("\"");
+    }
+    else if (STRCASEEQ('a','A',"accesskey",name)) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML1.0                                                             */
+      /*----------------------------------------------------------------------*/
+      /* not need */
+    }
+    else if (STRCASEEQ('c','C',"cti",name)) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 2.0                                                            */
+      /*----------------------------------------------------------------------*/
+      /* ignore */
+    }
+    else if (STRCASEEQ('i','I',"ijam",name)) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 3.0                                                            */
+      /*----------------------------------------------------------------------*/
+      /* ignore */
+    }
+    else if (STRCASEEQ('u','U',"utn",name)) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 3.0                                                            */
+      /* It is special only for CHTML.                                        */
+      /*----------------------------------------------------------------------*/
+      /* ignore */
+    }
+    else if (STRCASEEQ('t','T',"telbook",name)) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 3.0                                                            */
+      /*----------------------------------------------------------------------*/
+      /* not support */
+    }
+    else if (STRCASEEQ('k','K',"kana",name)) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 3.0                                                            */
+      /*----------------------------------------------------------------------*/
+      /* not support */
+    }
+    else if (STRCASEEQ('e','E',"email",name)) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 3.0                                                            */
+      /*----------------------------------------------------------------------*/
+      /* not support */
+    }
+    else if (STRCASEEQ('i','I',"ista",name)) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 4.0                                                            */
+      /*----------------------------------------------------------------------*/
+      /* ignore */
+    }
+    else if (STRCASEEQ('i','I',"ilet",name)) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 5.0                                                            */
+      /*----------------------------------------------------------------------*/
+      /* ignore */
+    }
+    else if (STRCASEEQ('i','I',"iswf",name)) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 5.0                                                            */
+      /*----------------------------------------------------------------------*/
+      /* ignore */
+    }
+    else if (STRCASEEQ('i','I',"irst",name)) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 5.0                                                            */
+      /*----------------------------------------------------------------------*/
+      /* ignore */
+    }
+    else if (STRCASEEQ('s','S',"style",name) && value && *value) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 5.0                                                            */
+      /*----------------------------------------------------------------------*/
+      attr_style = value;
+    }
+  }
+  if(attr_id){
+    W_L(" id=\"");
+    W_V(attr_id);
+    W_L("\"");
+  }
+  if (attr_name) {
+    W_L(" name=\"");
+    W_V(attr_name);
+    W_L("\"");
+  }
+  W_L(">");
+
+  if (IS_CSS_ON(iphone->entryp)) {
+    s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+  }
+
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the A tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The A tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_a_tag(void *pdoc, Node *UNUSED(child)) 
+{
+  iphone_t      *iphone;
+  Doc          *doc;
+  request_rec  *r;
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = doc->r;
+
+  W_L("</a>");
+
+  if (IS_CSS_ON(iphone->entryp)) {
+    chxj_css_pop_prop_list(iphone->css_prop_stack);
+  }
+
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the BR tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The BR tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_br_tag(void *pdoc, Node *node)
+{
+  iphone_t     *iphone;
+  Doc          *doc;
+  request_rec  *r;
+  Attr         *attr;
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = doc->r;
+  
+  char         *attr_style = NULL;
+  char         *attr_clear = NULL;
+
+  /*--------------------------------------------------------------------------*/
+  /* Get Attributes                                                           */
+  /*--------------------------------------------------------------------------*/
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name  = qs_get_attr_name(doc,attr);
+    char *value = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('c','C',"clear",name)) {
+      if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('a','A',"all",value))) {
+        attr_clear = value;
+      }
+    }
+    else if (STRCASEEQ('s','S',"style",name)) {
+      attr_style = apr_pstrdup(doc->buf.pool, value);
+    }
+  }
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *clear_prop = chxj_css_get_property_value(doc, style, "clear");
+      css_property_t *cur;
+      for (cur = clear_prop->next; cur != clear_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          if ( STRCASEEQ('l','L',"left",  cur->value)
+            || STRCASEEQ('r','R',"right", cur->value)) {
+            attr_clear = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if(STRCASEEQ('b','B',"both"  ,cur->value)) {
+            attr_clear = apr_pstrdup(doc->pool, "all");
+          }
+        }
+      }
+    }
+  }
+  W_L("<br");
+  if(attr_clear){
+    W_L(" clear=\"");
+    W_V(attr_clear);
+    W_L("\"");
+  }
+  W_L(" />");
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the BR tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The BR tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_br_tag(void *pdoc, Node *UNUSED(child)) 
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+  return iphone->out;
+}
+
+/**
+ * It is a handler who processes the TABLE tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The TR tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_table_tag(void *pdoc, Node *node) 
+{
+  iphone_t     *iphone;
+  Doc          *doc;
+  request_rec  *r;
+  Attr         *attr;
+  
+  char         *attr_style  = NULL;
+  char         *attr_align  = NULL;
+  char         *attr_width  = NULL;
+  char         *attr_height = NULL;
+  char         *attr_bgcolor = NULL;
+  char         *attr_border_width  = NULL;
+  char         *attr_border_color  = NULL;
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = doc->r;
+  
+  /*--------------------------------------------------------------------------*/
+  /* Get Attributes                                                           */
+  /*--------------------------------------------------------------------------*/
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name  = qs_get_attr_name(doc,attr);
+    char *val   = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('a','A',"align",name)) {
+      if (val && (STRCASEEQ('l','L',"left",val) || STRCASEEQ('r','R',"right",val) || STRCASEEQ('c','C',"center",val))) {
+        attr_align = apr_pstrdup(doc->buf.pool, val);
+      }
+    }
+    else if (STRCASEEQ('h','H',"height",name) && val && *val) {
+      attr_height = apr_pstrdup(doc->buf.pool, val);
+    }
+    else if (STRCASEEQ('w','W',"width",name) && val && *val) {
+      attr_width = apr_pstrdup(doc->buf.pool, val);
+    }
+    else if (STRCASEEQ('s','S',"style",name) && val && *val) {
+      attr_style = apr_pstrdup(doc->buf.pool, val);
+    }
+    else if (STRCASEEQ('b','B',"bgcolor",name) && val && *val) {
+      attr_bgcolor = apr_pstrdup(doc->buf.pool, val);
+      attr_bgcolor = chxj_css_rgb_func_to_value(doc->pool, attr_bgcolor);
+    }
+    else if (STRCASEEQ('b','B',"border",name) && val && *val) {
+      attr_border_width = apr_pstrdup(doc->buf.pool, val);
+    }
+    else if (STRCASEEQ('b','B',"bordercolor",name) && val && *val) {
+      attr_border_color = apr_pstrdup(doc->buf.pool, val);
+      attr_border_color = chxj_css_rgb_func_to_value(doc->pool, attr_border_color);
+    }
+  }
+  
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *width_prop             = chxj_css_get_property_value(doc, style, "width");
+      css_property_t *height_prop            = chxj_css_get_property_value(doc, style, "height");
+      css_property_t *align_prop             = chxj_css_get_property_value(doc, style, "text-align");
+      css_property_t *bgcolor_prop           = chxj_css_get_property_value(doc, style, "background-color");
+      css_property_t *border_width_prop      = chxj_css_get_property_value(doc, style, "border-width");
+      css_property_t *border_color_prop      = chxj_css_get_property_value(doc, style, "border-color");
+      
+      css_property_t *cur;
+      for (cur = width_prop->next; cur != width_prop; cur = cur->next) {
+        char *tmp = apr_pstrdup(doc->pool, cur->value);
+        char *tmpp = strstr(tmp, "px");
+        if (tmpp) {
+          size_t len = strlen(tmp) - strlen(tmpp);
+          attr_width = apr_pstrndup(doc->pool, tmp,len);
+        }
+        else{
+          attr_width = apr_pstrdup(doc->pool, tmp);
+        }
+      }
+      for (cur = height_prop->next; cur != height_prop; cur = cur->next) {
+        char *tmp = apr_pstrdup(doc->pool, cur->value);
+        char *tmpp = strstr(tmp, "px");
+        if (tmpp) {
+          size_t len = strlen(tmp) - strlen(tmpp);
+          attr_height = apr_pstrndup(doc->pool, tmp,len);
+        }
+        else{
+          attr_height = apr_pstrdup(doc->pool, tmp);
+        }
+      }
+      for (cur = align_prop->next; cur != align_prop; cur = cur->next) {
+        if (cur->value && (STRCASEEQ('l','L',"left",cur->value) || STRCASEEQ('r','R',"right",cur->value) || STRCASEEQ('c','C',"center",cur->value))) {
+          attr_align = apr_pstrdup(doc->buf.pool, cur->value);
+        }
+      }
+      for (cur = bgcolor_prop->next; cur != bgcolor_prop; cur = cur->next) {
+        attr_bgcolor = apr_pstrdup(doc->pool, cur->value);
+        attr_bgcolor = chxj_css_rgb_func_to_value(doc->pool, attr_bgcolor);
+      }
+      for (cur = border_width_prop->next; cur != border_width_prop; cur = cur->next) {
+        char *tmp = apr_pstrdup(doc->pool, cur->value);
+        char *tmpp = strstr(tmp, "px");
+        if (tmpp) {
+          size_t len = strlen(tmp) - strlen(tmpp);
+          attr_border_width = apr_pstrndup(doc->pool, tmp,len);
+        }
+        else{
+          attr_border_width = apr_pstrdup(doc->pool, tmp);
+        }
+      }
+      for (cur = border_color_prop->next; cur != border_color_prop; cur = cur->next) {
+        attr_border_color = apr_pstrdup(doc->pool, cur->value);
+        attr_border_color = chxj_css_rgb_func_to_value(doc->pool, attr_border_color);
+      }
+    }
+  }
+
+  W_L("<table");
+  if (attr_align){
+    W_L(" align=\"");
+    W_V(attr_align);
+    W_L("\"");
+  }
+  if (attr_height){
+    W_L(" height=\"");
+    W_V(attr_height);
+    W_L("\"");
+  }
+  if (attr_width){
+    W_L(" width=\"");
+    W_V(attr_width);
+    W_L("\"");
+  }
+  if (attr_bgcolor && *attr_bgcolor){
+    W_L(" bgcolor=\"");
+    W_V(attr_bgcolor);
+    W_L("\"");
+  }
+  if (attr_border_width || attr_border_color ){
+    W_L(" style=\"border:");
+    if (attr_border_width){
+      W_V(attr_border_width);
+    }
+    else{
+      W_L("1");
+    }
+    W_L("px solid");
+    
+    if (attr_border_color && *attr_border_color){
+      W_L(" ");
+      W_V(attr_border_color);
+    }
+    W_L(";\"");
+  }
+  W_L(">");
+  
+  return iphone->out;
+}
+
+/**
+ * It is a handler who processes the TABLE tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The TR tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_table_tag(void *pdoc, Node *UNUSED(node)) 
+{
+  iphone_t      *iphone;
+  request_rec  *r;
+  Doc          *doc;
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = iphone->doc->r;
+  
+  W_L("</table>");
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the TR tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The TR tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_tr_tag(void *pdoc, Node *node) 
+{
+  iphone_t      *iphone;
+  Doc          *doc;
+  request_rec  *r;
+  
+  Attr         *attr;
+  
+  char         *attr_style  = NULL;
+  char         *attr_align  = NULL;
+  char         *attr_valign = NULL;
+  char         *attr_bgcolor = NULL;
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = doc->r;
+  
+  /*--------------------------------------------------------------------------*/
+  /* Get Attributes                                                           */
+  /*--------------------------------------------------------------------------*/
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name  = qs_get_attr_name(doc,attr);
+    char *val   = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('a','A',"align",name)) {
+      if (val && (STRCASEEQ('l','L',"left",val) || STRCASEEQ('r','R',"right",val) || STRCASEEQ('c','C',"center",val))) {
+        attr_align = apr_pstrdup(doc->buf.pool, val);
+      }
+    }
+    else if (STRCASEEQ('v','V',"valign",name) && val && *val) {
+      if (val && (STRCASEEQ('t','T',"top",val) || STRCASEEQ('m','M',"middle",val) || STRCASEEQ('b','B',"bottom",val))) {
+        attr_valign = apr_pstrdup(doc->buf.pool, val);
+      }
+    }
+    else if (STRCASEEQ('s','S',"style",name) && val && *val) {
+      attr_style = apr_pstrdup(doc->buf.pool, val);
+    }
+    else if (STRCASEEQ('b','B',"bgcolor",name) && val && *val) {
+      attr_bgcolor = apr_pstrdup(doc->buf.pool, val);
+      attr_bgcolor = chxj_css_rgb_func_to_value(doc->pool, attr_bgcolor);
+    }
+  }
+  
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *align_prop             = chxj_css_get_property_value(doc, style, "text-align");
+      css_property_t *valign_prop            = chxj_css_get_property_value(doc, style, "vertical-align");
+      css_property_t *bgcolor_prop           = chxj_css_get_property_value(doc, style, "background-color");
+      
+      css_property_t *cur;
+      for (cur = align_prop->next; cur != align_prop; cur = cur->next) {
+        if (cur->value && (STRCASEEQ('l','L',"left",cur->value) || STRCASEEQ('r','R',"right",cur->value) || STRCASEEQ('c','C',"center",cur->value))) {
+          attr_align = apr_pstrdup(doc->buf.pool, cur->value);
+        }
+      }
+      for (cur = valign_prop->next; cur != valign_prop; cur = cur->next) {
+        if (cur->value && (STRCASEEQ('t','T',"top",cur->value) || STRCASEEQ('m','M',"middle",cur->value) || STRCASEEQ('b','B',"bottom",cur->value))) {
+          attr_valign = apr_pstrdup(doc->buf.pool, cur->value);
+        }
+      }
+      for (cur = bgcolor_prop->next; cur != bgcolor_prop; cur = cur->next) {
+        attr_bgcolor = apr_pstrdup(doc->pool, cur->value);
+        attr_bgcolor = chxj_css_rgb_func_to_value(doc->pool, attr_bgcolor);
+      }
+    }
+  }
+
+  W_L("<tr");
+  if (attr_align){
+    W_L(" align=\"");
+    W_V(attr_align);
+    W_L("\"");
+  }
+  if (attr_valign){
+    W_L(" valign=\"");
+    W_V(attr_valign);
+    W_L("\"");
+  }
+  if (attr_bgcolor && *attr_bgcolor){
+    W_L(" bgcolor=\"");
+    W_V(attr_bgcolor);
+    W_L("\"");
+  }
+  W_L(">");
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the TR tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The TR tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_tr_tag(void *pdoc, Node *UNUSED(child)) 
+{
+  iphone_t      *iphone;
+  request_rec  *r;
+  Doc          *doc;
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = iphone->doc->r;
+  
+  W_L("</tr>");
+  return iphone->out;
+}
+
+/**
+ * It is a handler who processes the TD tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The TR tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_td_or_th_tag(void *pdoc, Node *node,char *tagName) 
+{
+  iphone_t      *iphone;
+  Doc          *doc;
+  request_rec  *r;
+
+  Attr         *attr;
+  
+  char         *attr_style  = NULL;
+  char         *attr_align  = NULL;
+  char         *attr_valign = NULL;
+  char         *attr_bgcolor = NULL;
+  char         *attr_colspan = NULL;
+  char         *attr_rowspan = NULL;
+  char         *attr_width   = NULL;
+  char         *attr_height  = NULL;
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = doc->r;
+  
+  /*--------------------------------------------------------------------------*/
+  /* Get Attributes                                                           */
+  /*--------------------------------------------------------------------------*/
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name  = qs_get_attr_name(doc,attr);
+    char *val   = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('a','A',"align",name)) {
+      if (val && (STRCASEEQ('l','L',"left",val) || STRCASEEQ('r','R',"right",val) || STRCASEEQ('c','C',"center",val))) {
+        attr_align = apr_pstrdup(doc->buf.pool, val);
+      }
+    }
+    else if (STRCASEEQ('v','V',"valign",name) && val && *val) {
+      if (val && (STRCASEEQ('t','T',"top",val) || STRCASEEQ('m','M',"middle",val) || STRCASEEQ('b','B',"bottom",val))) {
+        attr_valign = apr_pstrdup(doc->buf.pool, val);
+      }
+    }
+    else if (STRCASEEQ('s','S',"style",name) && val && *val) {
+      attr_style = apr_pstrdup(doc->buf.pool, val);
+    }
+    else if (STRCASEEQ('b','B',"bgcolor",name) && val && *val) {
+      attr_bgcolor = apr_pstrdup(doc->buf.pool, val);
+      attr_bgcolor = chxj_css_rgb_func_to_value(doc->pool, attr_bgcolor);
+    }
+    else if (STRCASEEQ('c','C',"colspan",name) && val && *val) {
+      attr_colspan = apr_pstrdup(doc->buf.pool, val);
+    }
+    else if (STRCASEEQ('r','R',"rowspan",name) && val && *val) {
+      attr_rowspan = apr_pstrdup(doc->buf.pool, val);
+    }
+    else if (STRCASEEQ('w','W',"width",name) && val && *val) {
+      char *tmp = strstr(val, "%");
+      if(tmp){
+        attr_width = apr_pstrdup(doc->buf.pool, val);
+      }
+      else{
+        attr_width = apr_psprintf(doc->buf.pool,"%spx",val);
+      }
+    }
+    else if (STRCASEEQ('h','H',"height",name) && val && *val) {
+      char *tmp = strstr(val, "%");
+      if(tmp){
+        attr_height = apr_pstrdup(doc->buf.pool, val);
+      }
+      else{
+        attr_height = apr_psprintf(doc->buf.pool,"%spx",val);
+      }
+    }
+  }
+  
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *align_prop             = chxj_css_get_property_value(doc, style, "text-align");
+      css_property_t *valign_prop            = chxj_css_get_property_value(doc, style, "vertical-align");
+      css_property_t *bgcolor_prop           = chxj_css_get_property_value(doc, style, "background-color");
+      css_property_t *width_prop             = chxj_css_get_property_value(doc, style, "width");
+      css_property_t *height_prop            = chxj_css_get_property_value(doc, style, "height");
+      
+      css_property_t *cur;
+      for (cur = align_prop->next; cur != align_prop; cur = cur->next) {
+        if (cur->value && (STRCASEEQ('l','L',"left",cur->value) || STRCASEEQ('r','R',"right",cur->value) || STRCASEEQ('c','C',"center",cur->value))) {
+          attr_align = apr_pstrdup(doc->buf.pool, cur->value);
+        }
+      }
+      for (cur = valign_prop->next; cur != valign_prop; cur = cur->next) {
+        if (cur->value && (STRCASEEQ('t','T',"top",cur->value) || STRCASEEQ('m','M',"middle",cur->value) || STRCASEEQ('b','B',"bottom",cur->value))) {
+          attr_valign = apr_pstrdup(doc->buf.pool, cur->value);
+        }
+      }
+      for (cur = bgcolor_prop->next; cur != bgcolor_prop; cur = cur->next) {
+        attr_bgcolor = apr_pstrdup(doc->pool, cur->value);
+        attr_bgcolor = chxj_css_rgb_func_to_value(doc->pool, attr_bgcolor);
+      }
+      for (cur = width_prop->next; cur != width_prop; cur = cur->next) {
+        attr_width = apr_pstrdup(doc->pool, cur->value);
+      }
+      for (cur = height_prop->next; cur != height_prop; cur = cur->next) {
+        attr_height = apr_pstrdup(doc->pool, cur->value);
+      }
+    }
+  }
+
+  W_L("<");
+  W_V(tagName);
+  if (attr_align){
+    W_L(" align=\"");
+    W_V(attr_align);
+    W_L("\"");
+  }
+  if (attr_valign){
+    W_L(" valign=\"");
+    W_V(attr_valign);
+    W_L("\"");
+  }
+  if (attr_colspan){
+    W_L(" colspan=\"");
+    W_V(attr_colspan);
+    W_L("\"");
+  }
+  if (attr_rowspan){
+    W_L(" rowspan=\"");
+    W_V(attr_rowspan);
+    W_L("\"");
+  }
+  if (attr_bgcolor && *attr_bgcolor){
+    W_L(" bgcolor=\"");
+    W_V(attr_bgcolor);
+    W_L("\"");
+  }
+  if (attr_width || attr_height ){
+    W_L(" style=\"");
+    if (attr_width){
+      W_L("width:");
+      W_V(attr_width);
+      W_L(";");
+    }
+    if (attr_height){
+      W_L("height:");
+      W_V(attr_height);
+      W_L(";");
+    }
+    W_L("\"");
+  }
+  W_L(">");
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the TD tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The TR tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_td_or_th_tag(void *pdoc, Node *UNUSED(child),char *tagName) 
+{
+  iphone_t      *iphone;
+  request_rec  *r;
+  Doc          *doc;
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = iphone->doc->r;
+  
+  W_L("</");
+  W_V(tagName);
+  W_L(">");
+  return iphone->out;
+}
+
+/**
+ * It is a handler who processes the TD tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The TD tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_td_tag(void *pdoc, Node *node) 
+{
+  return s_iphone_start_td_or_th_tag(pdoc,node,"td");
+}
+/**
+ * It is a handler who processes the TD tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The TD tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_td_tag(void *pdoc, Node *node) 
+{
+  return s_iphone_end_td_or_th_tag(pdoc,node,"td");
+}
+
+/**
+ * It is a handler who processes the TD tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The TD tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_th_tag(void *pdoc, Node *node) 
+{
+  return s_iphone_start_td_or_th_tag(pdoc,node,"th");
+}
+/**
+ * It is a handler who processes the TD tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The TD tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_th_tag(void *pdoc, Node *node) 
+{
+  return s_iphone_end_td_or_th_tag(pdoc,node,"th");
+}
+
+/**
+ * It is a handler who processes the FONT tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The FONT tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_font_tag(void *pdoc, Node *node) 
+{
+  iphone_t      *iphone;
+  Doc           *doc;
+  request_rec   *r;
+  Attr          *attr;
+  char          *attr_color = NULL;
+  char          *attr_size  = NULL;
+  char          *attr_style = NULL;
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = doc->r;
+
+  /*--------------------------------------------------------------------------*/
+  /* Get Attributes                                                           */
+  /*--------------------------------------------------------------------------*/
+  for (attr = qs_get_attr(doc,node);
+       attr; 
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name  = qs_get_attr_name(doc,attr);
+    char *value = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('c','C',"color",name) && value && *value) {
+      attr_color = apr_pstrdup(doc->buf.pool, value);
+    }
+    else if (STRCASEEQ('s','S',"size",name) && value && *value) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 5.0                                                            */
+      /*----------------------------------------------------------------------*/
+      attr_size = apr_pstrdup(doc->buf.pool, value);
+    }
+    else if (STRCASEEQ('s','S',"style",name) && value && *value) {
+      attr_style = apr_pstrdup(doc->buf.pool, value);
+    }
+  }
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *color_prop = chxj_css_get_property_value(doc, style, "color");
+      css_property_t *size_prop  = chxj_css_get_property_value(doc, style, "font-size");
+      css_property_t *cur;
+      for (cur = color_prop->next; cur != color_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          attr_color = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+      for (cur = size_prop->next; cur != size_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          attr_size = apr_pstrdup(doc->pool, cur->value);
+          if (STRCASEEQ('x','X',"xx-small",attr_size)) {
+            attr_size = apr_pstrdup(doc->pool, "1");
+          }
+          else if (STRCASEEQ('x','X',"x-small",attr_size)) {
+            attr_size = apr_pstrdup(doc->pool, "2");
+          }
+          else if (STRCASEEQ('s','S',"small",attr_size)) {
+            attr_size = apr_pstrdup(doc->pool, "3");
+          }
+          else if (STRCASEEQ('m','M',"medium",attr_size)) {
+            attr_size = apr_pstrdup(doc->pool, "4");
+          }
+          else if (STRCASEEQ('l','L',"large",attr_size)) {
+            attr_size = apr_pstrdup(doc->pool, "5");
+          }
+          else if (STRCASEEQ('x','X',"x-large",attr_size)) {
+            attr_size = apr_pstrdup(doc->pool, "6");
+          }
+          else if (STRCASEEQ('x','X',"xx-large",attr_size)) {
+            attr_size = apr_pstrdup(doc->pool, "7");
+          }
+        }
+      }
+    }
+  }
+  iphone_flags_t *flg = (iphone_flags_t *)apr_palloc(doc->pool, sizeof(*flg));
+  memset(flg, 0, sizeof(*flg));
+  if (attr_color) {
+    attr_color = chxj_css_rgb_func_to_value(doc->pool, attr_color);
+    W_L("<font color=\"");
+    W_V(attr_color);
+    W_L("\">");
+    flg->font_color_flag = 1;
+  }
+  if (attr_size) {
+    flg->font_size_flag = 1;
+    switch(*attr_size) {
+    case '1': W_L("<span style=\"font-size: xx-small\">"); break;
+    case '2': W_L("<span style=\"font-size: x-small\">");  break;
+    case '3': W_L("<span style=\"font-size: small\">");    break;
+    case '4': W_L("<span style=\"font-size: medium\">");   break;
+    case '5': W_L("<span style=\"font-size: large\">");    break;
+    case '6': W_L("<span style=\"font-size: x-large\">");  break;
+    case '7': W_L("<span style=\"font-size: xx-large\">"); break;
+    case '-':
+      if (*(attr_size + 1) == '1') {
+        W_L("<span style=\"font-size: small\">");
+        break;
+      }
+      if (*(attr_size + 1) == '2') {
+        W_L("<span style=\"font-size: x-small\">");
+        break;
+      }
+      if (*(attr_size + 1) == '3') {
+        W_L("<span style=\"font-size: xx-small\">");
+        break;
+      }
+      flg->font_size_flag = 0;
+      break;
+
+    case '+':
+      if (*(attr_size + 1) == '1') {
+        W_L("<span style=\"font-size: large\">");
+        break;
+      }
+      if (*(attr_size + 1) == '2') {
+        W_L("<span style=\"font-size: x-large\">");
+        break;
+      }
+      if (*(attr_size + 1) == '3') {
+        W_L("<span style=\"font-size: xx-large\">");
+        break;
+      }
+      flg->font_size_flag = 0;
+      break;
+
+    default:
+      WRN(doc->r, "invlalid font size. [%s] != (1|2|3|4|5|6|7|+1|+2|+3|-1|-2|-3)", attr_size);
+      flg->font_size_flag = 0;
+    }
+  }
+  node->userData = flg;
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the FONT tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The FONT tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_font_tag(void *pdoc, Node *node)
+{
+  iphone_t      *iphone;
+  request_rec  *r;
+  Doc          *doc;
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = iphone->doc->r;
+
+  iphone_flags_t *flg = (iphone_flags_t *)node->userData;
+  if (flg && flg->font_size_flag) {
+    W_L("</span>");
+  }
+  if (flg && flg->font_color_flag) {
+    W_L("</font>");
+  }
+  if (IS_CSS_ON(iphone->entryp)) {
+    chxj_css_pop_prop_list(iphone->css_prop_stack);
+  }
+
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the FORM tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The FORM tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_form_tag(void *pdoc, Node *node) 
+{
+  iphone_t    *iphone;
+  Doc         *doc;
+  request_rec *r;
+  Attr        *attr;
+  char        *attr_action = NULL;
+  char        *attr_method = NULL;
+  char        *attr_style  = NULL;
+  char        *attr_color  = NULL;
+  char        *attr_align  = NULL;
+  char        *attr_name   = NULL;
+  char        *css_clear   = NULL;
+  char        *new_hidden_tag = NULL;
+
+  iphone  = GET_IPHONE(pdoc);
+  doc     = iphone->doc;
+  r       = doc->r;
+
+  /*--------------------------------------------------------------------------*/
+  /* Get Attributes                                                           */
+  /*--------------------------------------------------------------------------*/
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name  = qs_get_attr_name(doc,attr);
+    char *value = qs_get_attr_value(doc,attr);
+    switch(*name) {
+    case 'a':
+    case 'A':
+      if (strcasecmp(name, "action") == 0) {
+        /*--------------------------------------------------------------------*/
+        /* CHTML 1.0                                                          */
+        /*--------------------------------------------------------------------*/
+        attr_action = value;
+      }
+      break;
+
+    case 'm':
+    case 'M':
+      if (strcasecmp(name, "method") == 0) {
+        /*--------------------------------------------------------------------*/
+        /* CHTML 1.0                                                          */
+        /*--------------------------------------------------------------------*/
+        attr_method = value;
+      }
+      break;
+
+    case 'n':
+    case 'N':
+      if (strcasecmp(name, "name") == 0) {
+        /*--------------------------------------------------------------------*/
+        /* CHTML 1.0                                                          */
+        /*--------------------------------------------------------------------*/
+        attr_name = value;
+      }
+      break;
+
+    case 's':
+    case 'S':
+      if (strcasecmp(name, "style") == 0) {
+        attr_style = value;
+      }
+      break;
+
+    default:
+      break;
+    }
+  }
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *text_align_prop = chxj_css_get_property_value(doc, style, "text-align");
+      css_property_t *color_prop      = chxj_css_get_property_value(doc, style, "color");
+      css_property_t *clear_prop      = chxj_css_get_property_value(doc, style, "clear");
+      css_property_t *cur;
+      for (cur = text_align_prop->next; cur != text_align_prop; cur = cur->next) {
+        if (STRCASEEQ('l','L',"left", cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "left");
+        }
+        else if (STRCASEEQ('c','C',"center",cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "center");
+        }
+        else if (STRCASEEQ('r','R',"right",cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "right");
+        }
+      }
+      for (cur = color_prop->next; cur != color_prop; cur = cur->next) {
+        attr_color = apr_pstrdup(doc->pool, cur->value);
+      }
+      for (cur = clear_prop->next; cur != clear_prop; cur = cur->next) {
+        css_clear = apr_pstrdup(doc->pool, cur->value);
+      }
+    }
+  }
+
+  int post_flag = (attr_method && strcasecmp(attr_method, "post") == 0) ? 1 : 0;
+
+  W_L("<form");
+  if (attr_action) {
+    attr_action = chxj_encoding_parameter(r, attr_action, 1);
+    attr_action = chxj_add_cookie_parameter(r, attr_action, iphone->cookie);
+    char *q;
+    char *old_qs = NULL;
+    q = strchr(attr_action, '?');
+    if (q) {
+      new_hidden_tag = chxj_form_action_to_hidden_tag(r, doc->pool, attr_action, 1, post_flag, &old_qs, CHXJ_FALSE, CHXJ_TRUE, iphone->entryp);
+      if (new_hidden_tag || old_qs) {
+        *q = 0;
+      }
+    }
+    W_L(" action=\"");
+    W_V(attr_action);
+    if (old_qs) {
+      W_L("?");
+      W_V(old_qs);
+    }
+    W_L("\"");
+  }
+  if (attr_method) {
+    W_L(" method=\"");
+    W_V(attr_method);
+    W_L("\"");
+  }
+  if (attr_name) {
+    W_L(" name=\"");
+    W_V(attr_name);
+    W_L("\"");
+  }
+  if (css_clear) {
+    W_L(" style=\"");
+    W_L("clear:");
+    W_V(css_clear);
+    W_L("\"");
+  }
+  W_L(">");
+
+  iphone_flags_t *flg = (iphone_flags_t *)apr_palloc(doc->pool, sizeof(iphone_flags_t));
+  memset(flg, 0, sizeof(*flg));
+  if (attr_color) {
+    attr_color = chxj_css_rgb_func_to_value(doc->pool, attr_color);
+    W_L("<font color=\"");
+    W_V(attr_color);
+    W_L("\">");
+    flg->with_font_flag = 1;
+  }
+  if (attr_align) {
+    W_L("<div align=\"");
+    W_V(attr_align);
+    W_L("\">");
+    flg->with_div_flag = 1;
+  }
+  node->userData = flg;
+  if (new_hidden_tag) {
+    W_V(new_hidden_tag);
+  }
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the FORM tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The FORM tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_form_tag(void *pdoc, Node *node)
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+  Doc      *doc    = iphone->doc;
+
+  iphone_flags_t *flg = (iphone_flags_t *)node->userData;
+  if (flg && flg->with_div_flag) {
+    W_L("</div>");
+  }
+  if (flg && flg->with_font_flag) {
+    W_L("</font>");
+  }
+  W_L("</form>");
+  if (IS_CSS_ON(iphone->entryp)) {
+    chxj_css_pop_prop_list(iphone->css_prop_stack);
+  }
+
+  return iphone->out;
+}
+
+static char *
+s_iphone_istyle_to_wap_input_format(apr_pool_t *p, const char *s)
+{
+  if (s) {
+    switch (s[0]) {
+    case '1': return apr_psprintf(p, "&quot;*&lt;ja:h&gt;&quot;");
+    case '2': return apr_psprintf(p, "&quot;*&lt;ja:hk&gt;&quot;");
+    case '3': return apr_psprintf(p, "&quot;*&lt;ja:en&gt;&quot;");
+    case '4': return apr_psprintf(p, "&quot;*&lt;ja:n&gt;&quot;");
+    default:
+      return apr_pstrdup(p, "");
+    }
+  }
+
+  return apr_pstrdup(p,"");
+}
+
+
+/**
+ * It is a handler who processes the INPUT tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The INPUT tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_input_tag(void *pdoc, Node *node) 
+{
+  iphone_t    *iphone;
+  Doc         *doc;
+  request_rec *r;
+  Attr        *attr;
+  char        *attr_accesskey  = NULL;
+  char        *attr_max_length = NULL;
+  char        *attr_type       = NULL;
+  char        *attr_name       = NULL;
+  char        *attr_value      = NULL;
+  char        *attr_istyle     = NULL;
+  char        *attr_size       = NULL;
+  char        *attr_checked    = NULL;
+  char        *attr_style      = NULL;
+
+  iphone  = GET_IPHONE(pdoc);
+  doc     = iphone->doc;
+  r       = doc->r;
+
+  /*--------------------------------------------------------------------------*/
+  /* Get Attributes                                                           */
+  /*--------------------------------------------------------------------------*/
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name  = qs_get_attr_name(doc,attr);
+    char *value = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('t','T',"type",name) && value && *value) {
+      char *tmp_type = qs_trim_string(doc->buf.pool, value);
+      if (tmp_type && (STRCASEEQ('t','T',"text",    tmp_type) ||
+                       STRCASEEQ('p','P',"password",tmp_type) ||
+                       STRCASEEQ('c','C',"checkbox",tmp_type) ||
+                       STRCASEEQ('r','R',"radio",   tmp_type) ||
+                       STRCASEEQ('h','H',"hidden",  tmp_type) ||
+                       STRCASEEQ('s','S',"submit",  tmp_type) ||
+                       STRCASEEQ('r','R',"reset",   tmp_type))) {
+        attr_type = tmp_type;
+      }
+    }
+    else if (STRCASEEQ('n','N',"name",name) && value && *value) {
+      attr_name = value;
+    }
+    else if (STRCASEEQ('v','V',"value",name) && value && *value) {
+      attr_value = value;
+    }
+    else if (STRCASEEQ('i','I',"istyle",name) && value && *value) {
+      attr_istyle = value;
+    }
+    else if (STRCASEEQ('m','M',"maxlength",name) && value && *value) {
+      attr_max_length = value;
+    }
+    else if (STRCASEEQ('c','C',"checked", name)) {
+      attr_checked = value;
+    }
+    else if (STRCASEEQ('a','A',"accesskey", name) && value && *value) {
+      attr_accesskey = value;
+    }
+    else if (STRCASEEQ('s','S',"size", name) && value && *value) {
+      attr_size = value;
+    }
+    else if (STRCASEEQ('s','S',"style", name) && value && *value) {
+      attr_style = value;
+    }
+  }
+
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *wap_input_format = chxj_css_get_property_value(doc, style, "-wap-input-format");
+      css_property_t *cur;
+      for (cur = wap_input_format->next; cur != wap_input_format; cur = cur->next) {
+        if (strcasestr(cur->value, "<ja:n>")) {
+          attr_istyle = "4";
+        }
+        else if (strcasestr(cur->value, "<ja:en>")) {
+          attr_istyle = "3";
+        }
+        else if (strcasestr(cur->value, "<ja:hk>")) {
+          attr_istyle = "2";
+        }
+        else if (strcasestr(cur->value, "<ja:h>")) {
+          attr_istyle = "1";
+        }
+      }
+    }
+  }
+
+  W_L("<input");
+  if (attr_size) {
+    W_L(" size=\"");
+    W_V(attr_size);
+    W_L("\"");
+  }
+  if (attr_name) {
+    W_L(" name=\"");
+    W_V(chxj_jreserved_to_safe_tag(r, attr_name, iphone->entryp));
+    W_L("\"");
+  }
+  if (attr_value) {
+    W_L(" value=\"");
+    W_V(chxj_add_slash_to_doublequote(doc->pool, attr_value));
+    W_L("\"");
+  }
+  if (attr_istyle && (*attr_istyle == '1' || *attr_istyle == '2' || *attr_istyle == '3' || *attr_istyle == '4')) {
+    if (attr_type && STRCASEEQ('t','T',"text",attr_type)) {
+      /* 1 => ignore */ 
+      /* 2 => ignore */
+      /* 3 => ignore */
+      /* 4 => number */
+      if (*attr_istyle == '4') {
+        attr_type = apr_pstrdup(r->pool, "number");
+      }
+    }
+  }
+  if (attr_type) {
+    W_L(" type=\"");
+    W_V(attr_type);
+    W_L("\"");
+  }
+  /*--------------------------------------------------------------------------*/
+  /* The figure is default for the password.                                  */
+  /*--------------------------------------------------------------------------*/
+  if (attr_max_length && *attr_max_length) {
+    if (chxj_chk_numeric(attr_max_length) == 0) {
+      W_L(" maxlength=\"");
+      W_V(attr_max_length);
+      W_L("\"");
+    }
+  }
+  if (attr_checked) {
+    W_L(" checked=\"checked\"");
+  }
+  W_L(" />");
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the INPUT tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The INPUT tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_input_tag(void *pdoc, Node *UNUSED(child)) 
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the CENTER tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The CENTER tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_center_tag(void *pdoc, Node *node)
+{
+  iphone_t *iphone;
+  Doc       *doc;
+  Attr      *attr;
+  char      *attr_style = NULL;
+  char      *attr_color = NULL;
+  char      *attr_size  = NULL;
+
+  iphone = GET_IPHONE(pdoc);
+  doc    = iphone->doc;
+
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name  = qs_get_attr_name(doc,attr);
+    char *value = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('s','S',"style",name) && value && *value) {
+      attr_style = value;
+    }
+  }
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *color_prop      = chxj_css_get_property_value(doc, style, "color");
+      css_property_t *size_prop       = chxj_css_get_property_value(doc, style, "font-size");
+      css_property_t *cur;
+      for (cur = color_prop->next; cur != color_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          attr_color = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+      for (cur = size_prop->next; cur != size_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          attr_size = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+    }
+  }
+
+  W_L("<center");
+  if (attr_size || attr_color) {
+    W_L(" style=\"");
+    if (attr_size) {
+      W_L("font-size:");
+      W_V(attr_size);
+      W_L(";");
+    }
+    if (attr_color) {
+      attr_color = chxj_css_rgb_func_to_value(doc->pool, attr_color);
+      W_L("color:");
+      W_V(attr_color);
+      W_L(";");
+    }
+    W_L("\"");
+  }
+  W_L(">");
+  
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the CENTER tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The CENTER tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_center_tag(void *pdoc, Node *UNUSED(node))
+{
+  iphone_t    *iphone;
+  Doc         *doc;
+  request_rec *r;
+
+  iphone = GET_IPHONE(pdoc);
+  doc    = iphone->doc;
+  r      = doc->r;
+
+  W_L("</center>");
+  if (IS_CSS_ON(iphone->entryp)) {
+    chxj_css_pop_prop_list(iphone->css_prop_stack);
+  }
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the li tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The li tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_li_tag(void *pdoc, Node *node)
+{
+  iphone_t    *iphone;
+  Doc         *doc;
+  request_rec *r;
+  Attr        *attr;
+  char        *attr_type  = NULL;
+  char        *attr_value = NULL;
+  char        *attr_style = NULL;
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = doc->r;
+
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name  = qs_get_attr_name(doc,attr);
+    char *value = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('t','T',"type",name)) {
+      if (value && (*value == '1' || *value == 'a' || *value == 'A' || STRCASEEQ('d','D',"disc",value) || STRCASEEQ('s','S',"square",value) || STRCASEEQ('c','C',"circle",value))) {
+        if (*value == '1') {
+          attr_type = apr_pstrdup(doc->pool, "decimal");
+        }
+        else if (*value == 'a') {
+          attr_type = apr_pstrdup(doc->pool, "lower-alpha");
+        }
+        else if (*value == 'A') {
+          attr_type = apr_pstrdup(doc->pool, "upper-alpha");
+        }
+        else {
+          attr_type = value;
+        }
+      }
+    }
+    else if (STRCASEEQ('v','V',"value", name) && value && *value) {
+      attr_value = value;
+    }
+    else if (STRCASEEQ('s','S',"style", name) && value && *value) {
+      attr_style = value;
+    }
+  }
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *list_style_type_prop = chxj_css_get_property_value(doc, style, "list-style-type");
+      css_property_t *cur;
+      for (cur = list_style_type_prop->next; cur != list_style_type_prop; cur = cur->next) {
+        if (STRCASEEQ('d','D',"decimal", cur->value)) {
+          attr_type = apr_pstrdup(doc->pool, "decimal");
+        }
+        else if (STRCASEEQ('u','U',"upper-alpha", cur->value)) {
+          attr_type = apr_pstrdup(doc->pool, "upper-alpha");
+        }
+        else if (STRCASEEQ('l','L',"lower-alpha", cur->value)) {
+          attr_type = apr_pstrdup(doc->pool, "lower-alpha");
+        }
+        else if (STRCASEEQ('d','D',"disc", cur->value)) {
+          attr_type = apr_pstrdup(doc->pool, "disc");
+        }
+        else if (STRCASEEQ('s','S',"square", cur->value)) {
+          attr_type = apr_pstrdup(doc->pool, "square");
+        }
+        else if (STRCASEEQ('c','C',"circle", cur->value)) {
+          attr_type = apr_pstrdup(doc->pool, "circle");
+        }
+      }
+    }
+  }
+
+
+  W_L("<li");
+  if (attr_type) {
+    W_L(" style=\"");
+    W_L("list-style-type:");
+    W_V(attr_type);
+    W_L(";");
+    W_L("\"");
+  }
+  if (attr_value) {
+    W_L(" value=\"");
+    W_V(attr_value);
+    W_L("\"");
+  }
+  W_L(">");
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the li tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The li tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_li_tag(void *pdoc, Node *UNUSED(child)) 
+{
+  iphone_t     *iphone;
+  Doc         *doc;
+  request_rec *r;
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = doc->r;
+
+  if (IS_CSS_ON(iphone->entryp)) {
+    chxj_css_pop_prop_list(iphone->css_prop_stack);
+  }
+  W_L("</li>");
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the OL tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The OL tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_ol_tag(void *pdoc, Node *node)
+{
+  iphone_t    *iphone;
+  Doc         *doc;
+  request_rec *r;
+  Attr        *attr;
+  char        *attr_style = NULL;
+  char        *attr_start = NULL;
+  char        *attr_type  = NULL;
+  char        *css_clear  = NULL;
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = doc->r;
+
+  /*--------------------------------------------------------------------------*/
+  /* Get Attributes                                                           */
+  /*--------------------------------------------------------------------------*/
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name = qs_get_attr_name(doc,attr);
+    char *value = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('t','T',"type",name) && value) {
+      if (*value == '1') {
+        attr_type = apr_pstrdup(doc->pool, "decimal");
+      }
+      else if (*value == 'a') {
+        attr_type = apr_pstrdup(doc->pool, "lower-alpha");
+      }
+      else if (*value == 'A') {
+        attr_type = apr_pstrdup(doc->pool, "upper-alpha");
+      }
+    }
+    else if (STRCASEEQ('s','S',"start",name) && value && *value) {
+      attr_start = value;
+    }
+    else if (STRCASEEQ('s','S',"style", name) && value && *value) {
+      attr_style = value;
+    }
+  }
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *list_style_type_prop = chxj_css_get_property_value(doc, style, "list-style-type");
+      css_property_t *clear_prop           = chxj_css_get_property_value(doc, style, "clear");
+      
+      css_property_t *cur;
+      for (cur = list_style_type_prop->next; cur != list_style_type_prop; cur = cur->next) {
+        if (STRCASEEQ('d','D',"decimal", cur->value)) {
+          attr_type = apr_pstrdup(doc->pool, "decimal");
+        }
+        else if (STRCASEEQ('u','U',"upper-alpha", cur->value)) {
+          attr_type = apr_pstrdup(doc->pool, "upper-alpha");
+        }
+        else if (STRCASEEQ('l','L',"lower-alpha", cur->value)) {
+          attr_type = apr_pstrdup(doc->pool, "lower-alpha");
+        }
+      }
+      for (cur = clear_prop->next; cur != clear_prop; cur = cur->next) {
+        css_clear = apr_pstrdup(doc->pool, cur->value);
+      }
+    }
+  }
+  W_L("<ol");
+  if (attr_type || css_clear) {
+    W_L(" style=\"");
+    if (attr_type) {
+      W_L("list-style-type:");
+      W_V(attr_type);
+      W_L(";");
+    }
+    if (css_clear){
+      W_L("clear:");
+      W_V(css_clear);
+      W_L(";");
+    }
+    W_L("\"");
+  }
+  if (attr_start) {
+    W_L(" start=\"");
+    W_V(attr_start);
+    W_L("\"");
+  }
+  W_L(">");
+
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the OL tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The OL tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_ol_tag(void *pdoc, Node *UNUSED(child)) 
+{
+  iphone_t     *iphone;
+  Doc         *doc;
+  request_rec *r;
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = doc->r;
+
+  W_L("</ol>");
+  if (IS_CSS_ON(iphone->entryp)) {
+    chxj_css_pop_prop_list(iphone->css_prop_stack);
+  }
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the P tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The P tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_p_tag(void *pdoc, Node *node)
+{
+  iphone_t    *iphone;
+  Doc         *doc;
+  request_rec *r;
+  Attr        *attr;
+  char        *attr_align = NULL;
+  char        *attr_style = NULL;
+  char        *attr_color = NULL;
+  char        *attr_blink = NULL;
+  char        *css_clear  = NULL;
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = doc->r;
+
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *nm  = qs_get_attr_name(doc,attr);
+    char *val = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('a','A',"align", nm)) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 1.0 (W3C version 3.2)                                          */
+      /*----------------------------------------------------------------------*/
+      if (val && (STRCASEEQ('l','L',"left",val) || STRCASEEQ('r','R',"right",val) || STRCASEEQ('c','C',"center",val))) {
+        attr_align = apr_pstrdup(doc->buf.pool, val);
+        break;
+      }
+    }
+    else if (STRCASEEQ('s','S',"style", nm) && val && *val) {
+      attr_style = apr_pstrdup(doc->buf.pool, val);
+    }
+  }
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *text_align_prop = chxj_css_get_property_value(doc, style, "text-align");
+      css_property_t *color_prop      = chxj_css_get_property_value(doc, style, "color");
+      css_property_t *text_deco_prop  = chxj_css_get_property_value(doc, style, "text-decoration");
+      css_property_t *clear_prop      = chxj_css_get_property_value(doc, style, "clear");
+      css_property_t *cur;
+      for (cur = text_align_prop->next; cur != text_align_prop; cur = cur->next) {
+        if (STRCASEEQ('l','L',"left",cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "left");
+        }
+        else if (STRCASEEQ('c','C',"center",cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "center");
+        }
+        else if (STRCASEEQ('r','R',"right",cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "right");
+        }
+      }
+      for (cur = color_prop->next; cur != color_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          attr_color = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+      for (cur = text_deco_prop->next; cur != text_deco_prop; cur = cur->next) {
+        if (cur->value && *cur->value && STRCASEEQ('b','B',"blink",cur->value)) {
+          attr_blink = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+      for (cur = clear_prop->next; cur != clear_prop; cur = cur->next) {
+        css_clear = apr_pstrdup(doc->pool, cur->value);
+      }
+    }
+  }
+  W_L("<p");
+  if ((attr_align && *attr_align) || (attr_color && *attr_color) || (attr_blink && *attr_blink) || css_clear) {
+    W_L(" style=\"");
+    if (attr_align) {
+      W_L("text-align:");
+      W_V(attr_align);
+      W_L(";");
+    }
+    if (attr_color) {
+      attr_color = chxj_css_rgb_func_to_value(doc->pool, attr_color);
+      W_L("color:");
+      W_V(attr_color);
+      W_L(";");
+    }
+    if (attr_blink) {
+      W_L("text-decoration:");
+      W_V(attr_blink);
+      W_L(";");
+    }
+    if (css_clear){
+      W_L("clear:");
+      W_V(css_clear);
+      W_L(";");
+    }
+    W_L("\"");
+  }
+  W_L(">");
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the P tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The P tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_p_tag(void *pdoc, Node *UNUSED(child)) 
+{
+  iphone_t  *iphone = GET_IPHONE(pdoc);
+  Doc       *doc    = iphone->doc;
+
+  W_L("</p>");
+  if (IS_CSS_ON(iphone->entryp)) {
+    chxj_css_pop_prop_list(iphone->css_prop_stack);
+  }
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the PRE tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The PRE tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_pre_tag(void *pdoc, Node *node)
+{
+  iphone_t  *iphone = GET_IPHONE(pdoc);
+  Doc       *doc   = iphone->doc;
+  Attr      *attr;
+  char      *attr_style = NULL;
+  char      *css_clear  = NULL;
+
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *nm  = qs_get_attr_name(doc,attr);
+    char *val = qs_get_attr_value(doc,attr);
+    if (val && STRCASEEQ('s','S',"style", nm)) {
+      attr_style = val;
+    }
+  }
+
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *clear_prop           = chxj_css_get_property_value(doc, style, "clear");
+      
+      css_property_t *cur;
+      for (cur = clear_prop->next; cur != clear_prop; cur = cur->next) {
+        css_clear = apr_pstrdup(doc->pool, cur->value);
+      }
+    }
+  }
+
+  iphone->pre_flag++;
+  W_L("<pre");
+  if (css_clear) {
+    W_L(" style=\"");
+    W_L("clear:");
+    W_V(css_clear);
+    W_L(";");
+    W_L("\"");
+  }
+  W_L(">");
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the PRE tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The PRE tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_pre_tag(void *pdoc, Node *UNUSED(child)) 
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+  Doc     *doc   = iphone->doc;
+
+  W_L("</pre>");
+  iphone->pre_flag--;
+  if (IS_CSS_ON(iphone->entryp)) {
+    chxj_css_pop_prop_list(iphone->css_prop_stack);
+  }
+
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the UL tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The UL tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_ul_tag(void *pdoc, Node *node)
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+  Doc      *doc    = iphone->doc;
+  Attr     *attr;
+  char     *attr_type = NULL;
+  char     *attr_style = NULL;
+  char     *css_clear  = NULL;
+  
+  /*--------------------------------------------------------------------------*/
+  /* Get Attributes                                                           */
+  /*--------------------------------------------------------------------------*/
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name   = qs_get_attr_name(doc,attr);
+    char *value  = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('t','T',"type",name)) {
+      if (value && (STRCASEEQ('d','D',"disc",value) || STRCASEEQ('c','C',"circle",value) || STRCASEEQ('s','S',"square",value))) {
+        attr_type = value;
+      }
+    }
+    else if (value && *value && STRCASEEQ('s','S',"style", name)) {
+      attr_style = value;
+    }
+  }
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *list_style_type_prop = chxj_css_get_property_value(doc, style, "list-style-type");
+      css_property_t *clear_prop           = chxj_css_get_property_value(doc, style, "clear");
+      
+      css_property_t *cur;
+      for (cur = list_style_type_prop->next; cur != list_style_type_prop; cur = cur->next) {
+        if (STRCASEEQ('d','D',"disc",cur->value)) {
+          attr_type = apr_pstrdup(doc->pool, "disc");
+        }
+        else if (STRCASEEQ('c','C',"circle",cur->value)) {
+          attr_type = apr_pstrdup(doc->pool, "circle");
+        }
+        else if (STRCASEEQ('s','S',"square",cur->value)) {
+          attr_type = apr_pstrdup(doc->pool, "square");
+        }
+      }
+      for (cur = clear_prop->next; cur != clear_prop; cur = cur->next) {
+        css_clear = apr_pstrdup(doc->pool, cur->value);
+      }
+    }
+  }
+  W_L("<ul");
+  if (attr_type || css_clear) {
+    W_L(" style=\"");
+    if (attr_type ){
+      W_L("list-style-type:");
+      W_V(attr_type);
+      W_L(";");
+    }
+    if (css_clear){
+      W_L("clear:");
+      W_V(css_clear);
+      W_L(";");
+    }
+    W_L("\"");
+  }
+  W_L(">");
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the UL tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The UL tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_ul_tag(void *pdoc, Node *UNUSED(child)) 
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+  Doc     *doc   = iphone->doc;
+
+  W_L("</ul>");
+  if (IS_CSS_ON(iphone->entryp)) {
+    chxj_css_pop_prop_list(iphone->css_prop_stack);
+  }
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the HR tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The HR tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_hr_tag(void *pdoc, Node *node) 
+{
+  Attr        *attr;
+  iphone_t     *iphone;
+  Doc         *doc;
+  request_rec *r;
+  char        *attr_align   = NULL;
+  char        *attr_size    = NULL;
+  char        *attr_width   = NULL;
+  char        *attr_noshade = NULL;
+  char        *attr_style   = NULL;
+  char        *attr_color   = NULL;
+  char        *attr_bgcolor = NULL;
+  
+  char        *style_border_color = NULL;
+  char        *css_clear          = NULL;
+
+  iphone   = GET_IPHONE(pdoc);
+  doc     = iphone->doc;
+  r       = doc->r;
+
+  for (attr = qs_get_attr(doc,node);
+       attr; 
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name  = qs_get_attr_name (doc,attr);
+    char *value = qs_get_attr_value(doc,attr);
+    switch(*name) {
+    case 'a':
+    case 'A':
+      if (strcasecmp(name, "align") == 0) {
+        /*--------------------------------------------------------------------*/
+        /* CHTML 1.0                                                          */
+        /*--------------------------------------------------------------------*/
+        if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
+          if (value[0] == 'c' || value[0] == 'C') {
+            attr_align = apr_pstrdup(doc->pool, "none");
+          }
+          else {
+            attr_align = value;
+          }
+        }
+      }
+      break;
+
+    case 's':
+    case 'S':
+      if (strcasecmp(name, "size") == 0) {
+        /*--------------------------------------------------------------------*/
+        /* CHTML 1.0                                                          */
+        /*--------------------------------------------------------------------*/
+        if (value && *value) {
+          attr_size = value;
+        }
+      }
+      else if (strcasecmp(name, "style") == 0) {
+        if (value && *value) {
+          attr_style = value;
+        }
+      }
+      break;
+
+    case 'w':
+    case 'W':
+      if (strcasecmp(name, "width") == 0) {
+        /*--------------------------------------------------------------------*/
+        /* CHTML 1.0                                                          */
+        /*--------------------------------------------------------------------*/
+        if (value && *value) {
+          attr_width = value;
+        }
+      }
+      break;
+
+    case 'n':
+    case 'N':
+      if (strcasecmp(name, "noshade") == 0) {
+        /*--------------------------------------------------------------------*/
+        /* CHTML 1.0                                                          */
+        /*--------------------------------------------------------------------*/
+        attr_noshade = apr_pstrdup(doc->pool, "noshade");
+      }
+      break;
+
+    case 'c':
+    case 'C':
+      if (strcasecmp(name, "color") == 0 && value && *value) {
+        /*--------------------------------------------------------------------*/
+        /* CHTML 4.0                                                          */
+        /*--------------------------------------------------------------------*/
+        attr_color = value;
+      }
+      break;
+
+    default:
+      break;
+    }
+  }
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *border_style_prop = chxj_css_get_property_value(doc, style, "border-style");
+      css_property_t *height_prop       = chxj_css_get_property_value(doc, style, "height");
+      css_property_t *width_prop        = chxj_css_get_property_value(doc, style, "width");
+      
+      css_property_t *bgcolor_prop      = chxj_css_get_property_value(doc, style, "background-color");
+      css_property_t *float_prop        = chxj_css_get_property_value(doc, style, "float");
+      css_property_t *border_color_prop = chxj_css_get_property_value(doc, style, "border-color");
+      css_property_t *clear_prop        = chxj_css_get_property_value(doc, style, "clear");
+      css_property_t *cur;
+      
+      for (cur = border_style_prop->next; cur != border_style_prop; cur = cur->next) {
+        if (STRCASEEQ('s','S',"solid",cur->value)) {
+          attr_noshade = "noshade";
+        }
+      }
+      for (cur = height_prop->next; cur != height_prop; cur = cur->next) {
+        attr_size = apr_pstrdup(doc->pool, cur->value);
+      }
+      for (cur = bgcolor_prop->next; cur != bgcolor_prop; cur = cur->next) {
+        attr_bgcolor = apr_pstrdup(doc->pool, cur->value);
+      }
+      if (!attr_align) {
+        for (cur = float_prop->next; cur != float_prop; cur = cur->next) {
+          attr_align = apr_pstrdup(doc->pool,cur->value);
+        }
+      }
+      
+      
+      for (cur = width_prop->next; cur != width_prop; cur = cur->next) {
+        char *tmp = apr_pstrdup(doc->pool, cur->value);
+        char *tmpp = strstr(tmp, "px");
+        if (tmpp) {
+          attr_width = apr_pstrdup(doc->pool, tmp);
+        }
+        else {
+          tmpp = strstr(tmp, "%");
+          if (tmpp) {
+            attr_width = apr_pstrdup(doc->pool, tmp);
+          }
+        }
+      }
+      
+      for (cur = border_color_prop->next; cur != border_color_prop; cur = cur->next) {
+        char *tmp = apr_pstrdup(doc->pool, cur->value);
+        if(tmp){
+          style_border_color = apr_pstrdup(doc->pool, tmp);
+        }
+      }
+      for (cur = clear_prop->next; cur != clear_prop; cur = cur->next) {
+        css_clear = apr_pstrdup(doc->pool, cur->value);
+      }
+    }
+  }
+  W_L("<hr");
+  if (attr_align || attr_size || attr_width || attr_noshade || style_border_color || css_clear || attr_bgcolor) {
+    W_L(" style=\"");
+    if (attr_align) {
+      W_L("float:");
+      W_V(attr_align);
+      W_L(";");
+    }
+    if (attr_size) {
+      W_L("height:");
+      W_V(attr_size);
+      if (chxj_chk_numeric(attr_size) == 0) {
+        W_L("px");
+      }
+      W_L(";");
+    }
+    if (attr_width) {
+      W_L("width:");
+      W_V(attr_width);
+      if (!strstr(attr_width, "px") && !strstr(attr_width, "%")) {
+        W_L("px");
+      }
+      W_L(";");
+    }
+    if (attr_noshade) {
+      W_L("border-style:solid;");
+    }
+    if(style_border_color){
+      W_L("border-color:");
+      W_V(style_border_color);
+      W_L(";");
+    }
+    if (attr_bgcolor) {
+      W_L("background-color:");
+      W_V(attr_bgcolor);
+      W_L(";");
+    }
+    if (css_clear){
+      W_L("clear:");
+      W_V(css_clear);
+      W_L(";");
+    }
+    W_L("\"");
+  }
+  if (attr_color) {
+    W_L(" color=\"");
+    W_V(attr_color);
+    W_L("\"");
+  }
+  
+  W_L(" />");
+
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the HR tag.
+ *
+ * @param iphone  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The HR tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_hr_tag(void *pdoc, Node *UNUSED(child)) 
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the IMG tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The IMG tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_img_tag(void *pdoc, Node *node) 
+{
+  iphone_t    *iphone = GET_IPHONE(pdoc);
+  Doc         *doc   = iphone->doc;
+  request_rec *r     = doc->r;
+  Attr        *attr;
+  char        *attr_src    = NULL;
+  char        *attr_height = NULL;
+  char        *attr_width  = NULL;
+  char        *attr_alt    = NULL;
+  char        *attr_style  = NULL;
+  char        *attr_hspace = NULL;
+  char        *attr_vspace = NULL;
+  
+  char        *css_float          = NULL;
+  char        *css_margin_left    = NULL;
+  char        *css_margin_right   = NULL;
+  char        *css_margin_top     = NULL;
+  char        *css_margin_bottom  = NULL;
+  char        *css_display        = NULL;
+  char        *css_valign         = NULL;
+  
+#ifndef IMG_NOT_CONVERT_FILENAME
+  device_table  *spec = iphone->spec;
+#endif
+
+  /*--------------------------------------------------------------------------*/
+  /* Get Attributes                                                           */
+  /*--------------------------------------------------------------------------*/
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name  = qs_get_attr_name(doc,attr);
+    char *value = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('s','S',"src",name)) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 1.0                                                            */
+      /*----------------------------------------------------------------------*/
+#ifdef IMG_NOT_CONVERT_FILENAME
+      value = chxj_encoding_parameter(r, value, 1);
+      value = chxj_jreserved_tag_to_safe_for_query_string(r, value, iphone->entryp, 1);
+      value = chxj_add_cookie_no_update_parameter(r, value);
+      value = chxj_img_rewrite_parameter(r,iphone->conf,value);
+      attr_src = value;
+#else
+      value = chxj_img_conv(r, spec, value);
+      value = chxj_encoding_parameter(r, value, 1);
+      value = chxj_jreserved_tag_to_safe_for_query_string(r, value, iphone->entryp, 1);
+      value = chxj_add_cookie_no_update_parameter(r, value);
+      value = chxj_img_rewrite_parameter(r,iphone->conf,value);
+      attr_src = value;
+#endif
+    }
+    else if (STRCASEEQ('a','A',"align",name)) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 1.0                                                            */
+      /*----------------------------------------------------------------------*/
+      if (value) {
+        if (STRCASEEQ('t','T',"top",   value) ||
+            STRCASEEQ('m','M',"middle",value) ||
+            STRCASEEQ('b','B',"bottom",value)){
+          css_valign = value;
+        }else if (STRCASEEQ('l','L',"left",  value) || STRCASEEQ('r','R',"right", value)) {
+          css_float = value;
+        }
+        else if (STRCASEEQ('c','C',"center",value)) {
+          css_valign = apr_pstrdup(doc->pool, "middle");
+        }
+      }
+    }
+    else if (STRCASEEQ('w','W',"width",name) && value && *value) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 1.0                                                            */
+      /*----------------------------------------------------------------------*/
+      attr_width = value;
+    }
+    else if (STRCASEEQ('h','H',"height",name) && value && *value) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 1.0                                                            */
+      /*----------------------------------------------------------------------*/
+      attr_height = value;
+    }
+    else if (STRCASEEQ('h','H',"hspace",name)) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 1.0                                                            */
+      /*----------------------------------------------------------------------*/
+      attr_hspace = value;
+    }
+    else if (STRCASEEQ('v','V',"vspace",name)) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 1.0                                                            */
+      /*----------------------------------------------------------------------*/
+      attr_vspace = value;
+    }
+    else if (STRCASEEQ('a','A',"alt",name) && value && *value) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 1.0                                                            */
+      /*----------------------------------------------------------------------*/
+      attr_alt = value;
+    }
+    else if (STRCASEEQ('s','S',"style",name) && value && *value) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 1.0                                                            */
+      /*----------------------------------------------------------------------*/
+      attr_style = value;
+    }
+  }
+
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *height_prop = chxj_css_get_property_value(doc, style, "height");
+      css_property_t *width_prop  = chxj_css_get_property_value(doc, style, "width");
+      css_property_t *valign_prop = chxj_css_get_property_value(doc, style, "vertical-align");
+      css_property_t *margin_left_prop   = chxj_css_get_property_value(doc, style, "margin-left");
+      css_property_t *margin_right_prop  = chxj_css_get_property_value(doc, style, "margin-right");
+      css_property_t *margin_top_prop    = chxj_css_get_property_value(doc, style, "margin-top");
+      css_property_t *margin_bottom_prop = chxj_css_get_property_value(doc, style, "margin-bottom");
+      
+      
+      css_property_t *cur;
+      for (cur = height_prop->next; cur != height_prop; cur = cur->next) {
+        attr_height = apr_pstrdup(doc->pool, cur->value);
+      }
+      for (cur = width_prop->next; cur != width_prop; cur = cur->next) {
+        attr_width = apr_pstrdup(doc->pool, cur->value);
+      }
+      if(!css_valign){
+        for (cur = valign_prop->next; cur != valign_prop; cur = cur->next) {
+          css_valign = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+      if (! attr_hspace) {
+        for (cur = margin_left_prop->next; cur != margin_left_prop; cur = cur->next) {
+          css_margin_left   = apr_pstrdup(doc->pool, cur->value);
+        }
+        for (cur = margin_right_prop->next; cur != margin_right_prop; cur = cur->next) {
+          css_margin_right  = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+      if (! attr_vspace) {
+        for (cur = margin_top_prop->next; cur != margin_top_prop; cur = cur->next) {
+          css_margin_top = apr_pstrdup(doc->pool, cur->value);
+        }
+        for (cur = margin_bottom_prop->next; cur != margin_bottom_prop; cur = cur->next) {
+          css_margin_bottom = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+      if(!css_float){
+        css_property_t *float_prop = chxj_css_get_property_value(doc, style, "float");
+        for (cur = float_prop->next; cur != float_prop; cur = cur->next) {
+          css_float = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+      
+      css_property_t *display_prop       = chxj_css_get_property_value(doc, style, "display");
+      for (cur = display_prop->next; cur != display_prop; cur = cur->next) {
+        char *tmp = apr_pstrdup(doc->pool, cur->value);
+        char *tmpp = strstr(tmp, "none");
+        if(tmpp){
+          css_display = apr_pstrdup(doc->pool, tmp);
+        }
+      }
+    }
+  }
+
+  W_L("<img");
+  if (attr_src) {
+    W_L(" src=\"");
+    W_V(attr_src);
+    W_L("\"");
+  }
+  if (attr_hspace || attr_vspace || css_float || css_margin_left || css_margin_right || css_margin_top || css_margin_bottom || css_valign || css_display) {
+    W_L(" style=\"");
+    if(css_float){
+      W_L("float:");
+      W_V(css_float);
+      W_L(";");
+    }
+    if(css_valign){
+      W_L("vertical-align:");
+      W_V(css_valign);
+      W_L(";");
+    }
+    if (attr_hspace) {
+      W_L("margin-left:");
+      W_V(attr_hspace);
+      W_L(";");
+      W_L("margin-right:");
+      W_V(attr_hspace);
+      W_L(";");
+    }
+    else{
+      if(css_margin_left){
+        W_L("margin-left:");
+        W_V(css_margin_left);
+        W_L(";");
+      }
+      if(css_margin_right){
+        W_L("margin-right:");
+        W_V(css_margin_right);
+        W_L(";");
+      }
+    }
+    if (attr_vspace) {
+      W_L("margin-top:");
+      W_V(attr_vspace);
+      W_L(";");
+      W_L("margin-bottom:");
+      W_V(attr_vspace);
+      W_L(";");
+    }
+    else{
+      if(css_margin_top){
+        W_L("margin-top:");
+        W_V(css_margin_top);
+        W_L(";");
+      }
+      if(css_margin_bottom){
+        W_L("margin-bottom:");
+        W_V(css_margin_bottom);
+        W_L(";");
+      }
+    }
+    if(css_display){
+      W_L("display:none;");
+    }
+    W_L("\"");
+  }
+  
+  if (attr_width) {
+    W_L(" width=\"");
+    W_V(attr_width);
+    W_L("\"");
+  }
+  if (attr_height) {
+    W_L(" height=\"");
+    W_V(attr_height);
+    W_L("\"");
+  }
+  if (attr_alt) {
+    W_L(" alt=\"");
+    W_V(attr_alt);
+    W_L("\"");
+  } 
+  else {
+    W_L(" alt=\"\"");
+  }
+  W_L(" />");
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the IMG tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The IMG tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_img_tag(void *pdoc, Node *UNUSED(child)) 
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the SELECT tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The SELECT tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_select_tag(void *pdoc, Node *node)
+{
+  iphone_t *iphone    = GET_IPHONE(pdoc);
+  Doc     *doc      = iphone->doc;
+  Attr    *attr;
+  char    *size     = NULL;
+  char    *name     = NULL;
+  char    *multiple = NULL;
+  char    *attr_style = NULL;
+
+  W_L("<select");
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *nm  = qs_get_attr_name(doc,attr);
+    char *val = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('s','S',"size",nm)) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 1.0 version 2.0                                                */
+      /*----------------------------------------------------------------------*/
+      size = apr_pstrdup(doc->buf.pool, val);
+    }
+    else if (STRCASEEQ('s','S',"style",nm) && val && *val) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 1.0 version 2.0                                                */
+      /*----------------------------------------------------------------------*/
+      attr_style = apr_pstrdup(doc->buf.pool, val);
+    }
+    else if (STRCASEEQ('n','N',"name",nm)) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 1.0 version 2.0                                                */
+      /*----------------------------------------------------------------------*/
+      name = apr_pstrdup(doc->buf.pool, val);
+    }
+    else if (STRCASEEQ('m','M',"multiple", nm)) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 1.0 version 2.0                                                */
+      /*----------------------------------------------------------------------*/
+      multiple = apr_pstrdup(doc->buf.pool, val);
+    }
+  }
+  if (size && *size) {
+    W_L(" size=\"");
+    W_V(size);
+    W_L("\"");
+  }
+  if (name && *name) {
+    W_L(" name=\"");
+    W_V(name);
+    W_L("\"");
+  }
+  if (multiple) {
+    W_L(" multiple=\"multiple\"");
+  }
+  W_L(">");
+
+  if (IS_CSS_ON(iphone->entryp)) {
+    s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+  }
+
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the SELECT tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The SELECT tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_select_tag(void *pdoc, Node *UNUSED(child))
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+  Doc     *doc   = iphone->doc;
+
+  W_L("</select>");
+  if (IS_CSS_ON(iphone->entryp)) {
+    chxj_css_pop_prop_list(iphone->css_prop_stack);
+  }
+
+  return iphone->out;
+}
+
+/**
+ * It is a handler who processes the OPTION tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The OPTION tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_option_tag(void *pdoc, Node *node)
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+  Doc     *doc   = iphone->doc;
+  Attr    *attr;
+
+  char *selected   = NULL;
+  char *value      = NULL;
+  char *attr_style = NULL;
+
+  W_L("<option");
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *nm  = qs_get_attr_name(doc,attr);
+    char *val = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('s','S',"selected",nm)) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 1.0 version 2.0                                                */
+      /*----------------------------------------------------------------------*/
+      selected = apr_pstrdup(doc->buf.pool, val);
+    }
+    else if (STRCASEEQ('s','S',"style",nm) && val && *val) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 1.0 version 2.0                                                */
+      /*----------------------------------------------------------------------*/
+      attr_style = apr_pstrdup(doc->buf.pool, val);
+    }
+    else if (STRCASEEQ('v','V',"value",nm)) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 1.0 version 2.0                                                */
+      /*----------------------------------------------------------------------*/
+      value = apr_pstrdup(doc->buf.pool, val);
+    }
+  }
+  if (value) {
+    W_L(" value=\"");
+    W_V(value);
+    W_L("\"");
+  }
+  if (selected) {
+    W_L(" selected=\"selected\"");
+  }
+  W_L(">");
+
+  if (IS_CSS_ON(iphone->entryp)) {
+    s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+  }
+
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the OPTION tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The OPTION tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_option_tag(void *pdoc, Node *UNUSED(child))
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+  Doc      *doc = iphone->doc;
+
+  W_L("</option>");
+  if (IS_CSS_ON(iphone->entryp)) {
+    chxj_css_pop_prop_list(iphone->css_prop_stack);
+  }
+
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the DIV tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The DIV tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_div_tag(void *pdoc, Node *node)
+{
+  iphone_t    *iphone;
+  Doc         *doc;
+  request_rec *r;
+  Attr        *attr;
+  char        *attr_style             = NULL;
+  char        *attr_align             = NULL;
+  char        *attr_display           = NULL;
+  char        *attr_decoration        = NULL;
+  char        *attr_wap_marquee_style = NULL;
+  char        *attr_wap_marquee_dir   = NULL;
+  char        *attr_wap_marquee_loop  = NULL;
+  char        *attr_wap_marquee_speed = NULL;
+  char        *attr_color             = NULL;
+  char        *attr_bgcolor           = NULL;
+  char        *attr_font_size         = NULL;
+  char        *css_clear              = NULL;
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = doc->r;
+
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *nm  = qs_get_attr_name(doc,attr);
+    char *val = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('a','A',"align",nm)) {
+      /*----------------------------------------------------------------------*/
+      /* CHTML 1.0 (W3C version 3.2)                                          */
+      /*----------------------------------------------------------------------*/
+      if (val && (STRCASEEQ('l','L',"left",val) || STRCASEEQ('r','R',"right",val) || STRCASEEQ('c','C',"center",val))) {
+        attr_align = apr_pstrdup(doc->buf.pool, val);
+      }
+    }
+    else if (STRCASEEQ('s','S',"style",nm) && val && *val) {
+      attr_style = apr_pstrdup(doc->buf.pool, val);
+    }
+  }
+
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *display_prop           = chxj_css_get_property_value(doc, style, "display");
+      css_property_t *text_decoration_prop   = chxj_css_get_property_value(doc, style, "text-decoration");
+      css_property_t *color_prop             = chxj_css_get_property_value(doc, style, "color");
+      css_property_t *text_align_prop        = chxj_css_get_property_value(doc, style, "text-align");
+      css_property_t *font_size_prop         = chxj_css_get_property_value(doc, style, "font-size");
+      css_property_t *background_color_prop  = chxj_css_get_property_value(doc, style, "background-color");
+      css_property_t *background_prop        = chxj_css_get_property_value(doc, style, "background");
+      css_property_t *clear_prop             = chxj_css_get_property_value(doc, style, "clear");
+
+      css_property_t *cur;
+      for (cur = display_prop->next; cur != display_prop; cur = cur->next) {
+        if (strcasecmp("-wap-marquee", cur->value) == 0) {
+          attr_display = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+      for (cur = text_decoration_prop->next; cur != text_decoration_prop; cur = cur->next) {
+        if (STRCASEEQ('b','B',"blink", cur->value)) {
+          attr_decoration = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+      for (cur = color_prop->next; cur != color_prop; cur = cur->next) {
+        attr_color = apr_pstrdup(doc->pool, cur->value);
+      }
+      for (cur = background_color_prop->next; cur != background_color_prop; cur = cur->next) {
+        attr_bgcolor = apr_pstrdup(doc->pool, cur->value);
+        attr_bgcolor = chxj_css_rgb_func_to_value(doc->pool, attr_bgcolor);
+      }
+      for (cur = background_prop->next; cur != background_prop; cur = cur->next) {
+        char *ss = strchr(cur->value, '#');
+        if (!ss || !*ss) {
+          ss = strstr(cur->value, "rgb");
+        }
+        if (ss && *ss) {
+          attr_bgcolor = apr_pstrdup(doc->pool, cur->value);
+          attr_bgcolor = chxj_css_rgb_func_to_value(doc->pool, attr_bgcolor);
+        }
+      }
+      for (cur = text_align_prop->next; cur != text_align_prop; cur = cur->next) {
+        attr_align = apr_pstrdup(doc->pool, cur->value);
+      }
+      for (cur = font_size_prop->next; cur != font_size_prop; cur = cur->next) {
+        if (   STRCASEEQ('x','X',"xx-small",cur->value)
+            || STRCASEEQ('x','X',"x-small",cur->value)
+            || STRCASEEQ('s','S',"small",cur->value)
+            || STRCASEEQ('m','M',"medium",cur->value)
+            || STRCASEEQ('l','L',"large",cur->value)
+            || STRCASEEQ('x','X',"x-large",cur->value)
+            || STRCASEEQ('x','X',"xx-large",cur->value)) {
+          attr_font_size = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+      if (attr_display) {
+        css_property_t *wap_marquee_style_prop = chxj_css_get_property_value(doc, style, "-wap-marquee-style");
+        css_property_t *wap_marquee_dir_prop   = chxj_css_get_property_value(doc, style, "-wap-marquee-dir");
+        css_property_t *wap_marquee_loop_prop  = chxj_css_get_property_value(doc, style, "-wap-marquee-loop");
+        css_property_t *wap_marquee_speed_prop = chxj_css_get_property_value(doc, style, "-wap-marquee-speed");
+        for (cur = wap_marquee_style_prop->next; cur != wap_marquee_style_prop; cur = cur->next) {
+          if (STRCASEEQ('s','S',"scroll", cur->value) || STRCASEEQ('s','S',"slide",cur->value) || STRCASEEQ('a','A',"alternate",cur->value)) {
+            attr_wap_marquee_style = apr_pstrdup(doc->pool, cur->value);
+          }
+        }
+        for (cur = wap_marquee_dir_prop->next; cur != wap_marquee_dir_prop; cur = cur->next) {
+          if (STRCASEEQ('l','L',"ltr",cur->value)) {
+            attr_wap_marquee_dir = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('r','R',"rtl",cur->value)) {
+            attr_wap_marquee_dir = apr_pstrdup(doc->pool, cur->value);
+          }
+        }
+        for (cur = wap_marquee_loop_prop->next; cur != wap_marquee_loop_prop; cur = cur->next) {
+          if(strcmp(cur->value,"0") == 0 || strcmp(cur->value,"-1") == 0){
+            attr_wap_marquee_loop = "infinite";
+          }
+          else{
+            attr_wap_marquee_loop = apr_pstrdup(doc->pool, cur->value);
+          }
+        }
+        for (cur = wap_marquee_speed_prop->next; cur != wap_marquee_speed_prop; cur = cur->next) {
+          attr_wap_marquee_speed = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+      for (cur = clear_prop->next; cur != clear_prop; cur = cur->next) {
+        css_clear = apr_pstrdup(doc->pool, cur->value);
+      }
+    }
+  }  
+  W_L("<div");
+  if (attr_align
+      || attr_display
+      || attr_decoration
+      || attr_wap_marquee_style
+      || attr_wap_marquee_dir
+      || attr_wap_marquee_loop
+      || attr_wap_marquee_speed
+      || attr_color
+      || attr_bgcolor
+      || attr_font_size
+      || css_clear ) {
+    W_L(" style=\"");
+    if (attr_align) {
+      W_L("text-align:");
+      W_V(attr_align);
+      W_L(";");
+    }
+    if (attr_display) {
+      /* only marquee */
+      W_L("overflow:-webkit-marquee;");
+    }
+    if (attr_decoration) {
+      if (STRCASEEQ('b','B',"blink",attr_decoration)) {
+        W_L(STYLE_BLINK);
+        if (iphone->blink_keyframe_out == 0) {
+          iphone->style_data = apr_pstrcat(doc->pool, (iphone->style_data) ? iphone->style_data : "",
+                                                      BLINK_KEYFRAME,
+                                                      NULL);
+          iphone->blink_keyframe_out = 1;
+        }
+      }
+      else {
+        W_L("text-decoration:");
+        W_V(attr_decoration);
+        W_L(";");
+      }
+    }
+    if (attr_wap_marquee_style) {
+      W_L("-webkit-marquee-style:");
+      W_V(attr_wap_marquee_style);
+      W_L(";");
+    }
+    if (attr_wap_marquee_dir) {
+      W_L("-webkit-marquee-direction:");
+      if (STRCASEEQ('r','R',"rtl",attr_wap_marquee_dir)) {
+        W_L("left");
+      }
+      else if (STRCASEEQ('l','L',"ltr",attr_wap_marquee_dir)) {
+        W_L("right");
+      }
+      W_L(";");
+    }
+    if (attr_wap_marquee_loop) {
+      W_L("-webkit-marquee-repetition:");
+      W_V(attr_wap_marquee_loop);
+      W_L(";");
+    }
+    if (attr_wap_marquee_speed) {
+      W_L("-webkit-marquee-speed:");
+      W_V(attr_wap_marquee_speed);
+      W_L(";");
+    }
+    if (attr_color) {
+      W_L("color:");
+      W_V(attr_color);
+      W_L(";");
+    }
+    if (attr_bgcolor) {
+      W_L("background-color:");
+      W_V(attr_bgcolor);
+      W_L(";");
+    }
+    if (attr_font_size) {
+      W_L("font-size:");
+      W_V(attr_font_size);
+      W_L(";");
+    }
+    if (css_clear){
+      W_L("clear:");
+      W_V(css_clear);
+      W_L(";");
+    }
+    W_L("\"");
+  }
+  W_L(">");
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the DIV tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The DIV tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_div_tag(void *pdoc, Node *UNUSED(child))
+{
+  iphone_t      *iphone;
+  Doc          *doc;
+  request_rec  *r;
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = doc->r;
+
+  W_L("</div>");
+  if (IS_CSS_ON(iphone->entryp)) {
+    chxj_css_pop_prop_list(iphone->css_prop_stack);
+  }
+  return iphone->out;
+}
+
+
+static char *
+s_iphone_chxjif_tag(void *pdoc, Node *node)
+{
+  iphone_t *iphone;
+  Doc     *doc;
+  Node    *child;
+  request_rec *r;
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = doc->r;
+
+  for (child = qs_get_child_node(doc, node);
+       child;
+       child = qs_get_next_node(doc, child)) {
+    W_V(child->otext);
+    s_iphone_chxjif_tag(iphone, child);
+  }
+  return NULL;
+}
+
+
+/**
+ * It is a handler who processes the TEXTARE tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The TEXTAREA tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_textarea_tag(void *pdoc, Node *node) 
+{
+  iphone_t      *iphone;
+  Doc           *doc;
+  request_rec   *r;
+  Attr          *attr;
+  char          *attr_accesskey = NULL;
+  char          *attr_name      = NULL;
+  char          *attr_rows      = NULL;
+  char          *attr_cols      = NULL;
+  char          *attr_istyle    = NULL;
+  char          *attr_style     = NULL;
+
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = doc->r;
+
+  iphone->textarea_flag++;
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name  = qs_get_attr_name(doc,attr);
+    char *value = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('a','A',"accesskey",name) && value && *value != 0) {
+      attr_accesskey = value;
+    }
+    else if (STRCASEEQ('i','I',"istyle", name) && value && (*value == '1' || *value == '2' || *value == '3' || *value == '4')) {
+      attr_istyle = value;
+    }
+    else if (STRCASEEQ('n','N',"name", name) && value && *value) {
+      attr_name = value;
+    }
+    else if (STRCASEEQ('r','R',"rows", name) && value && *value) {
+      attr_rows = value;
+    }
+    else if (STRCASEEQ('c','C',"cols", name) && value && *value) {
+      attr_cols = value;
+    }
+    else if (STRCASEEQ('s','S',"style", name) && value && *value) {
+      attr_style = value;
+    }
+  }
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *wap_input_format = chxj_css_get_property_value(doc, style, "-wap-input-format");
+      css_property_t *cur;
+      for (cur = wap_input_format->next; cur != wap_input_format; cur = cur->next) {
+        if (strcasestr(cur->value, "<ja:n>")) {
+          attr_istyle = "4";
+        }
+        else if (strcasestr(cur->value, "<ja:en>")) {
+          attr_istyle = "3";
+        }
+        else if (strcasestr(cur->value, "<ja:hk>")) {
+          attr_istyle = "2";
+        }
+        else if (strcasestr(cur->value, "<ja:h>")) {
+          attr_istyle = "1";
+        }
+      }
+    }
+  }
+  W_L("<textarea");
+  if (attr_name) {
+    W_L(" name=\"");
+    W_V(attr_name);
+    W_L("\"");
+  }
+  if (attr_rows) {
+    W_L(" rows=\"");
+    W_V(attr_rows);
+    W_L("\"");
+  }
+  if (attr_cols) {
+    W_L(" cols=\"");
+    W_V(attr_cols);
+    W_L("\"");
+  }
+  W_L(">");
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the TEXTAREA tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The TEXTAREA tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_textarea_tag(void *pdoc, Node *UNUSED(child)) 
+{
+  iphone_t       *iphone;
+  Doc           *doc;
+  request_rec   *r;
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = doc->r;
+
+  W_L("</textarea>");
+  iphone->textarea_flag--;
+
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the B tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The B tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char*
+s_iphone_start_b_tag(void* pdoc, Node* UNUSED(node)) 
+{
+  iphone_t*      iphone;
+  Doc*          doc;
+  request_rec*  r;
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = doc->r;
+
+  W_L("<b>");
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the B tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The B tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char*
+s_iphone_end_b_tag(void* pdoc, Node* UNUSED(child)) 
+{
+  iphone_t*      iphone = GET_IPHONE(pdoc);
+  Doc*          doc   = iphone->doc;
+
+  W_L("</b>");
+  return iphone->out;
+}
+
+static char*
+s_iphone_text_tag(void* pdoc, Node* child)
+{
+  iphone_t*     iphone;
+  Doc*         doc;
+  char*        textval;
+  char*        tmp;
+  char*        tdst;
+  char         one_byte[2];
+  int          ii;
+  int          tdst_len;
+  request_rec* r;
+  apr_size_t   z2h_input_len;
+
+  iphone = GET_IPHONE(pdoc);
+  doc   = iphone->doc;
+  r     = doc->r;
+
+  textval = qs_get_node_value(doc,child);
+  if (strlen(textval) == 0) {
+    return iphone->out;
+  }
+
+  tmp = apr_palloc(r->pool, qs_get_node_size(doc,child)+1);
+  memset(tmp, 0, qs_get_node_size(doc,child)+1);
+
+  tdst     = qs_alloc_zero_byte_string(doc->buf.pool);
+  memset(one_byte, 0, sizeof(one_byte));
+  tdst_len = 0;
+
+  for (ii=0; ii<qs_get_node_size(doc,child); ii++) {
+    char* out;
+    int rtn = s_iphone_search_emoji(iphone, &textval[ii], &out);
+    if (rtn) {
+      tdst = qs_out_apr_pstrcat(r, tdst, out, &tdst_len);
+      ii+=(rtn - 1);
+      continue;
+    }
+
+    if (is_sjis_kanji(textval[ii])) {
+      one_byte[0] = textval[ii+0];
+      tdst = qs_out_apr_pstrcat(r, tdst, one_byte, &tdst_len);
+      one_byte[0] = textval[ii+1];
+      tdst = qs_out_apr_pstrcat(r, tdst, one_byte, &tdst_len);
+      ii++;
+    }
+    else 
+    if (iphone->pre_flag) {
+      one_byte[0] = textval[ii+0];
+      tdst = qs_out_apr_pstrcat(r, tdst, one_byte, &tdst_len);
+    }
+    else
+    if (iphone->textarea_flag) {
+      one_byte[0] = textval[ii+0];
+      tdst = qs_out_apr_pstrcat(r, tdst, one_byte, &tdst_len);
+    }
+    else {
+      if (textval[ii] != '\r' && textval[ii] != '\n') {
+        one_byte[0] = textval[ii+0];
+        tdst = qs_out_apr_pstrcat(r, tdst, one_byte, &tdst_len);
+      }
+    }
+  }
+  z2h_input_len = strlen(tdst);
+  tdst = chxj_conv_z2h(r, tdst, &z2h_input_len, iphone->entryp);
+
+  W_V(tdst);
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the BLOCKQUOTE tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The BLOCKQUOTE tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_blockquote_tag(void *pdoc, Node *node)
+{
+  iphone_t *iphone;
+  Doc      *doc;
+  Attr     *attr;
+  char     *attr_style = NULL;
+  char     *attr_color = NULL;
+  char     *attr_size  = NULL;
+  char     *css_clear  = NULL;
+
+  iphone  = GET_IPHONE(pdoc);
+  doc     = iphone->doc;
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *nm  = qs_get_attr_name(doc,attr);
+    char *val = qs_get_attr_value(doc,attr);
+    if (val && STRCASEEQ('s','S',"style", nm)) {
+      attr_style = val;
+    }
+  }
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *color_prop = chxj_css_get_property_value(doc, style, "color");
+      css_property_t *font_size_prop = chxj_css_get_property_value(doc, style, "font-size");
+      css_property_t *clear_prop           = chxj_css_get_property_value(doc, style, "clear");
+      
+      css_property_t *cur;
+      for (cur = color_prop->next; cur != color_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          attr_color = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+      for (cur = font_size_prop->next; cur != font_size_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          if (STRCASEEQ('x','X',"xx-small",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('x','X',"x-small",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('s','S',"small",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('m','M',"medium",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('l','L',"large",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('x','X',"x-large",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('x','X',"xx-large",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+        }
+      }
+      for (cur = clear_prop->next; cur != clear_prop; cur = cur->next) {
+        css_clear = apr_pstrdup(doc->pool, cur->value);
+      }
+    }
+  }
+  W_L("<blockquote");
+  if (attr_color || attr_size || css_clear) {
+    W_L(" style=\"");
+    if (attr_color) {
+      attr_color = chxj_css_rgb_func_to_value(doc->pool, attr_color);
+      W_L("color:");
+      W_V(attr_color);
+      W_L(";");
+    }
+    if (attr_size) {
+      W_L("font-size:");
+      W_V(attr_size);
+      W_L(";");
+    }
+    if (css_clear){
+      W_L("clear:");
+      W_V(css_clear);
+      W_L(";");
+    }
+    W_L("\"");
+  }
+  W_L(">");
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the BLOCKQUOTE tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The BLOCKQUOTE tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_blockquote_tag(void *pdoc, Node *UNUSED(child))
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+  Doc     *doc   = iphone->doc;
+  W_L("</blockquote>");
+  if (IS_CSS_ON(iphone->entryp)) {
+    chxj_css_pop_prop_list(iphone->css_prop_stack);
+  }
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the DIR tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The DIR tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_dir_tag(void *pdoc, Node *node)
+{
+  iphone_t *iphone      = GET_IPHONE(pdoc);
+  Doc       *doc        = iphone->doc;
+  Attr      *attr;
+  char      *attr_style = NULL;
+  char      *attr_color = NULL;
+  char      *attr_type  = NULL;
+  char      *attr_size  = NULL;
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name   = qs_get_attr_name(doc,attr);
+    char *value  = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('t','T',"type",name)) {
+      if (value && (STRCASEEQ('d','D',"disc",value) || STRCASEEQ('c','C',"circle",value) || STRCASEEQ('s','S',"square",value))) {
+        attr_type = value;
+      }
+    }
+    else if (STRCASEEQ('s','S',"style", name) && value && *value) {
+      attr_style = value;
+    }
+  }
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *color_prop           = chxj_css_get_property_value(doc, style, "color");
+      css_property_t *size_prop            = chxj_css_get_property_value(doc, style, "font-size");
+      css_property_t *list_style_type_prop = chxj_css_get_property_value(doc, style, "list-style-type");
+      css_property_t *cur;
+      for (cur = color_prop->next; cur != color_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          attr_color = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+      for (cur = list_style_type_prop->next; cur != list_style_type_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          attr_type = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+      for (cur = size_prop->next; cur != size_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          if (STRCASEEQ('x','X',"xx-small",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('x','X',"x-small",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('s','S',"small",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('m','M',"medium",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('l','L',"large",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('x','X',"x-large",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('x','X',"xx-large",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+        }
+      }
+    }
+  }
+  W_L("<dir");
+  if (attr_type || attr_color || attr_size) {
+    W_L(" style=\"");
+    if (attr_type) {
+      W_L("list-style-type:");
+      W_V(attr_type);
+      W_L(";");
+    }
+    if (attr_color) {
+      attr_color = chxj_css_rgb_func_to_value(doc->pool, attr_color);
+      W_L("color:");
+      W_V(attr_color);
+      W_L(";");
+    }
+    if (attr_size) {
+      W_L("font-size:");
+      W_V(attr_size);
+      W_L(";");
+    }
+    W_L("\"");
+  }
+  W_L(">");
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the DIR tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The DIR tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_dir_tag(void *pdoc, Node *UNUSED(child))
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+  Doc *doc = iphone->doc;
+  W_L("</dir>");
+  if (IS_CSS_ON(iphone->entryp)) {
+    chxj_css_pop_prop_list(iphone->css_prop_stack);
+  }
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the DL tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The DL tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_dl_tag(void *pdoc, Node *node)
+{
+  iphone_t *iphone      = GET_IPHONE(pdoc);
+  Doc       *doc        = iphone->doc;
+  Attr      *attr;
+  char      *attr_style = NULL;
+  char      *attr_color = NULL;
+  char      *attr_size  = NULL;
+  char      *css_clear  = NULL;
+  
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name   = qs_get_attr_name(doc,attr);
+    char *value  = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('s','S',"style", name) && value && *value) {
+      attr_style = value;
+    }
+  }
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *color_prop           = chxj_css_get_property_value(doc, style, "color");
+      css_property_t *size_prop            = chxj_css_get_property_value(doc, style, "font-size");
+      css_property_t *clear_prop           = chxj_css_get_property_value(doc, style, "clear");
+      
+      css_property_t *cur;
+      for (cur = color_prop->next; cur != color_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          attr_color = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+      for (cur = size_prop->next; cur != size_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          if (STRCASEEQ('x','X',"xx-small",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('x','X',"x-small",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('s','S',"small",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('m','M',"medium",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('l','L',"large",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('x','X',"x-large",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('x','X',"xx-large",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+        }
+      }
+      for (cur = clear_prop->next; cur != clear_prop; cur = cur->next) {
+        css_clear = apr_pstrdup(doc->pool, cur->value);
+      }
+    }
+  }
+  W_L("<dl");
+  if (attr_color || attr_size || css_clear) {
+    W_L(" style=\"");
+    if (attr_color) {
+      attr_color = chxj_css_rgb_func_to_value(doc->pool, attr_color);
+      W_L("color:");
+      W_V(attr_color);
+      W_L(";");
+    }
+    if (attr_size) {
+      W_L("font-size:");
+      W_V(attr_size);
+      W_L(";");
+    }
+    if (css_clear){
+      W_L("clear:");
+      W_V(css_clear);
+      W_L(";");
+    }
+    W_L("\"");
+  }
+  W_L(">");
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the DL tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The DL tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_dl_tag(void *pdoc, Node *UNUSED(child))
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+  Doc *doc = iphone->doc;
+  W_L("</dl>");
+  if (IS_CSS_ON(iphone->entryp)) {
+    chxj_css_pop_prop_list(iphone->css_prop_stack);
+  }
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the DT tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The DT tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_dt_tag(void *pdoc, Node *node)
+{
+  iphone_t *iphone      = GET_IPHONE(pdoc);
+  Doc       *doc        = iphone->doc;
+  Attr      *attr;
+  char      *attr_style = NULL;
+  char      *attr_color = NULL;
+  char      *attr_size  = NULL;
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name   = qs_get_attr_name(doc,attr);
+    char *value  = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('s','S',"style", name) && value && *value) {
+      attr_style = value;
+    }
+  }
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *color_prop           = chxj_css_get_property_value(doc, style, "color");
+      css_property_t *size_prop            = chxj_css_get_property_value(doc, style, "font-size");
+      css_property_t *cur;
+      for (cur = color_prop->next; cur != color_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          attr_color = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+      for (cur = size_prop->next; cur != size_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          if (STRCASEEQ('x','X',"xx-small",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('x','X',"x-small",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('s','S',"small",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('m','M',"medium",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('l','L',"large",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('x','X',"x-large",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('x','X',"xx-large",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+        }
+      }
+    }
+  }
+  W_L("<dt");
+  if (attr_color || attr_size) {
+    W_L(" style=\"");
+    if (attr_color) {
+      attr_color = chxj_css_rgb_func_to_value(doc->pool, attr_color);
+      W_L("color:");
+      W_V(attr_color);
+      W_L(";");
+    }
+    if (attr_size) {
+      W_L("font-size:");
+      W_V(attr_size);
+      W_L(";");
+    }
+    W_L("\"");
+  }
+  W_L(">");
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the DT tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The DT tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_dt_tag(void *pdoc, Node *UNUSED(child))
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+  Doc      *doc    = iphone->doc;
+  W_L("</dt>");
+  if (IS_CSS_ON(iphone->entryp)) {
+    chxj_css_pop_prop_list(iphone->css_prop_stack);
+  }
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the DD tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The DD tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_dd_tag(void *pdoc, Node *node)
+{
+  iphone_t *iphone      = GET_IPHONE(pdoc);
+  Doc       *doc        = iphone->doc;
+  Attr      *attr;
+  char      *attr_style = NULL;
+  char      *attr_color = NULL;
+  char      *attr_size  = NULL;
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name   = qs_get_attr_name(doc,attr);
+    char *value  = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('s','S',"style", name) && value && *value) {
+      attr_style = value;
+    }
+  }
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *color_prop           = chxj_css_get_property_value(doc, style, "color");
+      css_property_t *size_prop            = chxj_css_get_property_value(doc, style, "font-size");
+      css_property_t *cur;
+      for (cur = color_prop->next; cur != color_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          attr_color = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+      for (cur = size_prop->next; cur != size_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          if (STRCASEEQ('x','X',"xx-small",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('x','X',"x-small",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('s','S',"small",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('m','M',"medium",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('l','L',"large",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('x','X',"x-large",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('x','X',"xx-large",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+        }
+      }
+    }
+  }
+  W_L("<dd");
+  if (attr_color || attr_size) {
+    W_L(" style=\"");
+    if (attr_color) {
+      attr_color = chxj_css_rgb_func_to_value(doc->pool, attr_color);
+      W_L("color:");
+      W_V(attr_color);
+      W_L(";");
+    }
+    if (attr_size) {
+      W_L("font-size:");
+      W_V(attr_size);
+      W_L(";");
+    }
+    W_L("\"");
+  }
+  W_L(">");
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the DD tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The DD tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_dd_tag(void *pdoc, Node *UNUSED(child))
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+  Doc      *doc = iphone->doc;
+  W_L("</dd>");
+  if (IS_CSS_ON(iphone->entryp)) {
+    chxj_css_pop_prop_list(iphone->css_prop_stack);
+  }
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the H1 tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The H1 tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_h1_tag(void *pdoc, Node *node)
+{
+  iphone_t    *iphone;
+  Doc         *doc;
+  request_rec *r;
+  Attr        *attr;
+  char        *attr_style = NULL;
+  char        *attr_align = NULL;
+  char        *css_clear  = NULL;
+
+  iphone = GET_IPHONE(pdoc);
+  doc    = iphone->doc;
+  r      = doc->r;
+
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name  = qs_get_attr_name(doc,attr);
+    char *value = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('a','A',"align", name)) {
+      if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
+        attr_align = value;
+      }
+    }
+    else if (STRCASEEQ('s','S',"style",name) && value && *value) {
+      attr_style = value;
+    }
+  }
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *list_style_type_prop = chxj_css_get_property_value(doc, style, "text-align");
+      css_property_t *clear_prop           = chxj_css_get_property_value(doc, style, "clear");
+      css_property_t *cur;
+      for (cur = list_style_type_prop->next; cur != list_style_type_prop; cur = cur->next) {
+        if (STRCASEEQ('l','L',"left", cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "left");
+        }
+        else if (STRCASEEQ('c','C',"center",cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "center");
+        }
+        else if (STRCASEEQ('r','R',"right",cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "right");
+        }
+      }
+      for (cur = clear_prop->next; cur != clear_prop; cur = cur->next) {
+        if (STRCASEEQ('b','B',"both", cur->value)) {
+          css_clear = apr_pstrdup(doc->pool, "both");
+        }
+        else if (STRCASEEQ('r','R',"right", cur->value)) {
+          css_clear = apr_pstrdup(doc->pool, "right");
+        }
+        else if (STRCASEEQ('l','L',"left", cur->value)) {
+          css_clear = apr_pstrdup(doc->pool, "left");
+        }
+      }
+    }
+  }
+  W_L("<h1");
+  if (attr_align || css_clear ) {
+    W_L(" style=\"");
+    if(attr_align){
+      W_L("text-align:");
+      W_V(attr_align);
+      W_L(";");
+    }
+    if(css_clear){
+      W_L("clear:");
+      W_V(css_clear);
+      W_L(";");
+    }
+    W_L("\"");
+  }
+  W_L(">");
+
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the H1 tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The H1 tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_h1_tag(void *pdoc, Node *UNUSED(child)) 
+{
+  iphone_t*    iphone;
+  Doc*          doc;
+  request_rec*  r;
+
+  iphone = GET_IPHONE(pdoc);
+  doc     = iphone->doc;
+  r       = doc->r;
+  
+  W_L("</h1>");
+  if (IS_CSS_ON(iphone->entryp)) {
+    chxj_css_pop_prop_list(iphone->css_prop_stack);
+  }
+
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the H2 tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The H1 tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_h2_tag(void *pdoc, Node *node)
+{
+  iphone_t    *iphone;
+  Doc         *doc;
+  request_rec *r;
+  Attr        *attr;
+  char        *attr_style = NULL;
+  char        *attr_align = NULL;
+  char        *css_clear  = NULL;
+
+  iphone   = GET_IPHONE(pdoc);
+  doc     = iphone->doc;
+  r       = doc->r;
+
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name  = qs_get_attr_name(doc,attr);
+    char *value = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('a','A',"align", name)) {
+      if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
+        attr_align = value;
+      }
+    }
+    else if (STRCASEEQ('s','S',"style",name) && value && *value) {
+      attr_style = value;
+    }
+  }
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *list_style_type_prop = chxj_css_get_property_value(doc, style, "text-align");
+      css_property_t *clear_prop           = chxj_css_get_property_value(doc, style, "clear");
+      css_property_t *cur;
+      for (cur = list_style_type_prop->next; cur != list_style_type_prop; cur = cur->next) {
+        if (STRCASEEQ('l','L',"left", cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "left");
+        }
+        else if (STRCASEEQ('c','C',"center",cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "center");
+        }
+        else if (STRCASEEQ('r','R',"right",cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "right");
+        }
+      }
+      for (cur = clear_prop->next; cur != clear_prop; cur = cur->next) {
+        if (STRCASEEQ('b','B',"both", cur->value)) {
+          css_clear = apr_pstrdup(doc->pool, "both");
+        }
+        else if (STRCASEEQ('r','R',"right", cur->value)) {
+          css_clear = apr_pstrdup(doc->pool, "right");
+        }
+        else if (STRCASEEQ('l','L',"left", cur->value)) {
+          css_clear = apr_pstrdup(doc->pool, "left");
+        }
+      }
+    }
+  }
+  W_L("<h2");
+  if (attr_align || css_clear ) {
+    W_L(" style=\"");
+    if(attr_align){
+      W_L("text-align:");
+      W_V(attr_align);
+      W_L(";");
+    }
+    if(css_clear){
+      W_L("clear:");
+      W_V(css_clear);
+      W_L(";");
+    }
+    W_L("\"");
+  }
+  W_L(">");
+
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the H2 tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The H1 tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_h2_tag(void *pdoc, Node *UNUSED(child)) 
+{
+  iphone_t*    iphone;
+  Doc*          doc;
+  request_rec*  r;
+
+  iphone = GET_IPHONE(pdoc);
+  doc     = iphone->doc;
+  r       = doc->r;
+  
+  W_L("</h2>");
+  if (IS_CSS_ON(iphone->entryp)) {
+    chxj_css_pop_prop_list(iphone->css_prop_stack);
+  }
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the H3 tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The H1 tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_h3_tag(void *pdoc, Node *node)
+{
+  iphone_t    *iphone;
+  Doc         *doc;
+  request_rec *r;
+  Attr        *attr;
+  char        *attr_style = NULL;
+  char        *attr_align = NULL;
+  char        *css_clear  = NULL;
+
+  iphone   = GET_IPHONE(pdoc);
+  doc     = iphone->doc;
+  r       = doc->r;
+
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name  = qs_get_attr_name(doc,attr);
+    char *value = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('a','A',"align", name)) {
+      if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
+        attr_align = value;
+      }
+    }
+    else if (STRCASEEQ('s','S',"style",name) && value && *value) {
+      attr_style = value;
+    }
+  }
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *list_style_type_prop = chxj_css_get_property_value(doc, style, "text-align");
+      css_property_t *clear_prop           = chxj_css_get_property_value(doc, style, "clear");
+      css_property_t *cur;
+      for (cur = list_style_type_prop->next; cur != list_style_type_prop; cur = cur->next) {
+        if (STRCASEEQ('l','L',"left", cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "left");
+        }
+        else if (STRCASEEQ('c','C',"center",cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "center");
+        }
+        else if (STRCASEEQ('r','R',"right",cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "right");
+        }
+      }
+      for (cur = clear_prop->next; cur != clear_prop; cur = cur->next) {
+        if (STRCASEEQ('b','B',"both", cur->value)) {
+          css_clear = apr_pstrdup(doc->pool, "both");
+        }
+        else if (STRCASEEQ('r','R',"right", cur->value)) {
+          css_clear = apr_pstrdup(doc->pool, "right");
+        }
+        else if (STRCASEEQ('l','L',"left", cur->value)) {
+          css_clear = apr_pstrdup(doc->pool, "left");
+        }
+      }
+    }
+  }
+  W_L("<h3");
+  if (attr_align || css_clear ) {
+    W_L(" style=\"");
+    if(attr_align){
+      W_L("text-align:");
+      W_V(attr_align);
+      W_L(";");
+    }
+    if(css_clear){
+      W_L("clear:");
+      W_V(css_clear);
+      W_L(";");
+    }
+    W_L("\"");
+  }
+  W_L(">");
+
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the H3 tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The H1 tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_h3_tag(void *pdoc, Node *UNUSED(child)) 
+{
+  iphone_t*    iphone;
+  Doc*          doc;
+  request_rec*  r;
+
+  iphone = GET_IPHONE(pdoc);
+  doc     = iphone->doc;
+  r       = doc->r;
+
+  W_L("</h3>");
+  if (IS_CSS_ON(iphone->entryp)) {
+    chxj_css_pop_prop_list(iphone->css_prop_stack);
+  }
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the H4 tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The H1 tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_h4_tag(void *pdoc, Node *node)
+{
+  iphone_t    *iphone;
+  Doc         *doc;
+  request_rec *r;
+  Attr        *attr;
+  char        *attr_style = NULL;
+  char        *attr_align = NULL;
+  char        *css_clear  = NULL;
+
+  iphone   = GET_IPHONE(pdoc);
+  doc     = iphone->doc;
+  r       = doc->r;
+
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name  = qs_get_attr_name(doc,attr);
+    char *value = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('a','A',"align", name)) {
+      if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
+        attr_align = value;
+      }
+    }
+    else if (STRCASEEQ('s','S',"style",name) && value && *value) {
+      attr_style = value;
+    }
+  }
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *list_style_type_prop = chxj_css_get_property_value(doc, style, "text-align");
+      css_property_t *clear_prop           = chxj_css_get_property_value(doc, style, "clear");
+      css_property_t *cur;
+      for (cur = list_style_type_prop->next; cur != list_style_type_prop; cur = cur->next) {
+        if (STRCASEEQ('l','L',"left", cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "left");
+        }
+        else if (STRCASEEQ('c','C',"center",cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "center");
+        }
+        else if (STRCASEEQ('r','R',"right",cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "right");
+        }
+      }
+      for (cur = clear_prop->next; cur != clear_prop; cur = cur->next) {
+        if (STRCASEEQ('b','B',"both", cur->value)) {
+          css_clear = apr_pstrdup(doc->pool, "both");
+        }
+        else if (STRCASEEQ('r','R',"right", cur->value)) {
+          css_clear = apr_pstrdup(doc->pool, "right");
+        }
+        else if (STRCASEEQ('l','L',"left", cur->value)) {
+          css_clear = apr_pstrdup(doc->pool, "left");
+        }
+      }
+    }
+  }
+  W_L("<h4");
+  if (attr_align || css_clear ) {
+    W_L(" style=\"");
+    if(attr_align){
+      W_L("text-align:");
+      W_V(attr_align);
+      W_L(";");
+    }
+    if(css_clear){
+      W_L("clear:");
+      W_V(css_clear);
+      W_L(";");
+    }
+    W_L("\"");
+  }
+  W_L(">");
+
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the H4 tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The H1 tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_h4_tag(void *pdoc, Node *UNUSED(child)) 
+{
+  iphone_t      *iphone;
+  Doc           *doc;
+  request_rec   *r;
+
+  iphone = GET_IPHONE(pdoc);
+  doc     = iphone->doc;
+  r       = doc->r;
+  
+  W_L("</h4>");
+  if (IS_CSS_ON(iphone->entryp)) {
+    chxj_css_pop_prop_list(iphone->css_prop_stack);
+  }
+
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the H5 tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The H1 tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_h5_tag(void *pdoc, Node *node)
+{
+  iphone_t    *iphone;
+  Doc         *doc;
+  request_rec *r;
+  Attr        *attr;
+  char        *attr_style = NULL;
+  char        *attr_align = NULL;
+  char        *css_clear  = NULL;
+
+  iphone   = GET_IPHONE(pdoc);
+  doc     = iphone->doc;
+  r       = doc->r;
+
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name  = qs_get_attr_name(doc,attr);
+    char *value = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('a','A',"align", name)) {
+      if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
+        attr_align = value;
+      }
+    }
+    else if (STRCASEEQ('s','S',"style",name) && value && *value) {
+      attr_style = value;
+    }
+  }
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *list_style_type_prop = chxj_css_get_property_value(doc, style, "text-align");
+      css_property_t *clear_prop           = chxj_css_get_property_value(doc, style, "clear");
+      css_property_t *cur;
+      for (cur = list_style_type_prop->next; cur != list_style_type_prop; cur = cur->next) {
+        if (STRCASEEQ('l','L',"left", cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "left");
+        }
+        else if (STRCASEEQ('c','C',"center",cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "center");
+        }
+        else if (STRCASEEQ('r','R',"right",cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "right");
+        }
+      }
+      for (cur = clear_prop->next; cur != clear_prop; cur = cur->next) {
+        if (STRCASEEQ('b','B',"both", cur->value)) {
+          css_clear = apr_pstrdup(doc->pool, "both");
+        }
+        else if (STRCASEEQ('r','R',"right", cur->value)) {
+          css_clear = apr_pstrdup(doc->pool, "right");
+        }
+        else if (STRCASEEQ('l','L',"left", cur->value)) {
+          css_clear = apr_pstrdup(doc->pool, "left");
+        }
+      }
+    }
+  }
+  W_L("<h5");
+  if (attr_align || css_clear ) {
+    W_L(" style=\"");
+    if(attr_align){
+      W_L("text-align:");
+      W_V(attr_align);
+      W_L(";");
+    }
+    if(css_clear){
+      W_L("clear:");
+      W_V(css_clear);
+      W_L(";");
+    }
+    W_L("\"");
+  }
+  W_L(">");
+
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the H5 tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The H1 tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_h5_tag(void *pdoc, Node *UNUSED(child)) 
+{
+  iphone_t    *iphone;
+  Doc         *doc;
+  request_rec *r;
+
+  iphone = GET_IPHONE(pdoc);
+  doc     = iphone->doc;
+  r       = doc->r;
+  
+  W_L("</h5>");
+  if (IS_CSS_ON(iphone->entryp)) {
+    chxj_css_pop_prop_list(iphone->css_prop_stack);
+  }
+
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the H6 tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The H1 tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_h6_tag(void *pdoc, Node *node)
+{
+  iphone_t    *iphone;
+  Doc         *doc;
+  request_rec *r;
+  Attr        *attr;
+  char        *attr_style = NULL;
+  char        *attr_align = NULL;
+  char        *css_clear  = NULL;
+
+  iphone   = GET_IPHONE(pdoc);
+  doc     = iphone->doc;
+  r       = doc->r;
+
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name  = qs_get_attr_name(doc,attr);
+    char *value = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('a','A',"align", name)) {
+      if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
+        attr_align = value;
+      }
+    }
+    else if (STRCASEEQ('s','S',"style",name) && value && *value) {
+      attr_style = value;
+    }
+  }
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *list_style_type_prop = chxj_css_get_property_value(doc, style, "text-align");
+      css_property_t *clear_prop           = chxj_css_get_property_value(doc, style, "clear");
+      css_property_t *cur;
+      for (cur = list_style_type_prop->next; cur != list_style_type_prop; cur = cur->next) {
+        if (STRCASEEQ('l','L',"left", cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "left");
+        }
+        else if (STRCASEEQ('c','C',"center",cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "center");
+        }
+        else if (STRCASEEQ('r','R',"right",cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "right");
+        }
+      }
+      for (cur = clear_prop->next; cur != clear_prop; cur = cur->next) {
+        if (STRCASEEQ('b','B',"both", cur->value)) {
+          css_clear = apr_pstrdup(doc->pool, "both");
+        }
+        else if (STRCASEEQ('r','R',"right", cur->value)) {
+          css_clear = apr_pstrdup(doc->pool, "right");
+        }
+        else if (STRCASEEQ('l','L',"left", cur->value)) {
+          css_clear = apr_pstrdup(doc->pool, "left");
+        }
+      }
+    }
+  }
+  W_L("<h6");
+  if (attr_align || css_clear ) {
+    W_L(" style=\"");
+    if(attr_align){
+      W_L("text-align:");
+      W_V(attr_align);
+      W_L(";");
+    }
+    if(css_clear){
+      W_L("clear:");
+      W_V(css_clear);
+      W_L(";");
+    }
+    W_L("\"");
+  }
+  W_L(">");
+
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the H6 tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The H1 tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_h6_tag(void *pdoc, Node *UNUSED(child)) 
+{
+  iphone_t    *iphone;
+  Doc         *doc;
+  request_rec *r;
+
+  iphone = GET_IPHONE(pdoc);
+  doc     = iphone->doc;
+  r       = doc->r;
+  
+  W_L("</h6>");
+  if (IS_CSS_ON(iphone->entryp)) {
+    chxj_css_pop_prop_list(iphone->css_prop_stack);
+  }
+
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the MENU tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The MENU tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_menu_tag(void *pdoc, Node *node)
+{
+  iphone_t *iphone      = GET_IPHONE(pdoc);
+  Doc       *doc        = iphone->doc;
+  Attr      *attr;
+  char      *attr_style = NULL;
+  char      *attr_color = NULL;
+  char      *attr_type  = NULL;
+  char      *attr_size  = NULL;
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name   = qs_get_attr_name(doc,attr);
+    char *value  = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('t','T',"type",name)) {
+      if (value && (STRCASEEQ('d','D',"disc",value) || STRCASEEQ('c','C',"circle",value) || STRCASEEQ('s','S',"square",value))) {
+        attr_type = value;
+      }
+    }
+    else if (STRCASEEQ('s','S',"style", name) && value && *value) {
+      attr_style = value;
+    }
+  }
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *color_prop           = chxj_css_get_property_value(doc, style, "color");
+      css_property_t *size_prop            = chxj_css_get_property_value(doc, style, "font-size");
+      css_property_t *list_style_type_prop = chxj_css_get_property_value(doc, style, "list-style-type");
+      css_property_t *cur;
+      for (cur = color_prop->next; cur != color_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          attr_color = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+      for (cur = list_style_type_prop->next; cur != list_style_type_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          attr_type = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+      for (cur = size_prop->next; cur != size_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          if (STRCASEEQ('x','X',"xx-small",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('x','X',"x-small",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('s','S',"small",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('m','M',"medium",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('l','L',"large",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('x','X',"x-large",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('x','X',"xx-large",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+        }
+      }
+    }
+  }
+  W_L("<menu");
+  if (attr_type || attr_color || attr_size) {
+    W_L(" style=\"");
+    if (attr_type) {
+      W_L("list-style-type:");
+      W_V(attr_type);
+      W_L(";");
+    }
+    if (attr_color) {
+      attr_color = chxj_css_rgb_func_to_value(doc->pool, attr_color);
+      W_L("color:");
+      W_V(attr_color);
+      W_L(";");
+    }
+    if (attr_size) {
+      W_L("font-size:");
+      W_V(attr_size);
+      W_L(";");
+    }
+    W_L("\"");
+  }
+  W_L(">");
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the MENU tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The MENU tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_menu_tag(void *pdoc, Node *UNUSED(child))
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+  Doc *doc = iphone->doc;
+  W_L("</menu>");
+  if (IS_CSS_ON(iphone->entryp)) {
+    chxj_css_pop_prop_list(iphone->css_prop_stack);
+  }
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the PLAINTEXT tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The PLAINTEXT tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_plaintext_tag(void *pdoc, Node *node)
+{
+  iphone_t *iphone;
+  Doc *doc;
+
+  iphone = GET_IPHONE(pdoc);
+  doc     = iphone->doc;
+  W_L("<plaintext>");
+  s_iphone_start_plaintext_tag_inner(pdoc,node);
+  return iphone->out;
+}
+
+static char *
+s_iphone_start_plaintext_tag_inner(void *pdoc, Node *node)
+{
+  iphone_t *iphone;
+  Doc *doc;
+  Node *child;
+  iphone = GET_IPHONE(pdoc);
+  doc     = iphone->doc;
+  for (child = qs_get_child_node(doc, node);
+       child;
+       child = qs_get_next_node(doc, child)) {
+    W_V(child->otext);
+    s_iphone_start_plaintext_tag_inner(pdoc, child);
+  }
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the PLAINTEXT tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The PLAINTEXT tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_plaintext_tag(void *pdoc, Node *UNUSED(child))
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the BLINK tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The BLINK tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_blink_tag(void *pdoc, Node *node)
+{
+  iphone_t *iphone      = GET_IPHONE(pdoc);
+  Doc       *doc        = iphone->doc;
+  Attr      *attr;
+  char      *attr_style = NULL;
+  char      *attr_color = NULL;
+  char      *attr_size  = NULL;
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name   = qs_get_attr_name(doc,attr);
+    char *value  = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('s','S',"style", name) && value && *value) {
+      attr_style = value;
+    }
+  }
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *color_prop           = chxj_css_get_property_value(doc, style, "color");
+      css_property_t *size_prop            = chxj_css_get_property_value(doc, style, "font-size");
+      css_property_t *cur;
+      for (cur = color_prop->next; cur != color_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          attr_color = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+      for (cur = size_prop->next; cur != size_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          if (STRCASEEQ('x','X',"xx-small",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('x','X',"x-small",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('s','S',"small",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('m','M',"medium",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('l','L',"large",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('x','X',"x-large",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('x','X',"xx-large",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+        }
+      }
+    }
+  }
+
+  W_L("<span");
+  W_L(" style=\"");
+  W_L(STYLE_BLINK);
+  if (iphone->blink_keyframe_out == 0) {
+    iphone->style_data = apr_pstrcat(doc->pool, (iphone->style_data) ? iphone->style_data : "",
+                                                BLINK_KEYFRAME,
+                                                NULL);
+    iphone->blink_keyframe_out = 1;
+  }
+  if (attr_color) {
+    attr_color = chxj_css_rgb_func_to_value(doc->pool, attr_color);
+    W_L("color:");
+    W_V(attr_color);
+    W_L(";");
+  }
+  if (attr_size) {
+    W_L("font-size:");
+    W_V(attr_size);
+    W_L(";");
+  }
+  W_L("\"");
+  W_L(">");
+  
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the BLINK tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The BLINK tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_blink_tag(void *pdoc, Node *UNUSED(child))
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+  Doc      *doc = iphone->doc;
+  W_L("</span>");
+  if (IS_CSS_ON(iphone->entryp)) {
+    chxj_css_pop_prop_list(iphone->css_prop_stack);
+  }
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the MARQUEE tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The MARQUEE tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_marquee_tag(void *pdoc, Node *node)
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+  Doc       *doc = iphone->doc;
+  Attr      *attr;
+  char      *attr_style     = NULL;
+  char      *attr_color     = NULL;
+  char      *attr_size      = NULL;
+  char      *attr_wap_marquee_loop  = NULL;
+  char      *attr_wap_marquee_style = NULL;
+  char      *attr_wap_marquee_dir   = NULL;
+  char      *attr_wap_marquee_speed = NULL;
+  char      *attr_bgcolor   = NULL;
+  /*--------------------------------------------------------------------------*/
+  /* Get Attributes                                                           */
+  /*--------------------------------------------------------------------------*/
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name   = qs_get_attr_name(doc,attr);
+    char *value  = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('d','D',"direction", name)) {
+      if (value) {
+        if (STRCASEEQ('l','L',"left",value)) {
+          attr_wap_marquee_dir = "rtl";
+        }
+        else if (STRCASEEQ('r','R',"right",value)) {
+          attr_wap_marquee_dir = "ltr";
+        }
+      }
+    }
+    else if (STRCASEEQ('b','B',"behavior",name)) {
+      if (value && *value) {
+        attr_wap_marquee_style = value;
+      }
+    }
+    else if (STRCASEEQ('l','L',"loop",name)) {
+      if (value && *value) {
+        if(strcmp(value,"0") == 0 || strcmp(value,"-1") == 0){
+          attr_wap_marquee_loop = "infinite";
+        }
+        else{
+          attr_wap_marquee_loop = value;
+        }
+      }
+    }
+    else if (STRCASEEQ('b','B',"bgcolor",name)) {
+      if (value && *value) {
+        attr_bgcolor = value;
+      }
+    }
+    else if (STRCASEEQ('s','S',"style",name) && value && *value) {
+      attr_style = value;
+    }
+  }
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *color_prop = chxj_css_get_property_value(doc, style, "color");
+      css_property_t *size_prop  = chxj_css_get_property_value(doc, style, "font-size");
+      css_property_t *bgcolor_prop  = chxj_css_get_property_value(doc, style, "background-color");
+      css_property_t *wap_marquee_style_prop = chxj_css_get_property_value(doc, style, "-wap-marquee-style");
+      css_property_t *wap_marquee_dir_prop   = chxj_css_get_property_value(doc, style, "-wap-marquee-dir");
+      css_property_t *wap_marquee_loop_prop  = chxj_css_get_property_value(doc, style, "-wap-marquee-loop");
+      css_property_t *wap_marquee_speed_prop = chxj_css_get_property_value(doc, style, "-wap-marquee-speed");
+      css_property_t *cur;
+      if (!attr_wap_marquee_style) {
+        for (cur = wap_marquee_style_prop->next; cur != wap_marquee_style_prop; cur = cur->next) {
+          if (STRCASEEQ('s','S',"scroll", cur->value) || STRCASEEQ('s','S',"slide",cur->value) || STRCASEEQ('a','A',"alternate",cur->value)) {
+            attr_wap_marquee_style = apr_pstrdup(doc->pool, cur->value);
+          }
+        }
+      }
+      if (!attr_wap_marquee_dir) {
+        for (cur = wap_marquee_dir_prop->next; cur != wap_marquee_dir_prop; cur = cur->next) {
+          if (STRCASEEQ('l','L',"ltr",cur->value)) {
+            attr_wap_marquee_dir = apr_pstrdup(doc->pool, cur->value);
+          }
+          else if (STRCASEEQ('r','R',"rtl",cur->value)) {
+            attr_wap_marquee_dir = apr_pstrdup(doc->pool, cur->value);
+          }
+        }
+      }
+      if (!attr_wap_marquee_loop) {
+        for (cur = wap_marquee_loop_prop->next; cur != wap_marquee_loop_prop; cur = cur->next) {
+          if(strcmp(cur->value,"0") == 0 || strcmp(cur->value,"-1") == 0){
+            attr_wap_marquee_loop = "infinite";
+          }
+          else{
+            attr_wap_marquee_loop = apr_pstrdup(doc->pool, cur->value);
+          }
+        }
+      }
+      if (!attr_wap_marquee_speed) {
+        for (cur = wap_marquee_speed_prop->next; cur != wap_marquee_speed_prop; cur = cur->next) {
+          attr_wap_marquee_speed = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+      for (cur = color_prop->next; cur != color_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          attr_color = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+      for (cur = bgcolor_prop->next; cur != bgcolor_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          attr_bgcolor = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+      for (cur = size_prop->next; cur != size_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          if ( STRCASEEQ('x','X',"xx-small",cur->value)
+            || STRCASEEQ('x','X',"x-small", cur->value)
+            || STRCASEEQ('s','S',"small",   cur->value)
+            || STRCASEEQ('m','M',"medium",  cur->value)
+            || STRCASEEQ('l','L',"large",   cur->value)
+            || STRCASEEQ('x','X',"x-large", cur->value)
+            || STRCASEEQ('x','X',"xx-large",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+        }
+      }
+    }
+  }
+
+  W_L("<div style=\"");
+  W_L("overflow:-webkit-marquee;");
+  if (attr_wap_marquee_dir) {
+    W_L("-webkit-marquee-direction:");
+    if (STRCASEEQ('r','R',"rtl",attr_wap_marquee_dir)) {
+      W_L("left");
+    }
+    else if (STRCASEEQ('l','L',"ltr",attr_wap_marquee_dir)) {
+      W_L("right");
+    }
+    W_L(";");
+  }
+  if (attr_wap_marquee_style) {
+    W_L("-webkit-marquee-style:");
+    W_V(attr_wap_marquee_style);
+    W_L(";");
+  }
+  if (attr_wap_marquee_loop) {
+    W_L("-webkit-marquee-repetition:");
+    W_V(attr_wap_marquee_loop);
+    W_L(";");
+  }
+  if (attr_wap_marquee_speed) {
+    W_L("-webkit-marquee-speed:");
+    W_V(attr_wap_marquee_speed);
+    W_L(";");
+  }
+  if (attr_bgcolor) {
+    attr_bgcolor = chxj_css_rgb_func_to_value(doc->pool, attr_bgcolor);
+    W_L("background-color:");
+    W_V(attr_bgcolor);
+    W_L(";");
+  }
+  if (attr_color) {
+    attr_color = chxj_css_rgb_func_to_value(doc->pool, attr_color);
+    W_L("color:");
+    W_V(attr_color);
+    W_L(";");
+  }
+  if (attr_size) {
+    W_L("font-size:");
+    W_V(attr_size);
+    W_L(";");
+  }
+  W_L("\"");
+  W_L(">");
+
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the MARQUEE tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The MARQUEE tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_marquee_tag(void *pdoc, Node *UNUSED(node))
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+  Doc      *doc     = iphone->doc;
+  W_L("</div>");
+  if (IS_CSS_ON(iphone->entryp)) {
+    chxj_css_pop_prop_list(iphone->css_prop_stack);
+  }
+  return iphone->out;
+}
+
+
+/**
+ * It is handler who processes the New Line Code.
+ */
+static char *
+s_iphone_newline_mark(void *pdoc, Node *UNUSED(node))
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+  if (iphone->start_html_flag) {
+    Doc *doc = iphone->doc;
+    W_NLCODE();
+  }
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the LINK tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The LINK tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_link_tag(void *pdoc, Node *node)
+{
+  iphone_t      *iphone;
+  Doc           *doc;
+  Attr          *attr;
+  char          *rel  = NULL;
+  char          *href = NULL;
+  char          *type = NULL;
+
+  iphone = GET_IPHONE(pdoc);
+  doc    = iphone->doc;
+
+  if (! IS_CSS_ON(iphone->entryp)) {
+    return iphone->out;
+  }
+
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name  = qs_get_attr_name(doc,attr);
+    char *value = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('r','R',"rel", name)) {
+      if (value && *value && STRCASEEQ('s','S',"stylesheet", value)) {
+        rel = value;
+      }
+    }
+    else if (STRCASEEQ('h','H',"href", name)) {
+      if (value && *value) {
+        href = value;
+      }
+    }
+    else if (STRCASEEQ('t','T',"type", name)) {
+      if (value && *value && STRCASEEQ('t','T',"text/css",value)) {
+        type = value;
+      }
+    }
+  }
+
+  if (rel && href && type) {
+    DBG(doc->r,"REQ[%X] start load CSS. url:[%s]", TO_ADDR(doc->r),href);
+    iphone->style = chxj_css_parse_from_uri(doc->r, doc->pool, iphone->style, href);
+    DBG(doc->r,"REQ[%X] end load CSS. url:[%s]", TO_ADDR(doc->r),href);
+  }
+
+  return iphone->out;
+}
+
+
+static css_prop_list_t *
+s_iphone_push_and_get_now_style(void *pdoc, Node *node, const char *style_attr_value)
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+  Doc *doc = iphone->doc;
+  css_prop_list_t *last_css = NULL;
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *dup_css;
+    css_selector_t  *selector;
+
+    last_css = chxj_css_get_last_prop_list(iphone->css_prop_stack);
+    dup_css  = chxj_dup_css_prop_list(doc, last_css);
+    selector = chxj_css_find_selector(doc, iphone->style, node);
+    if (selector) {
+      chxj_css_prop_list_merge_property(doc, dup_css, selector);
+    }
+    chxj_css_push_prop_list(iphone->css_prop_stack, dup_css);
+    last_css = chxj_css_get_last_prop_list(iphone->css_prop_stack);
+
+    if (style_attr_value) {
+      css_stylesheet_t *ssheet = chxj_css_parse_style_attr(doc, NULL, apr_pstrdup(doc->pool, node->name), NULL, NULL, apr_pstrdup(doc->pool, style_attr_value));
+      if (ssheet) {
+        chxj_css_prop_list_merge_property(doc, last_css, ssheet->selector_head.next);
+      }
+    }
+  }
+  return last_css;
+}
+
+
+static css_prop_list_t *
+s_iphone_nopush_and_get_now_style(void *pdoc, Node *node, const char *style_attr_value)
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+  Doc *doc = iphone->doc;
+  css_prop_list_t *last_css = NULL;
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *dup_css;
+    css_selector_t  *selector;
+
+    last_css = chxj_css_get_last_prop_list(iphone->css_prop_stack);
+    dup_css  = chxj_dup_css_prop_list(doc, last_css);
+    selector = chxj_css_find_selector(doc, iphone->style, node);
+    if (selector) {
+      chxj_css_prop_list_merge_property(doc, dup_css, selector);
+    }
+    last_css = dup_css;
+
+    if (style_attr_value) {
+      css_stylesheet_t *ssheet = chxj_css_parse_style_attr(doc, NULL, apr_pstrdup(doc->pool, node->name), NULL, NULL, apr_pstrdup(doc->pool, style_attr_value));
+      if (ssheet) {
+        chxj_css_prop_list_merge_property(doc, last_css, ssheet->selector_head.next);
+      }
+    }
+  }
+  return last_css;
+}
+
+
+/**
+ * It is a handler who processes the SPAN tag.
+ *
+ * @param pdoc  [i/o] The pointer to the JHTML structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The SPAN tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_span_tag(void *pdoc, Node *node)
+{
+  iphone_t *iphone;
+  Doc *doc;
+  Attr *attr;
+  char *attr_style = NULL;
+  char *attr_color = NULL;
+  char *attr_size = NULL;
+  char *attr_align = NULL;
+  char *attr_blink = NULL;
+  char *attr_marquee = NULL;
+  char *attr_marquee_dir = NULL;
+  char *attr_marquee_style = NULL;
+  char *attr_marquee_loop = NULL;
+  char *attr_marquee_speed = NULL;
+  char *css_bgcolor        = NULL;
+
+  iphone = GET_IPHONE(pdoc);
+  doc     = iphone->doc;
+
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *nm  = qs_get_attr_name(doc,attr);
+    char *val = qs_get_attr_value(doc,attr);
+    if (val && STRCASEEQ('s','S',"style", nm)) {
+      attr_style = val;
+    }
+  }
+  if (IS_CSS_ON(iphone->entryp)) {
+    css_prop_list_t *style = s_iphone_nopush_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *color_prop = chxj_css_get_property_value(doc, style, "color");
+      css_property_t *size_prop = chxj_css_get_property_value(doc, style, "font-size");
+      css_property_t *text_align_prop = chxj_css_get_property_value(doc, style, "text-align");
+      css_property_t *decoration_prop = chxj_css_get_property_value(doc, style, "text-decoration");
+      css_property_t *display_prop = chxj_css_get_property_value(doc, style, "display");
+      css_property_t *marquee_dir_prop = chxj_css_get_property_value(doc, style, "-wap-marquee-dir");
+      css_property_t *marquee_style_prop = chxj_css_get_property_value(doc, style, "-wap-marquee-style");
+      css_property_t *marquee_loop_prop = chxj_css_get_property_value(doc, style, "-wap-marquee-loop");
+      css_property_t *marquee_speed_prop = chxj_css_get_property_value(doc, style, "-wap-marquee-speed");
+      css_property_t *bgcolor_prop = chxj_css_get_property_value(doc, style, "background-color");
+      
+      css_property_t *cur;
+      for (cur = color_prop->next; cur != color_prop; cur = cur->next) {
+        attr_color = apr_pstrdup(doc->pool, cur->value);
+      }
+      for (cur = size_prop->next; cur != size_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          if ( STRCASEEQ('x','X',"xx-small",cur->value)
+            || STRCASEEQ('x','X',"x-small", cur->value)
+            || STRCASEEQ('s','S',"small",   cur->value)
+            || STRCASEEQ('m','M',"medium",  cur->value)
+            || STRCASEEQ('l','L',"large",   cur->value)
+            || STRCASEEQ('x','X',"x-large", cur->value)
+            || STRCASEEQ('x','X',"xx-large",cur->value)) {
+            attr_size = apr_pstrdup(doc->pool, cur->value);
+          }
+        }
+      }
+      for (cur = decoration_prop->next; cur != decoration_prop; cur = cur->next) {
+        if (cur->value && STRCASEEQ('b','B',"blink",cur->value)) {
+          attr_blink = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+      for (cur = display_prop->next; cur != display_prop; cur = cur->next) {
+        if (cur->value && strcasecmp("-wap-marquee",cur->value) == 0) {
+          attr_marquee = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+      for (cur = marquee_dir_prop->next; cur != marquee_dir_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          if ( STRCASEEQ('l','L',"ltr",cur->value)
+            || STRCASEEQ('r','R',"rtl",cur->value)) {
+            attr_marquee_dir = apr_pstrdup(doc->pool, cur->value);
+          }
+        }
+      }
+      for (cur = marquee_style_prop->next; cur != marquee_style_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          if ( STRCASEEQ('s','S',"scroll",cur->value)
+            || STRCASEEQ('s','S',"slide",cur->value)
+            || STRCASEEQ('a','A',"alternate",cur->value)) {
+            attr_marquee_style = apr_pstrdup(doc->pool, cur->value);
+          }
+        }
+      }
+      for (cur = marquee_loop_prop->next; cur != marquee_loop_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          if(strcmp(cur->value,"0") == 0 || strcmp(cur->value,"-1") == 0){
+            attr_marquee_loop = "infinite";
+          }
+          else{
+            attr_marquee_loop = apr_pstrdup(doc->pool, cur->value);
+          }
+        }
+      }
+      for (cur = marquee_speed_prop->next; cur != marquee_speed_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          attr_marquee_speed = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+      for (cur = text_align_prop->next; cur != text_align_prop; cur = cur->next) {
+        if (STRCASEEQ('l','L',"left", cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "left");
+        }
+        else if (STRCASEEQ('c','C',"center",cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "center");
+        }
+        else if (STRCASEEQ('r','R',"right",cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "right");
+        }
+      }
+      for (cur = bgcolor_prop->next; cur != bgcolor_prop; cur = cur->next) {
+        if (cur->value && *cur->value) {
+          css_bgcolor = apr_pstrdup(doc->pool, cur->value);
+        }
+      }
+    }
+  }
+
+  W_L("<div");
+  if (attr_marquee) {
+    W_L(" style=\"");
+    W_L("overflow:-webkit-marquee;");
+    if (attr_marquee_style) {
+      W_L("-webkit-marquee-style:");
+      W_V(attr_marquee_style);
+      W_L(";");
+    }
+    if (attr_marquee_dir) {
+      W_L("-webkit-marquee-direction:");
+      if (STRCASEEQ('r','R',"rtl",attr_marquee_dir)) {
+        W_L("left");
+      }
+      else if (STRCASEEQ('l','L',"ltr",attr_marquee_dir)) {
+        W_L("right");
+      }
+      W_L(";");
+    }
+    if (attr_marquee_loop) {
+      W_L("-webkit-marquee-repetition:");
+      W_V(attr_marquee_loop);
+      W_L(";");
+    }
+    if (attr_marquee_speed) {
+      W_L("-webkit-marquee-speed:");
+      W_V(attr_marquee_speed);
+      W_L(";");
+    }
+    W_L("\"");
+  }
+  W_L(">");
+  W_L("<span");
+  if (attr_color || attr_size || attr_align || attr_blink || attr_marquee || css_bgcolor) {
+    W_L(" style=\"");
+    if (attr_color) {
+      attr_color = chxj_css_rgb_func_to_value(doc->pool, attr_color);
+      W_L("color:");
+      W_V(attr_color);
+      W_L(";");
+    }
+    if (attr_size) {
+      W_L("font-size:");
+      W_V(attr_size);
+      W_L(";");
+    }
+    if (attr_align) {
+      W_L("text-align:");
+      W_V(attr_align);
+      W_L(";");
+    }
+    if (attr_blink) {
+      W_L(STYLE_BLINK);
+      if (iphone->blink_keyframe_out == 0) {
+        iphone->style_data = apr_pstrcat(doc->pool, (iphone->style_data) ? iphone->style_data : "",
+                                                    BLINK_KEYFRAME,
+                                                    NULL);
+        iphone->blink_keyframe_out = 1;
+      }
+    }
+    if(css_bgcolor){
+      W_L("background-color:");
+      W_V(css_bgcolor);
+      W_L(";");
+    }
+    W_L("\"");
+  }
+  W_L(">");
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the SPAN tag.
+ *
+ * @param pdoc  [i/o] The pointer to the JHTML structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The SPAN tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_span_tag(void *pdoc, Node *UNUSED(node))
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+  Doc *doc = iphone->doc;
+
+  W_L("</span>");
+  W_L("</div>");
+  if (IS_CSS_ON(iphone->entryp)) {
+    chxj_css_pop_prop_list(iphone->css_prop_stack);
+  }
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the STYLE tag.
+ *
+ * @param pdoc  [i/o] The pointer to the SoftBank XHTML structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The STYLE tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_style_tag(void *pdoc, Node *node)
+{
+  iphone_t     *iphone;
+  Doc           *doc;
+  Attr          *attr;
+  char          *type = NULL;
+  Node          *child   = NULL;
+  char          *style;
+
+  iphone = GET_IPHONE(pdoc);
+  doc     = iphone->doc;
+
+  if (! IS_CSS_ON(iphone->entryp)) {
+    return iphone->out;
+  }
+
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name  = qs_get_attr_name(doc,attr);
+    char *value = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('t','T',"type", name)) {
+      if (value && *value && STRCASEEQ('t','T',"text/css",value)) {
+        type = value;
+      }
+    }
+  }
+  if (type) {
+    style = "";
+    for (child = qs_get_child_node(doc, node);
+         child;
+         child = qs_get_next_node(doc, child)) {
+      char *name = qs_get_node_name(doc, child);
+      if (STRCASEEQ('t','T',"text", name)) {
+        char *value = qs_get_node_value(doc, child);
+        if (value && *value) {
+          style = apr_pstrcat(doc->r->pool, style, value, NULL);
+        }
+      }
+    }
+    if (strlen(style) > 0) {
+      DBG(doc->r,"REQ[%X] start load CSS. buf:[%s]", TO_ADDR(doc->r),style);
+      iphone->style = chxj_css_parse_style_value(doc, iphone->style, style);
+      DBG(doc->r,"REQ[%X] end load CSS. value:[%s]", TO_ADDR(doc->r),style);
+    }
+  }
+  return iphone->out;
+}
+
+
+static char *
+s_iphone_create_style_data(apr_pool_t *pool, const char *style_data)
+{
+  if (! style_data) {
+    return "";
+  }
+  return apr_pstrcat(pool, "<style type=\"text/css\"><![CDATA[",style_data, "]]></style>", NULL);
+}
+
+/**
+ * It is a handler who processes the OBJECT tag.
+ *
+ * @param pdoc  [i/o] The pointer to the JHTML structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The OBJECT tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_object_tag(void *pdoc, Node *node)
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+  Doc *doc = iphone->doc;
+  Attr *attr;
+  
+  char *attr_id            = NULL;
+  char *attr_width         = NULL;
+  char *attr_height        = NULL;
+  char *attr_data          = NULL;
+  char *attr_type          = NULL;
+  char *attr_declare       = NULL;
+  char *attr_classid       = NULL;
+  char *attr_codebase      = NULL;
+  
+  /*--------------------------------------------------------------------------*/
+  /* Get Attributes                                                           */
+  /*--------------------------------------------------------------------------*/
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name   = qs_get_attr_name(doc,attr);
+    char *value  = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('i','I',"id",name)) {
+      attr_id = apr_pstrdup(doc->pool, value);
+    }
+    else if (STRCASEEQ('w','W',"width",name)) {
+      attr_width = apr_pstrdup(doc->pool, value);
+    }
+    else if (STRCASEEQ('h','H',"height",name)) {
+      attr_height = apr_pstrdup(doc->pool, value);
+    }
+    else if (STRCASEEQ('d','D',"data",name)) {
+      attr_data = apr_pstrdup(doc->pool, value);
+    }
+    else if  (STRCASEEQ('t','T',"type",name)) {
+      attr_type = apr_pstrdup(doc->pool, value);
+    }
+    else if  (STRCASEEQ('d','D',"declare",name)) {
+      attr_declare = apr_pstrdup(doc->pool, value);
+    }
+    else if (STRCASEEQ('c','C',"classid",name)) {
+      attr_classid = apr_pstrdup(doc->pool, value);
+    }
+    else if (STRCASEEQ('c','C',"codebase",name)) {
+      attr_codebase = apr_pstrdup(doc->pool, value);
+    }
+    
+  }
+  W_L("<object");
+  
+  if(attr_id){
+    W_L(" id=\"");
+    W_V(attr_id);
+    W_L("\"");
+  }
+  if(attr_width){
+    W_L(" width=\"");
+    W_V(attr_width);
+    W_L("\"");
+  }
+  if(attr_height){
+    W_L(" height=\"");
+    W_V(attr_height);
+    W_L("\"");
+  }
+  if(attr_data){
+    W_L(" data=\"");
+    W_V(attr_data);
+    W_L("\"");
+  }
+  if(attr_type){
+    W_L(" type=\"");
+    W_V(attr_type);
+    W_L("\"");
+  }
+  if(attr_declare){
+    W_L(" declare=\"declare\"");
+  }
+  if(attr_classid){
+    W_L(" classid=\"");
+    W_V(attr_classid);
+    W_L("\"");
+  }
+  if(attr_codebase){
+    W_L(" codebase=\"");
+    W_V(attr_codebase);
+    W_L("\"");
+  }
+  
+  W_L(">");
+  return iphone->out;
+}
+/**
+ * It is a handler who processes the OBJECT tag.
+ *
+ * @param pdoc  [i/o] The pointer to the JHTML structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The OBJECT tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_object_tag(void *pdoc, Node *UNUSED(node))
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+  Doc *doc = iphone->doc;
+
+  W_L("</object>");
+  return iphone->out;
+}
+/**
+ * It is a handler who processes the OBJECT tag.
+ *
+ * @param pdoc  [i/o] The pointer to the JHTML structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The OBJECT tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_param_tag(void *pdoc, Node *node)
+{
+  iphone_t *iphone = GET_IPHONE(pdoc);
+  Doc *doc = iphone->doc;
+
+  Attr *attr;
+  char *attr_name          = NULL;
+  char *attr_value         = NULL;
+  char *attr_valuetype     = NULL;
+  
+  /*--------------------------------------------------------------------------*/
+  /* Get Attributes                                                           */
+  /*--------------------------------------------------------------------------*/
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name   = qs_get_attr_name(doc,attr);
+    char *value  = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('n','N',"name",name)) {
+      attr_name = apr_pstrdup(doc->pool, value);
+    }
+    else if (STRCASEEQ('v','V',"value",name)) {
+      attr_value = apr_pstrdup(doc->pool, value);
+    }
+    else if (STRCASEEQ('v','V',"valuetype",name)) {
+      attr_valuetype = apr_pstrdup(doc->pool, value);
+    }
+  }
+  W_L("<param");
+  
+  if(attr_name){
+    W_L(" name=\"");
+    W_V(attr_name);
+    W_L("\"");
+  }
+  if(attr_value){
+    W_L(" value=\"");
+    W_V(attr_value);
+    W_L("\"");
+  }
+  if(attr_valuetype){
+    W_L(" valuetype=\"");
+    W_V(attr_valuetype);
+    W_L("\"");
+  }
+  W_L(" />");
+  return iphone->out;
+}
+/**
+ * It is a handler who processes the CAPTION tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The CAPTION tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_start_caption_tag(void *pdoc, Node *node)
+{
+  iphone_t    *iphone;
+  Doc         *doc;
+  request_rec *r;
+  Attr        *attr;
+  char        *attr_style = NULL;
+  char        *attr_align = NULL;
+
+  iphone = GET_IPHONE(pdoc);
+  doc    = iphone->doc;
+  r      = doc->r;
+
+  for (attr = qs_get_attr(doc,node);
+       attr;
+       attr = qs_get_next_attr(doc,attr)) {
+    char *name  = qs_get_attr_name(doc,attr);
+    char *value = qs_get_attr_value(doc,attr);
+    if (STRCASEEQ('a','A',"align", name)) {
+      if (value && 
+          (STRCASEEQ('l','L',"left",value) 
+        || STRCASEEQ('r','R',"right",value) 
+        || STRCASEEQ('t','T',"top",value)
+        || STRCASEEQ('b','B',"bottom",value) 
+        )) {
+        attr_align = value;
+      }
+    }
+    else if (STRCASEEQ('s','S',"style",name) && value && *value) {
+      attr_style = value;
+    }
+  }
+  
+  W_L("<caption");
+  if(attr_align){
+    W_L(" align=\"");
+    W_V(attr_align);
+    W_L("\"");
+  }
+  W_L(">");
+
+  return iphone->out;
+}
+
+
+/**
+ * It is a handler who processes the CAPTION tag.
+ *
+ * @param pdoc  [i/o] The pointer to the IPHONE structure at the output
+ *                     destination is specified.
+ * @param node   [i]   The CAPTION tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_iphone_end_caption_tag(void *pdoc, Node *UNUSED(child)) 
+{
+  iphone_t*    iphone = GET_IPHONE(pdoc);
+  Doc*          doc   = iphone->doc;
+  
+  W_L("</caption>");
+  
+  return iphone->out;
+}
+
+
+/*
+ * vim:ts=2 et
+ */
index 770762c..d110bf2 100644 (file)
@@ -6633,6 +6633,8 @@ s_ixhtml10_style_tag(void *pdoc, Node *node)
   Doc           *doc;
   Attr          *attr;
   char          *type = NULL;
+  Node          *child   = NULL;
+  char          *style;
 
   ixhtml10 = GET_IXHTML10(pdoc);
   doc     = ixhtml10->doc;
@@ -6653,14 +6655,23 @@ s_ixhtml10_style_tag(void *pdoc, Node *node)
     }
   }
 
-  Node *child = qs_get_child_node(doc, node);
-  if (type && child) {
-    char *name  = qs_get_node_name(doc, child);
-    if (STRCASEEQ('t','T',"text", name)) {
-      char *value = qs_get_node_value(doc, child);
-      DBG(doc->r,"REQ[%X] start load CSS. buf:[%s]", TO_ADDR(doc->r),value);
-      ixhtml10->style = chxj_css_parse_style_value(doc, ixhtml10->style, value);
-      DBG(doc->r,"REQ[%X] end load CSS. value:[%s]", TO_ADDR(doc->r),value);
+  if (type) {
+    style = "";
+    for (child = qs_get_child_node(doc, node);
+         child;
+         child = qs_get_next_node(doc, child)) {
+      char *name = qs_get_node_name(doc, child);
+      if (STRCASEEQ('t','T',"text", name)) {
+        char *value = qs_get_node_value(doc, child);
+        if (value && *value) {
+          style = apr_pstrcat(doc->r->pool, style, value, NULL);
+        }
+      }
+    }
+    if (strlen(style) > 0) {
+      DBG(doc->r,"REQ[%X] start load CSS. buf:[%s]", TO_ADDR(doc->r),style);
+      ixhtml10->style = chxj_css_parse_style_value(doc, ixhtml10->style, style);
+      DBG(doc->r,"REQ[%X] end load CSS. value:[%s]", TO_ADDR(doc->r),style);
     }
   }
   return ixhtml10->out;
index bac758f..05958e0 100644 (file)
@@ -604,7 +604,19 @@ s_jhtml_search_emoji(jhtml_t *jhtml, char *txt, char **rslt)
     &&  strlen(ee->imode->string) > 0
     &&  strncasecmp(ee->imode->string, txt, strlen(ee->imode->string)) == 0) {
       if (spec == NULL || spec->emoji_type == NULL) {
-        *rslt = apr_psprintf(r->pool,"\e%s\ f", ee->jphone->string);
+        if (ee->jphone != NULL && ee->jphone->string != NULL) {
+          if (jhtml->conf->use_emoji_image
+              && jhtml->conf->emoji_image_url
+              && strcasecmp(ee->jphone->string,"image") == 0) {
+            *rslt = apr_psprintf(r->pool, "<img src=\"%s/%d\" />",jhtml->conf->emoji_image_url, ee->no);
+          }
+          else if (strncasecmp(ee->jphone->string,"raw:",4) == 0) {
+            *rslt = apr_psprintf(r->pool,"%s", &(ee->jphone->string[4]));
+          }
+          else {
+            *rslt = apr_psprintf(r->pool,"\e%s\ f", ee->jphone->string);
+          }
+        }
         return strlen(ee->imode->string);
       }
 
@@ -615,7 +627,19 @@ s_jhtml_search_emoji(jhtml_t *jhtml, char *txt, char **rslt)
     && ((unsigned char)txt[0] & 0xff) == ((unsigned char)hex1byte)
     && ((unsigned char)txt[1] & 0xff) == ((unsigned char)hex2byte)) {
       if (spec == NULL || spec->emoji_type == NULL) {
-        *rslt = apr_psprintf(r->pool,"\e%s\ f", ee->jphone->string);
+        if (ee->jphone != NULL && ee->jphone->string != NULL) {
+          if (jhtml->conf->use_emoji_image
+              && jhtml->conf->emoji_image_url
+              && strcasecmp(ee->jphone->string,"image") == 0) {
+            *rslt = apr_psprintf(r->pool, "<img src=\"%s/%d\" />",jhtml->conf->emoji_image_url, ee->no);
+          }
+          else if (strncasecmp(ee->jphone->string,"raw:",4) == 0) {
+            *rslt = apr_psprintf(r->pool,"%s", &(ee->jphone->string[4]));
+          }
+          else {
+            *rslt = apr_psprintf(r->pool,"\e%s\ f", ee->jphone->string);
+          }
+        }
         return 2;
       }
 
index d9e793e..785e89c 100644 (file)
@@ -616,7 +616,19 @@ s_jxhtml_search_emoji(jxhtml_t *jxhtml, char *txt, char **rslt)
     &&  strlen(ee->imode->string) > 0
     &&  strncasecmp(ee->imode->string, txt, strlen(ee->imode->string)) == 0) {
       if (spec == NULL || spec->emoji_type == NULL) {
-        *rslt = apr_psprintf(r->pool,"\e%s\ f", ee->jphone->string);
+        if (ee->jphone != NULL && ee->jphone->string != NULL) {
+          if (jxhtml->conf->use_emoji_image
+              && jxhtml->conf->emoji_image_url
+              && strcasecmp(ee->jphone->string,"image") == 0) {
+            *rslt = apr_psprintf(r->pool, "<img src=\"%s/%d\" />",jxhtml->conf->emoji_image_url, ee->no);
+          }
+          else if (strncasecmp(ee->jphone->string, "raw:",4) == 0) {
+            *rslt = apr_psprintf(r->pool,"%s", &(ee->jphone->string[4]));
+          }
+          else {
+            *rslt = apr_psprintf(r->pool,"\e%s\ f", ee->jphone->string);
+          }
+        }
         return strlen(ee->imode->string);
       }
 
@@ -627,7 +639,19 @@ s_jxhtml_search_emoji(jxhtml_t *jxhtml, char *txt, char **rslt)
     && ((unsigned char)txt[0] & 0xff) == ((unsigned char)hex1byte)
     && ((unsigned char)txt[1] & 0xff) == ((unsigned char)hex2byte)) {
       if (spec == NULL || spec->emoji_type == NULL) {
-        *rslt = apr_psprintf(r->pool,"\e%s\ f", ee->jphone->string);
+        if (ee->jphone != NULL && ee->jphone->string != NULL) {
+          if (jxhtml->conf->use_emoji_image
+              && jxhtml->conf->emoji_image_url
+              && strcasecmp(ee->jphone->string,"image") == 0) {
+            *rslt = apr_psprintf(r->pool, "<img src=\"%s/%d\" />",jxhtml->conf->emoji_image_url, ee->no);
+          }
+          else if (strncasecmp(ee->jphone->string, "raw:",4) == 0) {
+            *rslt = apr_psprintf(r->pool,"%s", &(ee->jphone->string[4]));
+          }
+          else {
+            *rslt = apr_psprintf(r->pool,"\e%s\ f", ee->jphone->string);
+          }
+        }
         return 2;
       }
 
@@ -2569,7 +2593,7 @@ s_jxhtml_start_input_tag(void *pdoc, Node *node)
 
     char *vv = s_jxhtml_istyle_to_wap_input_format(doc->buf.pool,attr_istyle);
     W_L(" style=\"");
-    W_L("-wrap-input-format:");
+    W_L("-wap-input-format:");
     W_V(vv);
     W_L(";");
     W_L("\"");
@@ -2579,7 +2603,7 @@ s_jxhtml_start_input_tag(void *pdoc, Node *node)
 
     char *vv = s_jxhtml_istyle_to_wap_input_format(doc->buf.pool,"4");
     W_L(" style=\"");
-    W_L("-wrap-input-format:");
+    W_L("-wap-input-format:");
     W_V(vv);
     W_L(";");
     W_L("\"");
@@ -6625,6 +6649,9 @@ s_jxhtml_style_tag(void *pdoc, Node *node)
   Doc           *doc;
   Attr          *attr;
   char          *type = NULL;
+  Node          *child   = NULL;
+  char          *style;
+
 
   jxhtml = GET_JXHTML(pdoc);
   doc     = jxhtml->doc;
@@ -6644,15 +6671,23 @@ s_jxhtml_style_tag(void *pdoc, Node *node)
       }
     }
   }
-
-  Node *child = qs_get_child_node(doc, node);
-  if (type && child) {
-    char *name  = qs_get_node_name(doc, child);
-    if (STRCASEEQ('t','T',"text", name)) {
-      char *value = qs_get_node_value(doc, child);
-      DBG(doc->r,"REQ[%X] start load CSS. buf:[%s]", TO_ADDR(doc->r),value);
-      jxhtml->style = chxj_css_parse_style_value(doc, jxhtml->style, value);
-      DBG(doc->r,"REQ[%X] end load CSS. value:[%s]", TO_ADDR(doc->r),value);
+  if (type) {
+    style = "";
+    for (child = qs_get_child_node(doc, node);
+         child;
+         child = qs_get_next_node(doc, child)) {
+      char *name = qs_get_node_name(doc, child);
+      if (STRCASEEQ('t','T',"text", name)) {
+        char *value = qs_get_node_value(doc, child);
+        if (value && *value) {
+          style = apr_pstrcat(doc->r->pool, style, value, NULL);
+        }
+      }
+    }
+    if (strlen(style) > 0) {
+      DBG(doc->r,"REQ[%X] start load CSS. buf:[%s]", TO_ADDR(doc->r),style);
+      jxhtml->style = chxj_css_parse_style_value(doc, jxhtml->style, style);
+      DBG(doc->r,"REQ[%X] end load CSS. value:[%s]", TO_ADDR(doc->r),style);
     }
   }
   return jxhtml->out;
index 652c903..e8a91f5 100644 (file)
@@ -268,6 +268,18 @@ s_set_device_data(Doc *doc, apr_pool_t *p, device_table_list *dtl, Node *node)
             dt->html_spec_type = CHXJ_SPEC_Jxhtml;
             dt->provider       = CHXJ_PROVIDER_SOFTBANK;
           }
+          else if (STRCASEEQ('i','I',"iphone2",vv)) {
+            dt->html_spec_type = CHXJ_SPEC_iPhone2;
+            dt->provider       = CHXJ_PROVIDER_SOFTBANK;
+          }
+          else if (STRCASEEQ('i','I',"iphone3",vv)) {
+            dt->html_spec_type = CHXJ_SPEC_iPhone3;
+            dt->provider       = CHXJ_PROVIDER_SOFTBANK;
+          }
+          else if (STRCASEEQ('i','I',"iphone4",vv)) {
+            dt->html_spec_type = CHXJ_SPEC_iPhone4;
+            dt->provider       = CHXJ_PROVIDER_SOFTBANK;
+          }
         }
       }
       else 
index 2fd6011..a6e3dda 100644 (file)
@@ -52,6 +52,8 @@ static char* s_load_emoji_ezweb_tag( Doc* doc, apr_pool_t* p, emoji_t* em, Node*
 
 static char* s_load_emoji_jphone_tag( Doc* doc, apr_pool_t* p, emoji_t* em, Node* node);
 
+static char* s_load_emoji_iphone_tag( Doc* doc, apr_pool_t* p, emoji_t* em, Node* node);
+
 static char  s_hexstring_to_byte(char* s);
 
 
@@ -143,6 +145,9 @@ s_load_emoji_set_tag(
   em->imode  = apr_palloc(p, sizeof(imode_emoji_t));
   em->ezweb  = apr_palloc(p, sizeof(ezweb_emoji_t));
   em->jphone = apr_palloc(p, sizeof(jphone_emoji_t));
+  em->iphone = apr_palloc(p, sizeof(iphone_emoji_t));
+  em->jphone->string = NULL;
+  em->iphone->string = NULL;
   
   for (child = qs_get_child_node(doc, node);
        child;
@@ -165,6 +170,10 @@ s_load_emoji_set_tag(
         if ((rtn = s_load_emoji_imode_tag(doc, p, em, child)) != NULL)
           return rtn;
       }
+      else if (strcasecmp(name, "iphone") == 0) {
+        if ((rtn = s_load_emoji_iphone_tag(doc, p, em, child)) != NULL)
+          return rtn;
+      }
       break;
 
     case 'e':
@@ -505,6 +514,71 @@ s_load_emoji_jphone_tag(
   return NULL;
 }
 
+static char*
+s_load_emoji_iphone_tag(
+  Doc*        doc,
+  apr_pool_t* p,
+  emoji_t*    em,
+  Node*       node)
+{
+  Node* child;
+
+
+  em->iphone->string = NULL;
+
+  for (child = qs_get_child_node(doc, node);
+       child ;
+       child = qs_get_next_node(doc, child)) {
+
+    char* name  = qs_get_node_name(doc, child);
+
+    if ((*name == 's' || *name == 'S') && strcasecmp(name, "string") == 0) {
+
+      Node* stringnode = qs_get_child_node(doc, child);
+
+      if (stringnode) {
+
+        char* cname  = qs_get_node_name(doc, stringnode);
+        char* cvalue = qs_get_node_value(doc, stringnode);
+
+        if ((*cname == 't' || *cname == 'T') && strcasecmp(cname, "text") == 0) {
+          unsigned int   ii;
+          int   jj;
+          char* tmp;
+          tmp = apr_palloc(p, strlen(cvalue)+1);
+          memset(tmp, 0, strlen(cvalue)+1);
+
+          for (jj=0,ii=0; ii< strlen(cvalue); ii++) {
+            if (strncasecmp(&cvalue[ii] , ESCAPE_CHAR_LT, strlen(ESCAPE_CHAR_LT)) == 0) {
+              tmp[jj] = '<';
+              jj++;
+              ii += (strlen(ESCAPE_CHAR_LT) - 1);
+            }
+            else
+            if (strncasecmp(&cvalue[ii] , ESCAPE_CHAR_GT, strlen(ESCAPE_CHAR_GT)) == 0) {
+              tmp[jj] = '>';
+              jj++;
+              ii += (strlen(ESCAPE_CHAR_GT) - 1);
+            }
+            else {
+              tmp[jj] = cvalue[ii];
+              jj++;
+            }
+          }
+          em->iphone->string = apr_pstrdup(p,tmp);
+        }
+      }
+      else {
+        em->iphone->string    = apr_palloc(p, 1);
+        em->iphone->string[0] = 0;
+      }
+    }
+  }
+
+  return NULL;
+}
+
 
 
 static void
index 487e78a..ea4d033 100644 (file)
@@ -66,6 +66,18 @@ tag_handlers chxj_tag_handlers[] = {
     .handler = jxhtml_handler,
   },
   {
+    .type    = CHXJ_SPEC_iPhone2,
+    .handler = iphone_handler,
+  },
+  {
+    .type    = CHXJ_SPEC_iPhone3,
+    .handler = iphone_handler,
+  },
+  {
+    .type    = CHXJ_SPEC_iPhone4,
+    .handler = iphone_handler,
+  },
+  {
     .type    = CHXJ_SPEC_HTML,
     .handler = NULL,
   },
index bbf106a..0f35fb2 100644 (file)
@@ -375,6 +375,15 @@ s_specified_device_from_tsv(request_rec *r,device_table *spec,const char *user_a
         else if (STRCASEEQ('j','J',"jxhtml",val)) {
           spec->html_spec_type = CHXJ_SPEC_Jxhtml;
         }
+        else if (STRCASEEQ('i','I',"iphone2",val)) {
+          spec->html_spec_type = CHXJ_SPEC_iPhone2;
+        }
+        else if (STRCASEEQ('i','I',"iphone3",val)) {
+          spec->html_spec_type = CHXJ_SPEC_iPhone3;
+        }
+        else if (STRCASEEQ('i','I',"iphone4",val)) {
+          spec->html_spec_type = CHXJ_SPEC_iPhone4;
+        }
       }
       else if (STRCASEEQ('o','O',"output_encoding",k)){
           spec->output_encoding = apr_pstrdup(r->pool,val);
index 498fbe9..5ff2d40 100644 (file)
@@ -496,6 +496,32 @@ chxj_chxjif_is_mine(device_table *spec, Doc *doc, Node *tag)
           return 1;
         }
       }
+      else if (STRCASEEQ('i','I',"iphone2",value)) {
+        if (spec->html_spec_type == CHXJ_SPEC_iPhone2) {
+          /* Yes , it is mine */
+          return 1;
+        }
+      }
+      else if (STRCASEEQ('i','I',"iphone3",value)) {
+        if (spec->html_spec_type == CHXJ_SPEC_iPhone3) {
+          /* Yes , it is mine */
+          return 1;
+        }
+      }
+      else if (STRCASEEQ('i','I',"iphone4",value)) {
+        if (spec->html_spec_type == CHXJ_SPEC_iPhone4) {
+          /* Yes , it is mine */
+          return 1;
+        }
+      }
+      else if (STRCASEEQ('i','I',"iphone",value)) {
+        if (spec->html_spec_type == CHXJ_SPEC_iPhone2
+            || spec->html_spec_type == CHXJ_SPEC_iPhone3
+            || spec->html_spec_type == CHXJ_SPEC_iPhone4) {
+          /* Yes , it is mine */
+          return 1;
+        }
+      }
       else if (STRCASEEQ('c','C',"chtml",value)) {
         switch (spec->html_spec_type) {
         case CHXJ_SPEC_Chtml_1_0:
index 64ae102..c30b7e4 100644 (file)
@@ -591,6 +591,7 @@ s_xhtml_search_emoji(xhtml_t *xhtml, char *txt, char **rslt)
   if (spec == NULL) {
     DBG(r,"REQ[%X] spec is NULL",TO_ADDR(r));
   }
+  DBG(r,"REQ[%X] conf[%X] is NULL",TO_ADDR(r),TO_ADDR(xhtml->conf));
 
   for (ee = xhtml->conf->emoji;
        ee;
@@ -606,43 +607,115 @@ s_xhtml_search_emoji(xhtml_t *xhtml, char *txt, char **rslt)
     &&  strlen(ee->imode->string) > 0
     &&  strncasecmp(ee->imode->string, txt, strlen(ee->imode->string)) == 0) {
       if (spec == NULL || spec->emoji_type == NULL) {
-        *rslt = apr_psprintf(r->pool,
-                        "<img localsrc=%s>",
-                        ee->ezweb->typeA);
+        if (ee->ezweb != NULL && ee->ezweb->typeA != NULL) {
+          if (xhtml->conf->use_emoji_image 
+              && xhtml->conf->emoji_image_url 
+              && strcasecmp(ee->ezweb->typeA,"image") == 0) {
+            *rslt = apr_psprintf(r->pool, "<img src=\"%s/%d\" />",xhtml->conf->emoji_image_url, ee->no);
+          }
+          else if (strncasecmp(ee->ezweb->typeA,"raw:",4) == 0) {
+            *rslt = apr_psprintf(r->pool,"%s",&(ee->ezweb->typeA[4]));
+          }
+          else {
+            *rslt = apr_psprintf(r->pool,
+                            "<img localsrc=%s>",
+                            ee->ezweb->typeA);
+          } 
+        }
         return strlen(ee->imode->string);
       }
 
       if (strcasecmp(xhtml->spec->emoji_type, "a") == 0) {
-        *rslt = apr_psprintf(r->pool,
-                        "<img localsrc=%s>",
-                        ee->ezweb->typeA);
+        if (ee->ezweb != NULL && ee->ezweb->typeA != NULL) {
+          if (xhtml->conf->use_emoji_image 
+              && xhtml->conf->emoji_image_url 
+              && strcasecmp(ee->ezweb->typeA,"image") == 0) {
+            *rslt = apr_psprintf(r->pool, "<img src=\"%s/%d\" />",xhtml->conf->emoji_image_url, ee->no);
+          }
+          else if (strncasecmp(ee->ezweb->typeA,"raw:",4) == 0) {
+            *rslt = apr_psprintf(r->pool,"%s",&(ee->ezweb->typeA[4]));
+          }
+          else {
+            *rslt = apr_psprintf(r->pool,
+                            "<img localsrc=%s>",
+                            ee->ezweb->typeA);
+          }
+        }
         return strlen(ee->imode->string);
       } 
       else
       if (strcasecmp(xhtml->spec->emoji_type, "b") == 0) {
-        *rslt = apr_psprintf(r->pool,
-                        "<img localsrc=%s>",
-                        ee->ezweb->typeB);
+        if (ee->ezweb != NULL && ee->ezweb->typeB != NULL) {
+          if (xhtml->conf->use_emoji_image
+              && xhtml->conf->emoji_image_url
+              && strcasecmp(ee->ezweb->typeB,"image") == 0) {
+            *rslt = apr_psprintf(r->pool, "<img src=\"%s/%d\" />",xhtml->conf->emoji_image_url, ee->no);
+          }
+          else if (strncasecmp(ee->ezweb->typeB,"raw:",4) == 0) {
+            *rslt = apr_psprintf(r->pool,"%s",&(ee->ezweb->typeB[4]));
+          }
+          else {
+            *rslt = apr_psprintf(r->pool,
+                            "<img localsrc=%s>",
+                            ee->ezweb->typeB);
+          }
+        }
         return strlen(ee->imode->string);
       }
       else
       if (strcasecmp(xhtml->spec->emoji_type, "c") == 0) {
-        *rslt = apr_psprintf(r->pool,
-                        "<img localsrc=%s>",
-                        ee->ezweb->typeC);
+        if (ee->ezweb != NULL && ee->ezweb->typeC != NULL) {
+          if (xhtml->conf->use_emoji_image
+              && xhtml->conf->emoji_image_url
+              && strcasecmp(ee->ezweb->typeC,"image") == 0) {
+            *rslt = apr_psprintf(r->pool, "<img src=\"%s/%d\" />",xhtml->conf->emoji_image_url, ee->no);
+          }
+          else if (strncasecmp(ee->ezweb->typeC,"raw:",4) == 0) {
+            *rslt = apr_psprintf(r->pool,"%s",&(ee->ezweb->typeC[4]));
+          }
+          else {
+            *rslt = apr_psprintf(r->pool,
+                            "<img localsrc=%s>",
+                            ee->ezweb->typeC);
+          }
+        }
         return strlen(ee->imode->string);
       }
       else
       if (strcasecmp(xhtml->spec->emoji_type, "d") == 0) {
-        *rslt = apr_psprintf(r->pool,
-                        "<img localsrc=%s>",
-                        ee->ezweb->typeD);
+        if (ee->ezweb != NULL && ee->ezweb->typeD != NULL) {
+          if (xhtml->conf->use_emoji_image
+              && xhtml->conf->emoji_image_url
+              && strcasecmp(ee->ezweb->typeD,"image") == 0) {
+            *rslt = apr_psprintf(r->pool, "<img src=\"%s/%d\" />",xhtml->conf->emoji_image_url, ee->no);
+          }
+          else if (strncasecmp(ee->ezweb->typeD,"raw:",4) == 0) {
+            *rslt = apr_psprintf(r->pool,"%s",&(ee->ezweb->typeD[4]));
+          }
+          else {
+            *rslt = apr_psprintf(r->pool,
+                            "<img localsrc=%s>",
+                            ee->ezweb->typeD);
+          }
+        }
         return strlen(ee->imode->string);
       }
       else {
-        *rslt = apr_psprintf(r->pool,
-                        "<img localsrc=%s>",
-                        ee->ezweb->typeA);
+        if (ee->ezweb != NULL && ee->ezweb->typeA != NULL) {
+          if (xhtml->conf->use_emoji_image
+              && xhtml->conf->emoji_image_url
+              && strcasecmp(ee->ezweb->typeA,"image") == 0) {
+            *rslt = apr_psprintf(r->pool, "<img src=\"%s/%d\" />",xhtml->conf->emoji_image_url, ee->no);
+          }
+          else if (strncasecmp(ee->ezweb->typeA,"raw:",4) == 0) {
+            *rslt = apr_psprintf(r->pool,"%s",&(ee->ezweb->typeA[4]));
+          }
+          else {
+            *rslt = apr_psprintf(r->pool,
+                            "<img localsrc=%s>",
+                            ee->ezweb->typeA);
+          }
+        }
         return strlen(ee->imode->string);
       }
       return 0;
@@ -653,43 +726,115 @@ s_xhtml_search_emoji(xhtml_t *xhtml, char *txt, char **rslt)
     && ((unsigned char)txt[0] & 0xff) == ((unsigned char)hex1byte)
     && ((unsigned char)txt[1] & 0xff) == ((unsigned char)hex2byte)) {
       if (spec == NULL || spec->emoji_type == NULL) {
-        *rslt = apr_psprintf(r->pool,
-                        "<img localsrc=\"%s\">",
-                        ee->ezweb->typeA);
+        if (ee->ezweb != NULL && ee->ezweb->typeA != NULL) {
+          if (xhtml->conf->use_emoji_image
+              && xhtml->conf->emoji_image_url
+              && strcasecmp(ee->ezweb->typeA,"image") == 0) {
+            *rslt = apr_psprintf(r->pool, "<img src=\"%s/%d\" />",xhtml->conf->emoji_image_url, ee->no);
+          }
+          else if (strncasecmp(ee->ezweb->typeA,"raw:",4) == 0) {
+            *rslt = apr_psprintf(r->pool,"%s",&(ee->ezweb->typeA[4]));
+          }
+          else {
+            *rslt = apr_psprintf(r->pool,
+                            "<img localsrc=\"%s\">",
+                            ee->ezweb->typeA);
+          }
+        }
         return 2;
       }
 
       if (strcasecmp(xhtml->spec->emoji_type, "a") == 0) {
-        *rslt = apr_psprintf(r->pool,
-                        "<img localsrc=\"%s\">",
-                        ee->ezweb->typeA);
+        if (ee->ezweb != NULL && ee->ezweb->typeA != NULL) {
+          if (xhtml->conf->use_emoji_image
+              && xhtml->conf->emoji_image_url
+              && strcasecmp(ee->ezweb->typeA,"image") == 0) {
+            *rslt = apr_psprintf(r->pool, "<img src=\"%s/%d\" />",xhtml->conf->emoji_image_url, ee->no);
+          }
+          else if (strncasecmp(ee->ezweb->typeA,"raw:",4) == 0) {
+            *rslt = apr_psprintf(r->pool,"%s",&(ee->ezweb->typeA[4]));
+          }
+          else {
+            *rslt = apr_psprintf(r->pool,
+                            "<img localsrc=\"%s\">",
+                            ee->ezweb->typeA);
+          }
+        }
         return 2;
       } 
       else
       if (strcasecmp(xhtml->spec->emoji_type, "b") == 0) {
-        *rslt = apr_psprintf(r->pool,
-                        "<img localsrc=\"%s\">",
-                        ee->ezweb->typeB);
+        if (ee->ezweb != NULL && ee->ezweb->typeB != NULL) {
+          if (xhtml->conf->use_emoji_image
+              && xhtml->conf->emoji_image_url
+              && strcasecmp(ee->ezweb->typeB,"image") == 0) {
+            *rslt = apr_psprintf(r->pool, "<img src=\"%s/%d\" />",xhtml->conf->emoji_image_url, ee->no);
+          }
+          else if (strncasecmp(ee->ezweb->typeB,"raw:",4) == 0) {
+            *rslt = apr_psprintf(r->pool,"%s",&(ee->ezweb->typeB[4]));
+          }
+          else {
+            *rslt = apr_psprintf(r->pool,
+                            "<img localsrc=\"%s\">",
+                            ee->ezweb->typeB);
+          }
+        }
         return 2;
       }
       else
       if (strcasecmp(xhtml->spec->emoji_type, "c") == 0) {
-        *rslt = apr_psprintf(r->pool,
-                        "<img localsrc=\"%s\">",
-                        ee->ezweb->typeC);
+        if (ee->ezweb != NULL && ee->ezweb->typeC != NULL) {
+          if (xhtml->conf->use_emoji_image
+              && xhtml->conf->emoji_image_url
+              && strcasecmp(ee->ezweb->typeC,"image") == 0) {
+            *rslt = apr_psprintf(r->pool, "<img src=\"%s/%d\" />",xhtml->conf->emoji_image_url, ee->no);
+          }
+          else if (strncasecmp(ee->ezweb->typeC,"raw:",4) == 0) {
+            *rslt = apr_psprintf(r->pool,"%s",&(ee->ezweb->typeC[4]));
+          }
+          else {
+            *rslt = apr_psprintf(r->pool,
+                            "<img localsrc=\"%s\">",
+                            ee->ezweb->typeC);
+          }
+        }
         return 2;
       }
       else
       if (strcasecmp(xhtml->spec->emoji_type, "d") == 0) {
-        *rslt = apr_psprintf(r->pool,
-                        "<img localsrc=\"%s\">",
-                        ee->ezweb->typeD);
+        if (ee->ezweb != NULL && ee->ezweb->typeD != NULL) {
+          if (xhtml->conf->use_emoji_image
+              && xhtml->conf->emoji_image_url
+              && strcasecmp(ee->ezweb->typeD,"image") == 0) {
+            *rslt = apr_psprintf(r->pool, "<img src=\"%s/%d\" />",xhtml->conf->emoji_image_url, ee->no);
+          }
+          else if (strncasecmp(ee->ezweb->typeD,"raw:",4) == 0) {
+            *rslt = apr_psprintf(r->pool,"%s",&(ee->ezweb->typeD[4]));
+          }
+          else {
+            *rslt = apr_psprintf(r->pool,
+                            "<img localsrc=\"%s\">",
+                            ee->ezweb->typeD);
+          }
+        }
         return 2;
       }
       else {
-        *rslt = apr_psprintf(r->pool,
-                        "<img localsrc=\"%s\">",
-                        ee->ezweb->typeD);
+        if (ee->ezweb != NULL && ee->ezweb->typeA != NULL) {
+          if (xhtml->conf->use_emoji_image
+              && xhtml->conf->emoji_image_url
+              && strcasecmp(ee->ezweb->typeA,"image") == 0) {
+            *rslt = apr_psprintf(r->pool, "<img src=\"%s/%d\" />",xhtml->conf->emoji_image_url, ee->no);
+          }
+          else if (strncasecmp(ee->ezweb->typeA,"raw:",4) == 0) {
+            *rslt = apr_psprintf(r->pool,"%s",&(ee->ezweb->typeA[4]));
+          }
+          else {
+            *rslt = apr_psprintf(r->pool,
+                            "<img localsrc=\"%s\">",
+                            ee->ezweb->typeA);
+          }
+        }
         return 2;
       }
       return 0;
@@ -6277,6 +6422,9 @@ s_xhtml_1_0_style_tag(void *pdoc, Node *node)
   Doc           *doc;
   Attr          *attr;
   char          *type = NULL;
+  Node          *child   = NULL;
+  char          *style;
+
 
   xhtml = GET_XHTML(pdoc);
   doc     = xhtml->doc;
@@ -6297,14 +6445,23 @@ s_xhtml_1_0_style_tag(void *pdoc, Node *node)
     }
   }
 
-  Node *child = qs_get_child_node(doc, node);
-  if (type && child) {
-    char *name  = qs_get_node_name(doc, child);
-    if (STRCASEEQ('t','T',"text", name)) {
-      char *value = qs_get_node_value(doc, child);
-      DBG(doc->r,"REQ[%X] start load CSS. buf:[%s]", TO_ADDR(doc->r),value);
-      xhtml->style = chxj_css_parse_style_value(doc, xhtml->style, value);
-      DBG(doc->r,"REQ[%X] end load CSS. value:[%s]", TO_ADDR(doc->r),value);
+  if (type) {
+    style = "";
+    for (child = qs_get_child_node(doc, node);
+         child;
+         child = qs_get_next_node(doc, child)) {
+      char *name = qs_get_node_name(doc, child);
+      if (STRCASEEQ('t','T',"text", name)) {
+        char *value = qs_get_node_value(doc, child);
+        if (value && *value) {
+          style = apr_pstrcat(doc->r->pool, style, value, NULL);
+        }
+      }
+    }
+    if (strlen(style) > 0) {
+      DBG(doc->r,"REQ[%X] start load CSS. buf:[%s]", TO_ADDR(doc->r),style);
+      xhtml->style = chxj_css_parse_style_value(doc, xhtml->style, style);
+      DBG(doc->r,"REQ[%X] end load CSS. value:[%s]", TO_ADDR(doc->r),style);
     }
   }
   return xhtml->out;
index 2013585..e5d0541 100644 (file)
@@ -58,6 +58,7 @@
 #include "chxj_ixhtml10.h"
 #include "chxj_jhtml.h"
 #include "chxj_jxhtml.h"
+#include "chxj_iphone.h"
 #include "chxj_img_conv_format.h"
 #include "chxj_qr_code.h"
 #include "chxj_encoding.h"
@@ -153,6 +154,24 @@ converter_t convert_routine[] = {
     .emoji_only_converter = chxj_jxhtml_emoji_only_converter,
   },
   {
+    /* CHXJ_SPEC_iPhone2          */
+    .converter            = chxj_convert_iphone,
+    .encoder              = chxj_encoding,
+    .emoji_only_converter = chxj_iphone_emoji_only_converter,
+  },
+  {
+    /* CHXJ_SPEC_iPhone3          */
+    .converter            = chxj_convert_iphone,
+    .encoder              = chxj_encoding,
+    .emoji_only_converter = chxj_iphone_emoji_only_converter,
+  },
+  {
+    /* CHXJ_SPEC_iPhone4          */
+    .converter            = chxj_convert_iphone,
+    .encoder              = chxj_encoding,
+    .emoji_only_converter = chxj_iphone_emoji_only_converter,
+  },
+  {
     /* CHXJ_SPEC_HTML             */
     .converter = NULL,
     .encoder  = NULL,
@@ -237,6 +256,9 @@ chxj_headers_fixup(request_rec *r)
   case CHXJ_SPEC_Hdml:
   case CHXJ_SPEC_Jhtml:
   case CHXJ_SPEC_Jxhtml:
+  case CHXJ_SPEC_iPhone2:
+  case CHXJ_SPEC_iPhone3:
+  case CHXJ_SPEC_iPhone4:
     request_conf->entryp = entryp = chxj_apply_convrule(r, dconf->convrules);
     if (dconf->image != CHXJ_IMG_ON) {
       if (! entryp) {
@@ -419,6 +441,9 @@ s_clear_cookie_header(request_rec *r, device_table *spec)
   case CHXJ_SPEC_Jxhtml:
     apr_table_unset(r->headers_in, "Cookie");
     break;
+  case CHXJ_SPEC_iPhone2:
+  case CHXJ_SPEC_iPhone3:
+  case CHXJ_SPEC_iPhone4:
   default:
     break;
   }
@@ -522,6 +547,9 @@ chxj_convert(request_rec *r, const char **src, apr_size_t *len, device_table *sp
     case CHXJ_SPEC_Jxhtml:
       cookie = chxj_save_cookie(r);
       break;
+    case CHXJ_SPEC_iPhone2:
+    case CHXJ_SPEC_iPhone3:
+    case CHXJ_SPEC_iPhone4:
     default:
       break;
     }
@@ -1177,6 +1205,9 @@ chxj_output_filter(ap_filter_t *f, apr_bucket_brigade *bb)
         s_add_cookie_id_if_has_location_header(r, cookie);
         chxj_cookie_unlock(r, lock);
         break;
+      case CHXJ_SPEC_iPhone2:
+      case CHXJ_SPEC_iPhone3:
+      case CHXJ_SPEC_iPhone4:
       default:
         break;
       }
@@ -1229,6 +1260,9 @@ chxj_output_filter(ap_filter_t *f, apr_bucket_brigade *bb)
           s_add_cookie_id_if_has_location_header(r, cookie);
           chxj_cookie_unlock(r, lock);
           break;
+        case CHXJ_SPEC_iPhone2:
+        case CHXJ_SPEC_iPhone3:
+        case CHXJ_SPEC_iPhone4:
         default:
           break;
         }
@@ -1470,6 +1504,9 @@ chxj_output_filter(ap_filter_t *f, apr_bucket_brigade *bb)
             apr_table_unset(r->err_headers_out, "Set-Cookie");
             break;
 
+          case CHXJ_SPEC_iPhone2:
+          case CHXJ_SPEC_iPhone3:
+          case CHXJ_SPEC_iPhone4:
           default:
             break;
           }
@@ -1875,6 +1912,9 @@ chxj_insert_filter(request_rec *r)
   case CHXJ_SPEC_Hdml:
   case CHXJ_SPEC_Jhtml:
   case CHXJ_SPEC_Jxhtml:
+  case CHXJ_SPEC_iPhone2:
+  case CHXJ_SPEC_iPhone3:
+  case CHXJ_SPEC_iPhone4:
     break;
 
   default:
@@ -2003,6 +2043,9 @@ chxj_create_per_dir_config(apr_pool_t *p, char *arg)
   conf->image_rewrite_mode = CHXJ_IMG_REWRITE_MODE_NONE;
   conf->image_rewrite_url = NULL;
 
+  conf->use_emoji_image = 0;
+  conf->emoji_image_url = NULL;
+
   return conf;
 }
 
@@ -2327,6 +2370,20 @@ chxj_merge_per_dir_config(apr_pool_t *p, void *basev, void *addv)
     mrg->image_rewrite_mode = add->image_rewrite_mode;
   }
 
+  if (add->use_emoji_image != 1){
+    mrg->use_emoji_image = base->use_emoji_image;
+  }
+  else{
+    mrg->use_emoji_image = add->use_emoji_image;
+  }
+
+  if (add->emoji_image_url){
+    mrg->emoji_image_url = add->emoji_image_url;
+  }
+  else{
+    mrg->emoji_image_url = base->emoji_image_url;
+  }
+
   return mrg;
 }
 
@@ -3357,6 +3414,31 @@ cmd_image_rewrite_mode(cmd_parms *parms, void *mconfig, const char *arg)
   return NULL;
 }
 
+
+static const char *
+cmd_use_emoji_image(cmd_parms *parms, void *mconfig, const char *arg)
+{
+  mod_chxj_config *conf;
+  conf = (mod_chxj_config *)mconfig;
+  if (strcasecmp("on", arg) == 0) {
+    conf->use_emoji_image = 1;
+  }
+  return NULL;
+}
+
+
+static const char *
+cmd_emoji_image_url(cmd_parms *parms, void *mconfig, const char *arg)
+{
+  mod_chxj_config *conf;
+  if (strlen(arg) > 256){
+    return "mod_chxj: set ChxjEmojiImageUrl is too long.";
+  }
+  conf = (mod_chxj_config *)mconfig;
+  conf->emoji_image_url = apr_pstrdup(parms->pool, arg);
+  return NULL;
+}
+
 static const command_rec cmds[] = {
   AP_INIT_TAKE1(
     "ChxjLoadDeviceData",
@@ -3557,6 +3639,20 @@ static const command_rec cmds[] = {
     OR_ALL,
     "Set rewrite Image rewrite url mode"
    ),
+  AP_INIT_TAKE1(
+    "ChxjUseEmojiImage",
+    cmd_use_emoji_image,
+    NULL,
+    OR_ALL,
+    "It is specified whether to use image for emoji. (Default:off)"
+   ),
+  AP_INIT_TAKE1(
+    "ChxjEmojiImageUrl",
+    cmd_emoji_image_url,
+    NULL,
+    OR_ALL,
+    "When image is used for emoji, url with the emoji image is specified. "
+   ),
   {NULL,{NULL},NULL,0,0,NULL},
 };
 
index 9e26544..a5579f2 100644 (file)
@@ -20,7 +20,6 @@ TARGET_LIB=libserf-$(SERF_MAJOR_VERSION).la
 
 #TEST_OBJECTS = test/serf_get.lo test/serf_response.lo test/serf_request.lo \
 #               test/serf_spider.lo
-<<<<<<< HEAD:src/serf/Makefile.in
 #
 #TEST_SUITE_OBJECTS = test/CuTest.lo test/test_all.lo test/test_util.lo \
 #                     test/test_buckets.lo test/test_context.lo \
@@ -28,15 +27,6 @@ TARGET_LIB=libserf-$(SERF_MAJOR_VERSION).la
 #
 #PROGRAMS = $(TEST_OBJECTS:.lo=) test/test_all
 #
-=======
-
-#TEST_SUITE_OBJECTS = test/CuTest.lo test/test_all.lo test/test_util.lo \
-#                     test/test_buckets.lo test/test_context.lo \
-#                     test/test_ssl.lo
-
-#PROGRAMS = $(TEST_OBJECTS:.lo=) test/test_all
-
->>>>>>> branch_0.13.0:src/serf/Makefile.in
 #TESTCASES = test/testcases/simple.response \
 #  test/testcases/chunked-empty.response test/testcases/chunked.response \
 #  test/testcases/chunked-trailers.response \