<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,9 +1,24 @@
 module MobileFuHelper
-  def mobile_xhtml_doctype
-    &quot;&lt;!DOCTYPE html PUBLIC \&quot;-//WAPFORUM//DTD XHTML Mobile 1.0//EN\&quot; \&quot;http://www.wapforum.org/DTD/xhtml-mobile10.dtd\&quot;&gt;&quot;
+  ACCEPTABLE_TYPES = [:mobile, :basic]
+  
+  def mobile_xhtml_doctype(type = :mobile, version = '1.0')
+    raise Exception.new(&quot;MobileFu: XHTML DOCTYPE type must either be ':mobile' or ':basic'&quot;) unless ACCEPTABLE_TYPES.include?(type)
+    raise Exception.new(&quot;MobileFu: XHTML DOCTYPE version must be in the format of '1.0' or '1.1', etc.&quot;) unless version.include?('.')
+    
+    doc_type = &quot;&lt;?xml version=\&quot;1.0\&quot; charset=\&quot;UTF-8\&quot; ?&gt;\n&quot;
+    doc_type += &quot;&lt;!DOCTYPE html PUBLIC &quot;
+    doc_type += case type
+                when :mobile
+                  &quot;\&quot;-//WAPFORUM//DTD XHTML Mobile #{version}//EN\&quot; \&quot;http://www.openmobilealliance.org/tech/DTD/xhtml-mobile#{version.gsub('.','')}.dtd\&quot;&gt;&quot;
+                when :basic
+                  &quot;\&quot;-//W3C//DTD XHTML Basic #{version}//EN\&quot; \&quot;http://www.w3.org/TR/xhtml-basic/xhtml-basic#{version.gsub('.','')}.dtd\&quot;&gt;&quot;
+                end
+    doc_type
   end
   
   def js_enabled_mobile_device?
     is_device?('iphone') || is_device?('mobileexplorer') || is_device?('android')
   end
-end
\ No newline at end of file
+end
+
+ActionView::Base.send(:include, MobileFuHelper)
\ No newline at end of file</diff>
      <filename>lib/mobile_fu_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>086ffa48c23e1d7ef46e7203ae133efa624ac3f7</id>
    </parent>
  </parents>
  <author>
    <name>Brendan G. Lim</name>
    <email>brendan@intridea.com</email>
  </author>
  <url>http://github.com/brendanlim/mobile-fu/commit/c8e8d46478b40d7eb0fec56997996054779c662d</url>
  <id>c8e8d46478b40d7eb0fec56997996054779c662d</id>
  <committed-date>2009-04-02T21:20:45-07:00</committed-date>
  <authored-date>2009-04-02T21:20:45-07:00</authored-date>
  <message>fixing up xhtml mobile doctype helper</message>
  <tree>0ad13d547b17484e5bedab13de3e28b0bbdd76df</tree>
  <committer>
    <name>Brendan G. Lim</name>
    <email>brendan@intridea.com</email>
  </committer>
</commit>
