Class: XHTML

Inherits:
Object
  • Object
show all
Defined in:
lib/xhtml.rb

Instance Method Summary collapse

Constructor Details

#initializeXHTML

Returns a new instance of XHTML.



5
6
7
# File 'lib/xhtml.rb', line 5

def initialize
    @xhtml_cgi_output = ''
end

Instance Method Details

#a(link, desc, options = {}) ⇒ Object



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/xhtml.rb', line 78

def a(link, desc, options = {})
    out = ''
    opts = ['accesskey', 'charset', 'coords', 'hreflang', 'onblur',
            'onfocus', 'rel', 'rev', 'shape', 'tabindex', 'type',
            'class', 'id', 'style', 'title', 'onclick', 'ondblclick',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup']
    if options.nil?
        out << "<a href='#{link}'>#{desc}</a>\n"
    else
        out << "<a href='#{link}'"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{desc}</a>\n"
    end
    return out
end

#abbr(content, options = {}) ⇒ Object



1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
# File 'lib/xhtml.rb', line 1336

def abbr(content, options = {})
   out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'style',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<abbr>#{content}</abbr>\n"
    else
        out << "<abbr"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</abbr>\n"
    end
    return out
end

#acronym(content, options = {}) ⇒ Object



1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
# File 'lib/xhtml.rb', line 1389

def acronym(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'style',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<acronym>#{content}</acronym>\n"
    else
        out << "<acronym"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</acronym>\n"
    end
    return out
end

#address(content, options = {}) ⇒ Object



1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
# File 'lib/xhtml.rb', line 1442

def address(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'style',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<address>#{content}</address>\n"
    else
        out << "<address"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</address>\n"
    end
    return out
end

#area(options = {}) ⇒ Object



1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
# File 'lib/xhtml.rb', line 1495

def area(options = {})
    out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout',
            'alt', 'coords', 'shape', 'accesskey', 'onblur', 'onfocus',
            'nohref', 'href', 'tabindex', 'style']
    if not options.nil?
        out << "<area"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << " />\n"
    end
    return out
end

#b(content, options = {}) ⇒ Object



1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
# File 'lib/xhtml.rb', line 1519

def b(content, options = {})
    out = '<!-- While a valid part of XHTML, it is highly recommended'
    out << " that you use CSS instead of the b element -->\n"
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout',
            'style']
    if options.nil?
        out << "<b>#{content}</b>\n"
    else
        out << "<b"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</b>\n"
    end
    return out
end

#bdo(dir, content, options = {}) ⇒ Object



1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
# File 'lib/xhtml.rb', line 1576

def bdo(dir, content, options = {})
    out = ''
    opts = ['class', 'id', 'title']
    if options.nil?
        out << "<bdo dir='#{dir}'>#{content}</bdo>\n"
    else
        out << "<bdo dir='#{dir}'"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</bdo>\n"
    end
    return out
end

#big(content, options = {}) ⇒ Object



1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
# File 'lib/xhtml.rb', line 1625

def big(content, options = {})
    out = '<!-- While a valid part of XHTML, it is highly recommended'
    out << " that you use CSS instead of the big element -->\n"
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout',
            'style']
    if options.nil?
        out << "<big>#{content}</big>\n"
    else
        out << "<big"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</big>\n"
    end
    return out
end

#blockquote(content, options = {}) ⇒ Object



1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
# File 'lib/xhtml.rb', line 1739

def blockquote(content, options = {})
    out = ''
    opts = ['cite', 'class', 'id', 'title', 'onclick', 'ondblclick',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout',
            'style']
    if options.nil?
        out << "<blockquote>#{content}</blockquote>\n"
    else
        out << "<blockquote"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</blockquote>\n"
    end
    return out
end

#body(content, options = {}) ⇒ Object



49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/xhtml.rb', line 49

def body(content, options = {})
    opts = ['onload', 'onunload', 'class', 'id', 'title', 'onclick',
            'ondblclick', 'onmousedown', 'onmouseup', 'onmouseover',
            'onmousemove', 'onmouseout', 'onkeypress', 'onkeydown',
            'onkeyup', 'style']
    if options.nil?
        @xhtml_cgi_output << "  <body>\n\n"
    else
        @xhtml_cgi_output << "  <body"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    @xhtml_cgi_output << " #{x}='#{z}'"
                else
                    @xhtml_cgi_output << " #{x}='#{y}'"
                end
           end
        end
        @xhtml_cgi_output << ">\n\n"
    end
    @xhtml_cgi_output << "#{content}\n"
    @xhtml_cgi_output << "  </body>\n"
end

#br(num, options = {}) ⇒ Object



1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
# File 'lib/xhtml.rb', line 1794

def br(num, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style']
    num.to_i.times do
        if options.nil?
            out << "<br />\n"
        else
            out << "<br"
            options.each do |x,y|
                x = x.to_s
                if opts.include?("#{x}")
                    if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                        z = y.join(' ')
                        out << " #{x}='#{z}'"
                    else
                        out << " #{x}='#{y}'"
                    end
                end
            end
            out << " />"
        end
    end
end

#button(content, optiosn = {}) ⇒ Object



1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
# File 'lib/xhtml.rb', line 1817

def button(content, optiosn = {})
    out = ''
    opts = ['name', 'type', 'value', 'accessley', 'disabled', 'onblur',
            'onfocus', 'tabindex', 'class', 'id', 'title', 'onclick',
            'ondblclick', 'onkeyup', 'onkeydown', 'onkeypress',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'style']
    if options.nil?
        out << "<button>#{content}</button>\n"
    else
        out << "<button"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</button>\n"
    end
    return out
end

#caption(content, options = {}) ⇒ Object



518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
# File 'lib/xhtml.rb', line 518

def caption(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style', 'onclick', 'ondblclick',
            'onkeyup',  'onkeydown', 'onkeypress', 'onmousedown', 
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<caption>#{content}</caption>\n"
    else
        out << "<caption"
       options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</caption>\n"
    end
    return out
end

#cite(content, options = {}) ⇒ Object



1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
# File 'lib/xhtml.rb', line 1874

def cite(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'onkeyup',
            'onkeydown', 'onkeypress', 'onmousedown', 'onmouseup',
            'onmouseover', 'onmousemove', 'onmouseout', 'style']
    if options.nil?
        out << "<cite>#{content}</cite>\n"
    else
        out << "<cite"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</cite>\n"
    end
    return out
end

#code(content, options = {}) ⇒ Object



1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
# File 'lib/xhtml.rb', line 1927

def code(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'onkeyup',
            'onkeydown', 'onkeypress', 'onmousedown', 'onmouseup',
            'onmouseover', 'onmousemove', 'onmouseout', 'style']
    if options.nil?
        out << "<code>#{content}</code>\n"
    else
        out << "<code"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</code>\n"
    end
    return out
end

#col(options = {}) ⇒ Object



571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
# File 'lib/xhtml.rb', line 571

def col(options = {})
    out = ''
    opts = ['align', 'span', 'valign', 'width', 'char', 'charoff', 'class',
            'id', 'title', 'style', 'onclick', 'ondblclick', 'onkeyup',
            'onkeydown', 'onkeypress', 'onmousedown', 'onmouseup',
            'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<col />\n"
    else
        out << "<col"
       options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << " />\n"
    end
    return out
end

#colgroup(content, options = {}) ⇒ Object



596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
# File 'lib/xhtml.rb', line 596

def colgroup(content, options = {})
    out = ''
    opts = ['align', 'span', 'valign', 'width', 'char', 'charoff', 'class',
            'id', 'title', 'style', 'onclick', 'ondblclick', 'onkeyup',
            'onkeydown', 'onkeypress', 'onmousedown', 'onmouseup',
            'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<colgroup>#{content}</colgroup>\n"
    else
        out << "<colgroup"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</colgroup>\n"
    end
    return out
end

#dd(content, options = {}) ⇒ Object



2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
# File 'lib/xhtml.rb', line 2033

def dd(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'onkeyup',
            'onkeydown', 'onkeypress', 'onmousedown', 'onmouseup',
            'onmouseover', 'onmousemove', 'onmouseout', 'style']
    if options.nil?
        out << "<dd>#{content}</dd>\n"
    else
        out << "<dd"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</dd>\n"
    end
    return out
end

#del(content, options = {}) ⇒ Object



2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
# File 'lib/xhtml.rb', line 2139

def del(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'onkeyup',
            'onkeydown', 'onkeypress', 'onmousedown', 'onmouseup',
            'onmouseover', 'onmousemove', 'onmouseout', 'style', 'cite',
            'datetime']
    if options.nil?
        out << "<del>#{content}</del>\n"
    else
        out << "<del"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</del>\n"
    end
    return out
end

#dfn(content, options = {}) ⇒ Object



2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
# File 'lib/xhtml.rb', line 2194

def dfn(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'onkeyup',
            'onkeydown', 'onkeypress', 'onmousedown', 'onmouseup',
            'onmouseover', 'onmousemove', 'onmouseout', 'style']
    if options.nil?
        out << "<dfn>#{content}</dfn>\n"
    else
        out << "<dfn"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</dfn>\n"
    end
    return out
end

#div(content, options = {}) ⇒ Object



1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
# File 'lib/xhtml.rb', line 1230

def div(content, options = {})
   out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'style',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<div>#{content}</div>\n"
    else
        out << "<div"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</div>\n"
    end
    return out
end

#dl(content, options = {}) ⇒ Object



1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
# File 'lib/xhtml.rb', line 1980

def dl(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'onkeyup',
            'onkeydown', 'onkeypress', 'onmousedown', 'onmouseup',
            'onmouseover', 'onmousemove', 'onmouseout', 'style']
    if options.nil?
        out << "<dl>#{content}</dl>\n"
    else
        out << "<dl"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</dl>\n"
    end
    return out
end

#dt(content, options = {}) ⇒ Object



2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
# File 'lib/xhtml.rb', line 2086

def dt(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'onkeyup',
            'onkeydown', 'onkeypress', 'onmousedown', 'onmouseup',
            'onmouseover', 'onmousemove', 'onmouseout', 'style']
    if options.nil?
        out << "<dt>#{content}</dt>\n"
    else
        out << "<dt"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</dt>\n"
    end
    return out
end

#em(content, options = {}) ⇒ Object



2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
# File 'lib/xhtml.rb', line 2247

def em(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'onkeyup',
            'onkeydown', 'onkeypress', 'onmousedown', 'onmouseup',
            'onmouseover', 'onmousemove', 'onmouseout', 'style']
    if options.nil?
        out << "<em>#{content}</em>\n"
    else
        out << "<em"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</em>\n"
    end
    return out
end

#endObject



74
75
76
77
# File 'lib/xhtml.rb', line 74

def end
    @xhtml_cgi_output << "</html>"
    print @xhtml_cgi_output
end

#end_abbrObject



1384
1385
1386
1387
1388
# File 'lib/xhtml.rb', line 1384

def end_abbr
    out = ''
    out << "</abbr>\n"
    return out
end

#end_acronymObject



1437
1438
1439
1440
1441
# File 'lib/xhtml.rb', line 1437

def end_acronym
    out = ''
    out << "</acronym>\n"
    return out
end

#end_addressObject



1490
1491
1492
1493
1494
# File 'lib/xhtml.rb', line 1490

def end_address
    out = ''
    out << "</address>\n"
    return out
end

#end_bObject



1571
1572
1573
1574
1575
# File 'lib/xhtml.rb', line 1571

def end_b
    out = ''
    out << "</b>\n"
    return out
end

#end_bdoObject



1620
1621
1622
1623
1624
# File 'lib/xhtml.rb', line 1620

def end_bdo
    out = ''
    out << "</bdo>\n"
    return out
end

#end_bigObject



1677
1678
1679
1680
1681
# File 'lib/xhtml.rb', line 1677

def end_big
    out = ''
    out << "</big>\n"
    return out
end

#end_blockquoteObject



1789
1790
1791
1792
1793
# File 'lib/xhtml.rb', line 1789

def end_blockquote
    out = ''
    out << "</blockquote>\n"
    return out
end

#end_buttonObject



1869
1870
1871
1872
1873
# File 'lib/xhtml.rb', line 1869

def end_button
    out = ''
    out << "</button>\n"
    return out
end

#end_captionObject



566
567
568
569
570
# File 'lib/xhtml.rb', line 566

def end_caption
    out = ''
    out << "</caption>\n"
    return out
end

#end_citeObject



1922
1923
1924
1925
1926
# File 'lib/xhtml.rb', line 1922

def end_cite
    out = ''
    out << "</cite>\n"
    return out
end

#end_codeObject



1975
1976
1977
1978
1979
# File 'lib/xhtml.rb', line 1975

def end_code
    out = ''
    out << "</code>\n"
    return out
end

#end_colgroupObject



646
647
648
649
650
# File 'lib/xhtml.rb', line 646

def end_colgroup
    out = ''
    out << "</colgroup>\n"
    return out
end

#end_ddObject



2081
2082
2083
2084
2085
# File 'lib/xhtml.rb', line 2081

def end_dd
    out = ''
    out << "</dd>\n"
    return out
end

#end_delObject



2189
2190
2191
2192
2193
# File 'lib/xhtml.rb', line 2189

def end_del
    out = ''
    out << "</del>\n"
    return out
end

#end_dfnObject



2242
2243
2244
2245
2246
# File 'lib/xhtml.rb', line 2242

def end_dfn
    out = ''
    out << "</dfn>\n"
    return out
end

#end_divObject



1278
1279
1280
1281
1282
# File 'lib/xhtml.rb', line 1278

def end_div
    out = ''
    out << "</div>\n"
    return out
end

#end_dlObject



2028
2029
2030
2031
2032
# File 'lib/xhtml.rb', line 2028

def end_dl
    out = ''
    out << "</dl>\n"
    return out
end

#end_dtObject



2134
2135
2136
2137
2138
# File 'lib/xhtml.rb', line 2134

def end_dt
    out = ''
    out << "</dt>\n"
    return out
end

#end_emObject



2295
2296
2297
2298
2299
# File 'lib/xhtml.rb', line 2295

def end_em
    out = ''
    out << "</em>\n"
    return out
end

#end_fieldsetObject



2348
2349
2350
2351
2352
# File 'lib/xhtml.rb', line 2348

def end_fieldset
    out = ''
    out << "</fieldset>\n"
    return out
end

#end_formObject



2403
2404
2405
2406
2407
# File 'lib/xhtml.rb', line 2403

def end_form
    out = ''
    out << "</form>\n"
    return out
end

#end_h1Object



939
940
941
942
943
# File 'lib/xhtml.rb', line 939

def end_h1
    out = ''
    out << "</h1>\n"
    return out
end

#end_h2Object



944
945
946
947
948
# File 'lib/xhtml.rb', line 944

def end_h2
    out = ''
    out << "</h2>\n"
    return out
end

#end_h3Object



949
950
951
952
953
# File 'lib/xhtml.rb', line 949

def end_h3
    out = ''
    out << "</h3>\n"
    return out
end

#end_h4Object



954
955
956
957
958
# File 'lib/xhtml.rb', line 954

def end_h4
    out = ''
    out << "</h4>\n"
    return out
end

#end_h5Object



959
960
961
962
963
# File 'lib/xhtml.rb', line 959

def end_h5
    out = ''
    out << "</h5>\n"
    return out
end

#end_h6Object



964
965
966
967
968
# File 'lib/xhtml.rb', line 964

def end_h6
    out = ''
    out << "</h6>\n"
    return out
end

#end_iObject



1734
1735
1736
1737
1738
# File 'lib/xhtml.rb', line 1734

def end_i
    out = ''
    out << "</i>\n"
    return out
end

#end_insObject



2487
2488
2489
2490
2491
# File 'lib/xhtml.rb', line 2487

def end_ins
    out = ''
    out << "</ins>\n"
    return out
end

#end_kbdObject



2540
2541
2542
2543
2544
# File 'lib/xhtml.rb', line 2540

def end_kbd
    out = ''
    out << "</kbd>\n"
    return out
end

#end_labelObject



2595
2596
2597
2598
2599
# File 'lib/xhtml.rb', line 2595

def end_label
    out = ''
    out << "</label>\n"
    return out
end

#end_legendObject



2650
2651
2652
2653
2654
# File 'lib/xhtml.rb', line 2650

def end_legend
    out = ''
    out << "</legend>\n"
    return out
end

#end_liObject



1225
1226
1227
1228
1229
# File 'lib/xhtml.rb', line 1225

def end_li
    out = ''
    out << "</li>\n"
    return out
end

#end_mapObject



2703
2704
2705
2706
2707
# File 'lib/xhtml.rb', line 2703

def end_map
    out = ''
    out << "</map>\n"
    return out
end

#end_noscriptObject



2814
2815
2816
2817
2818
# File 'lib/xhtml.rb', line 2814

def end_noscript
    out = ''
    out << "</noscript>\n"
    return out
end

#end_objectObject



2871
2872
2873
2874
2875
# File 'lib/xhtml.rb', line 2871

def end_object
    out = ''
    out << "</object>\n"
    return out
end

#end_ol(options = {}) ⇒ Object



1119
1120
1121
1122
1123
# File 'lib/xhtml.rb', line 1119

def end_ol(options = {})
    out = ''
    out << "</ol>\n"
    return out
end

#end_optgroupObject



2924
2925
2926
2927
2928
# File 'lib/xhtml.rb', line 2924

def end_optgroup
    out = ''
    out << "</optgroup>\n"
    return out
end

#end_optionObject



2979
2980
2981
2982
2983
# File 'lib/xhtml.rb', line 2979

def end_option
    out = ''
    out << "</option>\n"
    return out
end

#end_pObject



1066
1067
1068
1069
1070
# File 'lib/xhtml.rb', line 1066

def end_p
    out = ''
    out << "</p>\n"
    return out
end

#end_preObject



3056
3057
3058
3059
3060
# File 'lib/xhtml.rb', line 3056

def end_pre
    out = ''
    out << "</pre>\n"
    return out
end

#end_qObject



3109
3110
3111
3112
3113
# File 'lib/xhtml.rb', line 3109

def end_q
    out = ''
    out << "</q>\n"
    return out
end

#end_sampObject



3162
3163
3164
3165
3166
# File 'lib/xhtml.rb', line 3162

def end_samp
    out = ''
    out << "</samp>\n"
    return out
end

#end_scriptObject



2760
2761
2762
2763
2764
2765
# File 'lib/xhtml.rb', line 2760

def end_script
    out = ''
    out << "    //]]>\n"
    out << "</script>\n"
    return out
end

#end_selectObject



3219
3220
3221
3222
3223
# File 'lib/xhtml.rb', line 3219

def end_select
    out = ''
    out << "</select>\n"
    return out
end

#end_smallObject



3274
3275
3276
3277
3278
# File 'lib/xhtml.rb', line 3274

def end_small
    out = ''
    out << "</small>\n"
    return out
end

#end_spanObject



1331
1332
1333
1334
1335
# File 'lib/xhtml.rb', line 1331

def end_span
    out = ''
    out << "</span>\n"
    return out
end

#end_strongObject



3329
3330
3331
3332
3333
# File 'lib/xhtml.rb', line 3329

def end_strong
    out = ''
    out << "</small>\n"
    return out
end

#end_styleObject



1013
1014
1015
1016
1017
# File 'lib/xhtml.rb', line 1013

def end_style
    out = ''
    out << "\n</style>\n"
    return out
end

#end_subObject



3382
3383
3384
3385
3386
# File 'lib/xhtml.rb', line 3382

def end_sub
    out = ''
    out << "</sub>\n"
    return out
end

#end_supObject



3435
3436
3437
3438
3439
# File 'lib/xhtml.rb', line 3435

def end_sup
    out = ''
    out << "</sup>\n"
    return out
end

#end_tableObject



181
182
183
184
185
# File 'lib/xhtml.rb', line 181

def end_table
    out = ''
    out << "</table>\n"
    return out
end

#end_tbodyObject



458
459
460
461
462
# File 'lib/xhtml.rb', line 458

def end_tbody
    out = ''
    out << "</tbody>\n"
    return out
end

#end_tdObject



291
292
293
294
295
# File 'lib/xhtml.rb', line 291

def end_td
    out = ''
    out << "</tr>\n"
    return out
end

#end_textareaObject



3492
3493
3494
3495
3496
# File 'lib/xhtml.rb', line 3492

def end_textarea
    out = ''
    out << "</textarea>\n"
    return out
end

#end_tfootObject



513
514
515
516
517
# File 'lib/xhtml.rb', line 513

def end_tfoot
    out = ''
    out << "</tfoot>\n"
    return out
end

#end_thObject



348
349
350
351
352
# File 'lib/xhtml.rb', line 348

def end_th
    out = ''
    out << "</th>\n"
    return out
end

#end_theadObject



403
404
405
406
407
# File 'lib/xhtml.rb', line 403

def end_thead
    out = ''
    out << "</thead>\n"
    return out
end

#end_trObject



236
237
238
239
240
# File 'lib/xhtml.rb', line 236

def end_tr
    out = ''
    out << "</tr>\n"
    return out
end

#end_ttObject



3550
3551
3552
3553
3554
# File 'lib/xhtml.rb', line 3550

def end_tt
    out = ''
    out << "</tt>\n"
    return out
end

#end_ul(options = {}) ⇒ Object



1172
1173
1174
1175
1176
# File 'lib/xhtml.rb', line 1172

def end_ul(options = {})
    out = ''
    out << "</ol>\n"
    return out
end

#end_varObject



3603
3604
3605
3606
# File 'lib/xhtml.rb', line 3603

def end_var
    out = ''
    return out
end

#fieldset(content, options = {}) ⇒ Object



2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
# File 'lib/xhtml.rb', line 2300

def fieldset(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'onkeyup',
            'onkeydown', 'onkeypress', 'onmousedown', 'onmouseup',
            'onmouseover', 'onmousfieldsetove', 'onmouseout', 'style']
    if options.nil?
        out << "<fieldset>#{content}</fieldset>\n"
    else
        out << "<fieldset"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</fieldset>\n"
    end
    return out
end

#form(action, method, content, options = {}) ⇒ Object



2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
# File 'lib/xhtml.rb', line 2353

def form(action, method, content, options = {})
    out = ''
    opts = ['onmouseout', 'accept', 'accept-charsets', 'enctype',
            'onreset', 'onsumit', 'class', 'id', 'title', 'style',
            'onclick', 'ondblclick', 'onkeyup', 'onkeydown', 'onkeypress',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousfieldsetove']
    if options.nil?
        out << "<form action='#{action}' method='#{method}'>#{content}</form>\n"
    else
        out << "<form action='#{action}' method='#{method}'"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</form>\n"
    end
    return out
end

#h1(content, options = {}) ⇒ Object



651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
# File 'lib/xhtml.rb', line 651

def h1(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style', 'onclick', 'ondblclick',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<h1>#{content}</h1>\n"
    else
        out << "<h1"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</h1>\n";
    end
    return out
end

#h2(content, options = {}) ⇒ Object



675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
# File 'lib/xhtml.rb', line 675

def h2(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style', 'onclick', 'ondblclick',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<h2>#{content}</h2>\n"
    else
        out << "<h2"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</h2>\n";
    end
    return out
end

#h3(content, options = {}) ⇒ Object



699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
# File 'lib/xhtml.rb', line 699

def h3(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style', 'onclick', 'ondblclick',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<h3>#{content}</h3>\n"
    else
        out << "<h3"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</h3>\n";
    end
    return out
end

#h4(content, options = {}) ⇒ Object



723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
# File 'lib/xhtml.rb', line 723

def h4(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style', 'onclick', 'ondblclick',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<h4>#{content}</h1>\n"
    else
        out << "<h4"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</h4>\n";
    end
    return out
end

#h5(content, options = {}) ⇒ Object



747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
# File 'lib/xhtml.rb', line 747

def h5(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style', 'onclick', 'ondblclick',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<h5>#{content}</h5>\n"
    else
        out << "<h5"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</h5>\n";
    end
    return out
end

#h6(content, options = {}) ⇒ Object



771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
# File 'lib/xhtml.rb', line 771

def h6(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style', 'onclick', 'ondblclick',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<h6>#{content}</h6>\n"
    else
        out << "<h6"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</h6>\n";
    end
    return out
end

#header(options = {}) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/xhtml.rb', line 8

def header (options = {})
    unless not options[:charset].nil?
        options[:charset] = 'UTF-8'
    end
    unless not options[:content].nil?
        options[:content] = 'text/html;charset=UTF-8'
    end
    @xhtml_cgi_output << '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"'
    @xhtml_cgi_output << "\n"
    @xhtml_cgi_output << '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
    @xhtml_cgi_output << "\n<html xmlns='http://www.w3.org/1999/xhtml'>\n"
    @xhtml_cgi_output << "  <head>\n"
    unless options[:base].nil?
        @xhtml_cgi_output << "    <base href='#{options[:base]}' />\n"
    end
    unless options[:style].nil?
        options[:style].each do |x|
            @xhtml_cgi_output << "    <link rel='stylesheet' type='text/css' href='#{x}' />\n"
        end
    end
    unless options[:script].nil?
        options[:script].each do |x|
            @xhtml_cgi_output << "    <script src='#{x}' type='text/javascript'></script>\n"
        end
    end
    unless options[:contact].nil?
        @xhtml_cgi_output << "    <link rev='made' href='mailto:#{options[:contact]}' />\n"
    end
    unless options[:keywords].nil?
        @xhtml_cgi_output << "    <meta name='keywords' content='#{options[:keywords]}' />\n"
    end
    unless options[:author].nil?
        @xhtml_cgi_output << "    <meta name='author' content='#{options[:author]}' />\n"
    end
    unless options[:description].nil?
        @xhtml_cgi_output << "    <meta name='description' content='#{options[:description]}' />\n"
    end
    @xhtml_cgi_output << "    <meta name='charset' content='#{options[:charset]}' />\n"
    @xhtml_cgi_output << "    <meta http-equiv='Content-type' content='#{options[:content]}' />\n"
    @xhtml_cgi_output << "  </head>\n"
end

#i(content, options = {}) ⇒ Object



1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
# File 'lib/xhtml.rb', line 1682

def i(content, options = {})
    out = '<!-- While a valid part of XHTML, it is highly recommended'
    out << " that you use CSS instead of the i element -->\n"
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout',
            'style']
    if options.nil?
        out << "<i>#{content}</i>\n"
    else
        out << "<i"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</i>\n"
    end
    return out
end

#img(src, options = {}) ⇒ Object



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/xhtml.rb', line 104

def img(src, options = {})
    out = '';
    opts = ['alt', 'height', 'width', 'ismap', 'longdesc', 'usemap',
            'class', 'id', 'title', 'style', 'onclick', 'ondblclick',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup']
    if options.nil?
        out << "<img src='#{src}' />"
    else
        out << "<img src='#{src}'"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << " />\n"
    end
    return out
end

#input(type, options = {}) ⇒ Object



2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
# File 'lib/xhtml.rb', line 2408

def input(type, options = {})
    out = ''
    opts = ['alt', 'checked', 'maxlength', 'name', 'size', 'value',
            'accept', 'accesskey', 'disabled', 'ismap', 'onblur',
            'onchange', 'onfocus', 'onselect', 'readonly', 'src',
            'tabindex', 'usemap', 'class', 'id', 'title', 'style',
            'onclick', 'ondblclick', 'onkeyup', 'onkeydown', 'onkeypress',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousfieldsetove']
    if options.nil?
        out << "<input type='#{type}' />\n"
    else
        out << "<input type='#{type}'"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << " />\n"
    end
    return out
end

#ins(content, options = {}) ⇒ Object



2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
# File 'lib/xhtml.rb', line 2435

def ins(content, options = {})
    out = ''
    opts = ['cite', 'datetime', 'class', 'id', 'title', 'style',
            'onchange', 'onfocus', 'onselect', 'readonly', 'src',
            'tabindex', 'usemap', 'class', 'id', 'title', 'style',
            'onclick', 'ondblclick', 'onkeyup', 'onkeydown', 'onkeypress',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousfieldsetove']
    if options.nil?
        out << "<ins>#{content}</ins>\n"
    else
        out << "<ins"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</ins>\n"
    end
    return out
end

#kbd(content, options = {}) ⇒ Object



2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
# File 'lib/xhtml.rb', line 2492

def kbd(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style',
            'onclick', 'ondblclick', 'onkeyup', 'onkeydown', 'onkeypress',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousfieldsetove']
    if options.nil?
        out << "<kbd>#{content}</kbd>\n"
    else
        out << "<kbd"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</kbd>\n"
    end
    return out
end

#label(content, options = {}) ⇒ Object



2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
# File 'lib/xhtml.rb', line 2545

def label(content, options = {})
    out = ''
    opts = ['for', 'accesskey', 'onblur', 'onfocus', 'class', 'id', 'title',
            'onclick', 'ondblclick', 'onkeyup', 'onkeydown', 'onkeypress',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousfieldsetove',
             'style']
    if options.nil?
        out << "<label>#{content}</label>\n"
    else
        out << "<label"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</label>\n"
    end
    return out
end

#legend(content, options = {}) ⇒ Object



2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
# File 'lib/xhtml.rb', line 2600

def legend(content, options = {})
    out = ''
    opts = ['accesskey', 'onblur', 'onfocus', 'class', 'id', 'title',
            'onclick', 'ondblclick', 'onkeyup', 'onkeydown', 'onkeypress',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousfieldsetove',
             'style']
    if options.nil?
        out << "<lengend>#{content}</legend>\n"
    else
        out << "<legend"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</legend>\n"
    end
    return out
end

#li(content, options = {}) ⇒ Object



1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
# File 'lib/xhtml.rb', line 1177

def li(content, options = {})
   out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'style',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<li>#{content}</li>\n"
    else
        out << "<li"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</li>\n"
    end
    return out
end

#Map(content, options = {}) ⇒ Object



2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
# File 'lib/xhtml.rb', line 2655

def Map(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style', 'onmouseover',
            'onclick', 'ondblclick', 'onkeyup', 'onkeydown', 'onkeypress',
            'onmousedown', 'onmouseup', 'onmousfieldsetove']
    if options.nil?
        out << "<map>#{content}</map>\n"
    else
        out << "<map"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</map>\n"
    end
    return out
end

#noscript(content, options = {}) ⇒ Object



2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
# File 'lib/xhtml.rb', line 2766

def noscript(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style', 'onmousedown', 'onmouseup',
            'onmouseover', 'onmousfieldsetove', 'onclick', 'ondblclick',
            'onkeyup', 'onkeydown', 'onkeypress']
    if options.nil?
        out << "<noscript>#{content}</noscript>\n"
    else
        out << "<noscript"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</noscript>\n"
    end
    return out
end

#object(content, options = {}) ⇒ Object



2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
# File 'lib/xhtml.rb', line 2819

def object(content, options = {})
    out = ''
    opts = ['classid', 'codebase', 'heiht', 'name', 'type', 'width',
            'archive', 'codetype', 'data', 'declare', 'standby', 'tabindex',
            'usemap', 'class', 'id', 'title', 'onclick', 'ondblclick',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup', 'style']
    if options.nil?
        out << "<object>#{content}</object>\n"
    else
        out << "<object"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</object>\n"
    end
    return out
end

#ol(content, options = {}) ⇒ Object



1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
# File 'lib/xhtml.rb', line 1071

def ol(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'style',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<ol>#{content}</ol>\n"
    else
        out << "<ol"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</ol>\n"
    end
    return out
end

#optgroup(content, options = {}) ⇒ Object



2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
# File 'lib/xhtml.rb', line 2876

def optgroup(content, options = {})
    out = ''
    opts = ['label', 'class', 'id', 'title', 'style', 'onclick', 'ondblclick',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup']
    if options.nil?
        out << "<optgroup>#{content}</optgroup>\n"
    else
        out << "<optgroup"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</optgroup>\n"
    end
    return out
end

#option(content, options = {}) ⇒ Object



2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
# File 'lib/xhtml.rb', line 2929

def option(content, options = {})
    out = ''
    opts = ['selected', 'value', 'disabled', 'label', 'class', 'id',
            'title', 'style', 'onclick', 'ondblclick', 'onkeyup',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'onkeypress', 'onkeydown']
    if options.nil?
        out << "<option>#{content}</option>\n"
    else
        out << "<option"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</option>\n"
    end
    return out
end

#p(content, options = {}) ⇒ Object



1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
# File 'lib/xhtml.rb', line 1018

def p(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'style',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<p>\n#{content}\n</p>\n"
    else
        out << "<p"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n#{content}\n</p>\n"
    end
    return out
end

#param(options = {}) ⇒ Object



2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
# File 'lib/xhtml.rb', line 2984

def param(options = {})
    out = ''
    opts = ['name', 'value', 'id', 'type', 'valuetype']
    if options.nil?
        out << ""
    else
        out << "<param"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << " />\n"
    end
    return out
end

#pre(content, options = {}) ⇒ Object



3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
# File 'lib/xhtml.rb', line 3006

def pre(content, options = {})
    out = '<!-- While a valid part of XHTML, it is highly recommended'
    out << " that you use CSS instead of the b element -->\n"
    opts = ['class', 'id', 'title', 'style', 'onclick', 'ondblclick',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup']
    if options.nil?
        out << "<pre>#{content}</pre>\n"
    else
        out << "<pre"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</pre>\n"
    end
    return out
end

#q(content, options = {}) ⇒ Object



3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
# File 'lib/xhtml.rb', line 3061

def q(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style', 'cite', 'onclick', 'ondblclick',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup']
    if options.nil?
        out << "<q>#{content}</q>\n"
    else
        out << "<q"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</q>\n"
    end
    return out
end

#samp(content, options = {}) ⇒ Object



3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
# File 'lib/xhtml.rb', line 3114

def samp(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style','onclick', 'ondblclick',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup']
    if options.nil?
        out << "<samp>#{content}</samp>\n"
    else
        out << "<samp"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</samp>\n"
    end
    return out
end

#script(content, options = {}) ⇒ Object



2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
# File 'lib/xhtml.rb', line 2708

def script(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style', 'src', 'type', 'charset',
            'defer', 'style', 'onmousedown', 'onmouseup', 'onmouseover',
            'onmousfieldsetove', 'onclick', 'ondblclick', 'onkeyup',
            'onkeydown', 'onkeypress']
    if options.nil?
        out << "<script>\n    //<![CDATA[\n#{content}\n    //]]>\n</script>\n"
    else
        out << "<script"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
        out << "    //<![CDATA[\n#{content}\n    //]]>\n</script>\n"
    end
    return out
end

#select(content, options = {}) ⇒ Object



3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
# File 'lib/xhtml.rb', line 3167

def select(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style','onclick', 'ondblclick',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup', 'name',
            'multiple', 'size', 'disabled', 'onblur', 'onfocus',
            'onchange', 'tabindex']
    if options.nil?
        out << "<select>#{content}</select>\n"
    else
        out << "<select"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</select>\n"
    end
    return out
end

#small(content, options = {}) ⇒ Object



3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
# File 'lib/xhtml.rb', line 3224

def small(content, options = {})
    out = '<!-- While a valid part of XHTML, it is highly recommended'
    out << " that you use CSS instead of the small element -->\n"
    opts = ['class', 'id', 'title', 'style','onclick', 'ondblclick',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup']
    if options.nil?
        out << "<small>#{content}</small>\n"
    else
        out << "<small"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</small>\n"
    end
    return out
end

#span(content, options = {}) ⇒ Object



1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
# File 'lib/xhtml.rb', line 1283

def span(content, options = {})
   out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'style',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<span>#{content}</span>\n"
    else
        out << "<span"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</span>"
    end
    return out
end

#start_abbr(options = {}) ⇒ Object



1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
# File 'lib/xhtml.rb', line 1360

def start_abbr(options = {})
   out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'style',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<abbr>\n"
    else
        out << "<abbr"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_acronym(options = {}) ⇒ Object



1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
# File 'lib/xhtml.rb', line 1413

def start_acronym(options = {})
    out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'style',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<acronym>\n"
    else
        out << "<acronym"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_address(options = {}) ⇒ Object



1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
# File 'lib/xhtml.rb', line 1466

def start_address(options = {})
    out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'style',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<address>\n"
    else
        out << "<address"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_b(options = {}) ⇒ Object



1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
# File 'lib/xhtml.rb', line 1545

def start_b(options = {})
    out = '<!-- While a valid part of XHTML, it is highly recommended'
    out << " that you use CSS instead of the b element -->\n"
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout',
            'style']
    if options.nil?
        out << "<b>\n"
    else
        out << "<b"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_bdo(dir, options = {}) ⇒ Object



1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
# File 'lib/xhtml.rb', line 1598

def start_bdo(dir, options = {})
    out = ''
    opts = ['class', 'id', 'title']
    if options.nil?
        out << "<bdo>\n"
    else
        out << "<bdo"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_big(options = {}) ⇒ Object



1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
# File 'lib/xhtml.rb', line 1651

def start_big(options = {})
    out = '<!-- While a valid part of XHTML, it is highly recommended'
    out << " that you use CSS instead of the big element -->\n"
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout',
            'style']
    if options.nil?
        out << "<big>\n"
    else
        out << "<big"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_blockquote(options = {}) ⇒ Object



1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
# File 'lib/xhtml.rb', line 1764

def start_blockquote(options = {})
    out = ''
    opts = ['cite', 'class', 'id', 'title', 'onclick', 'ondblclick',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout',
            'style']
    if options.nil?
        out << "<blockquote>\n"
    else
        out << "<blockquote"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_button(options = {}) ⇒ Object



1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
# File 'lib/xhtml.rb', line 1843

def start_button(options = {})
    out = ''
    opts = ['name', 'type', 'value', 'accessley', 'disabled', 'onblur',
            'onfocus', 'tabindex', 'class', 'id', 'title', 'onclick',
            'ondblclick', 'onkeyup', 'onkeydown', 'onkeypress',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'style']
    if options.nil?
        out << "<button>\n"
    else
        out << "<button"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_caption(options = {}) ⇒ Object



542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
# File 'lib/xhtml.rb', line 542

def start_caption(options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style', 'onclick', 'ondblclick',
            'onkeyup',  'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<caption>\n"
    else
        out << "<caption"
       options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_cite(options = {}) ⇒ Object



1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
# File 'lib/xhtml.rb', line 1898

def start_cite(options = {})
    out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'onkeyup',
            'onkeydown', 'onkeypress', 'onmousedown', 'onmouseup',
            'onmouseover', 'onmousemove', 'onmouseout', 'style']
    if options.nil?
        out << "<cite>\n"
    else
        out << "<cite"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_code(options = {}) ⇒ Object



1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
# File 'lib/xhtml.rb', line 1951

def start_code(options = {})
    out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'onkeyup',
            'onkeydown', 'onkeypress', 'onmousedown', 'onmouseup',
            'onmouseover', 'onmousemove', 'onmouseout', 'style']
    if options.nil?
        out << "<code>\n"
    else
        out << "<code"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_colgroup(options = {}) ⇒ Object



621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
# File 'lib/xhtml.rb', line 621

def start_colgroup(options = {})
    out = ''
    opts = ['align', 'span', 'valign', 'width', 'char', 'charoff', 'class',
            'id', 'title', 'style', 'onclick', 'ondblclick', 'onkeyup',
            'onkeydown', 'onkeypress', 'onmousedown', 'onmouseup',
            'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<colgroup>\n"
    else
        out << "<colgroup"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_dd(options = {}) ⇒ Object



2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
# File 'lib/xhtml.rb', line 2057

def start_dd(options = {})
    out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'onkeyup',
            'onkeydown', 'onkeypress', 'onmousedown', 'onmouseup',
            'onmouseover', 'onmousemove', 'onmouseout', 'style']
    if options.nil?
        out << "<dd>\n"
    else
        out << "<dd"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_del(options = {}) ⇒ Object



2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
# File 'lib/xhtml.rb', line 2164

def start_del(options = {})
    out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'onkeyup',
            'onkeydown', 'onkeypress', 'onmousedown', 'onmouseup',
            'onmouseover', 'onmousemove', 'onmouseout', 'style', 'cite',
            'datetime']
    if options.nil?
        out << "<del>\n"
    else
        out << "<del"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_dfn(options = {}) ⇒ Object



2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
# File 'lib/xhtml.rb', line 2218

def start_dfn(options = {})
    out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'onkeyup',
            'onkeydown', 'onkeypress', 'onmousedown', 'onmouseup',
            'onmouseover', 'onmousemove', 'onmouseout', 'style']
    if options.nil?
        out << "<dfn>\n"
    else
        out << "<dfn"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_div(options = {}) ⇒ Object



1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
# File 'lib/xhtml.rb', line 1254

def start_div(options = {})
   out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'style',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<div>\n"
    else
        out << "<div"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">"
    end
    return out
end

#start_dl(options = {}) ⇒ Object



2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
# File 'lib/xhtml.rb', line 2004

def start_dl(options = {})
    out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'onkeyup',
            'onkeydown', 'onkeypress', 'onmousedown', 'onmouseup',
            'onmouseover', 'onmousemove', 'onmouseout', 'style']
    if options.nil?
        out << "<dl>\n"
    else
        out << "<dl"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_dt(options = {}) ⇒ Object



2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
# File 'lib/xhtml.rb', line 2110

def start_dt(options = {})
    out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'onkeyup',
            'onkeydown', 'onkeypress', 'onmousedown', 'onmouseup',
            'onmouseover', 'onmousemove', 'onmouseout', 'style']
    if options.nil?
        out << "<dt>\n"
    else
        out << "<dt"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_em(options = {}) ⇒ Object



2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
# File 'lib/xhtml.rb', line 2271

def start_em(options = {})
    out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'onkeyup',
            'onkeydown', 'onkeypress', 'onmousedown', 'onmouseup',
            'onmouseover', 'onmousemove', 'onmouseout', 'style']
    if options.nil?
        out << "<em>\n"
    else
        out << "<em"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_fieldset(options = {}) ⇒ Object



2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
# File 'lib/xhtml.rb', line 2324

def start_fieldset(options = {})
    out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'onkeyup',
            'onkeydown', 'onkeypress', 'onmousedown', 'onmouseup',
            'onmouseover', 'onmousfieldsetove', 'onmouseout', 'style']
    if options.nil?
        out << "<fieldset>\n"
    else
        out << "<fieldset"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_form(action, method, options = {}) ⇒ Object



2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
# File 'lib/xhtml.rb', line 2378

def start_form(action, method, options = {})
    out = ''
    opts = ['onmouseout', 'accept', 'accept-charsets', 'enctype', 
            'onreset', 'onsumit', 'class', 'id', 'title', 'style', 
            'onclick', 'ondblclick', 'onkeyup', 'onkeydown', 'onkeypress', 
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousfieldsetove']
    if options.nil?
        out << "<form action='#{action}' method='#{method}'>\n"
    else
        out << "<form action='#{action}' method='#{method}'"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_h1(content, options = {}) ⇒ Object



795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
# File 'lib/xhtml.rb', line 795

def start_h1(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style', 'onclick', 'ondblclick',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<h1>\n"
    else
        out << "<h1"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n";
    end
    return out
end

#start_h2(content, options = {}) ⇒ Object



819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
# File 'lib/xhtml.rb', line 819

def start_h2(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style', 'onclick', 'ondblclick',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<h2>\n"
    else
        out << "<h2"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n";
    end
    return out
end

#start_h3(content, options = {}) ⇒ Object



843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
# File 'lib/xhtml.rb', line 843

def start_h3(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style', 'onclick', 'ondblclick',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<h3>\n"
    else
        out << "<h3"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n";
    end
    return out
end

#start_h4(content, options = {}) ⇒ Object



867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
# File 'lib/xhtml.rb', line 867

def start_h4(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style', 'onclick', 'ondblclick',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<h4>\n"
    else
        out << "<h4"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n";
    end
    return out
end

#start_h5(content, options = {}) ⇒ Object



891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
# File 'lib/xhtml.rb', line 891

def start_h5(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style', 'onclick', 'ondblclick',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<h5>\n"
    else
        out << "<h5"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n";
    end
    return out
end

#start_h6(options = {}) ⇒ Object



915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
# File 'lib/xhtml.rb', line 915

def start_h6(options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style', 'onclick', 'ondblclick',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<h6>\n"
    else
        out << "<h6"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n";
    end
    return out
end

#start_i(options = {}) ⇒ Object



1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
# File 'lib/xhtml.rb', line 1708

def start_i(options = {})
    out = '<!-- While a valid part of XHTML, it is highly recommended'
    out << " that you use CSS instead of the i element -->\n"
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout',
            'style']
    if options.nil?
        out << "<i>\n"
    else
        out << "<i"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_ins(options = {}) ⇒ Object



2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
# File 'lib/xhtml.rb', line 2461

def start_ins(options = {})
    out = ''
    opts = ['cite', 'datetime', 'class', 'id', 'title', 'style', 
            'onchange', 'onfocus', 'onselect', 'readonly', 'src',
            'tabindex', 'usemap', 'class', 'id', 'title', 'style',
            'onclick', 'ondblclick', 'onkeyup', 'onkeydown', 'onkeypress',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousfieldsetove']
    if options.nil?
        out << "<ins>\n"
    else
        out << "<ins"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_kbd(options = {}) ⇒ Object



2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
# File 'lib/xhtml.rb', line 2516

def start_kbd(options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style',
            'onclick', 'ondblclick', 'onkeyup', 'onkeydown', 'onkeypress',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousfieldsetove']
    if options.nil?
        out << "<kbd>\n"
    else
        out << "<kbd"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_label(options = {}) ⇒ Object



2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
# File 'lib/xhtml.rb', line 2570

def start_label(options = {})
    out = ''
    opts = ['for', 'accesskey', 'onblur', 'onfocus', 'class', 'id', 'title',
            'onclick', 'ondblclick', 'onkeyup', 'onkeydown', 'onkeypress',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousfieldsetove',
             'style']
    if options.nil?
        out << "<label>\n"
    else
        out << "<label"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_legend(options = {}) ⇒ Object



2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
# File 'lib/xhtml.rb', line 2625

def start_legend(options = {})
    out = ''
    opts = ['accesskey', 'onblur', 'onfocus', 'class', 'id', 'title',
            'onclick', 'ondblclick', 'onkeyup', 'onkeydown', 'onkeypress',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousfieldsetove',
             'style']
    if options.nil?
        out << "<lengend>\n"
    else
        out << "<legend"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_li(options = {}) ⇒ Object



1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
# File 'lib/xhtml.rb', line 1201

def start_li(options = {})
   out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'style',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<li>\n"
    else
        out << "<li"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_map(options = {}) ⇒ Object



2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
# File 'lib/xhtml.rb', line 2679

def start_map(options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style', 'onmouseover',
            'onclick', 'ondblclick', 'onkeyup', 'onkeydown', 'onkeypress',
            'onmousedown', 'onmouseup', 'onmousfieldsetove']
    if options.nil?
        out << "<map>\n"
    else
        out << "<map"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_noscript(options = {}) ⇒ Object



2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
# File 'lib/xhtml.rb', line 2790

def start_noscript(options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style', 'onmousedown', 'onmouseup',
            'onmouseover', 'onmousfieldsetove', 'onclick', 'ondblclick',
            'onkeyup', 'onkeydown', 'onkeypress']
    if options.nil?
        out << "<noscript>\n"
    else
        out << "<noscript"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_object(options = {}) ⇒ Object



2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
# File 'lib/xhtml.rb', line 2845

def start_object(options = {})
    out = ''
    opts = ['classid', 'codebase', 'heiht', 'name', 'type', 'width',
            'archive', 'codetype', 'data', 'declare', 'standby', 'tabindex',
            'usemap', 'class', 'id', 'title', 'onclick', 'ondblclick',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove', 
            'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup', 'style']
    if options.nil?
        out << "<object>\n"
    else
        out << "<object"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_ol(options = {}) ⇒ Object



1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
# File 'lib/xhtml.rb', line 1095

def start_ol(options = {})
    out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'style',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<ol>\n"
    else
        out << "<ol"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_optgroup(options = {}) ⇒ Object



2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
# File 'lib/xhtml.rb', line 2900

def start_optgroup(options = {})
    out = ''
    opts = ['label', 'class', 'id', 'title', 'style', 'onclick', 'ondblclick',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup']
    if options.nil?
        out << "<optgroup>\n"
    else
        out << "<optgroup"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_option(options = {}) ⇒ Object



2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
# File 'lib/xhtml.rb', line 2954

def start_option(options = {})
    out = ''
    opts = ['selected', 'value', 'disabled', 'label', 'class', 'id', 
            'title', 'style', 'onclick', 'ondblclick', 'onkeyup',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'onkeypress', 'onkeydown']
    if options.nil?
        out << "<option>\n"
    else
        out << "<option"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_p(optioons = {}) ⇒ Object



1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
# File 'lib/xhtml.rb', line 1042

def start_p(optioons = {})
    out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'style',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<p>\n"
    else
        out << "<p"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_pre(options = {}) ⇒ Object



3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
# File 'lib/xhtml.rb', line 3031

def start_pre(options = {})
    out = '<!-- While a valid part of XHTML, it is highly recommended'
    out << " that you use CSS instead of the b element -->\n"
    opts = ['class', 'id', 'title', 'style', 'onclick', 'ondblclick',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup']
    if options.nil?
        out << "<pre>\n"
    else
        out << "<pre"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_q(options = {}) ⇒ Object



3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
# File 'lib/xhtml.rb', line 3085

def start_q(options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style', 'cite', 'onclick', 'ondblclick',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup']
    if options.nil?
        out << "<q>\n"
    else
        out << "<q"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_samp(options = {}) ⇒ Object



3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
# File 'lib/xhtml.rb', line 3138

def start_samp(options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style','onclick', 'ondblclick',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup']
    if options.nil?
        out << "<samp>\n"
    else
        out << "<samp"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_script(options = {}) ⇒ Object



2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
# File 'lib/xhtml.rb', line 2734

def start_script(options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style', 'src', 'type', 'charset',
            'defer', 'style', 'onmousedown', 'onmouseup', 'onmouseover',
            'onmousfieldsetove', 'onclick', 'ondblclick', 'onkeyup', 
            'onkeydown', 'onkeypress']
    if options.nil?
        out << "<script>\n"
    else
        out << "<script"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
        out << "    //<![CDATA[\n"
    end
    return out
end

#start_select(options = {}) ⇒ Object



3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
# File 'lib/xhtml.rb', line 3193

def start_select(options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style','onclick', 'ondblclick',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup', 'name',
            'multiple', 'size', 'disabled', 'onblur', 'onfocus', 
            'onchange', 'tabindex']
    if options.nil?
        out << "<select>\n"
    else
        out << "<select"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_small(options = {}) ⇒ Object



3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
# File 'lib/xhtml.rb', line 3249

def start_small(options = {})
    out = '<!-- While a valid part of XHTML, it is highly recommended'
    out << " that you use CSS instead of the small element -->\n"
    opts = ['class', 'id', 'title', 'style','onclick', 'ondblclick',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup']
    if options.nil?
        out << "<small>\n"
    else
        out << "<small"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_span(options = {}) ⇒ Object



1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
# File 'lib/xhtml.rb', line 1307

def start_span(options = {})
   out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'style',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<span>\n"
    else
        out << "<span"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">"
    end
    return out
end

#start_strong(options = {}) ⇒ Object



3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
# File 'lib/xhtml.rb', line 3304

def start_strong(options = {})
    out = '<!-- While a valid part of XHTML, it is highly recommended'
    out << " that you use CSS instead of the strong element -->\n"
    opts = ['class', 'id', 'title', 'style','onclick', 'ondblclick',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup']
    if options.nil?
        out << "<strong>\n"
    else
        out << "<strong"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_style(options = {}) ⇒ Object



991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
# File 'lib/xhtml.rb', line 991

def start_style(options = {})
    out = ''
    opts = ['media', 'title', 'type']
    if options.nil?
        out << "<style>\n"
    else
        out << "<style"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_sub(options = {}) ⇒ Object



3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
# File 'lib/xhtml.rb', line 3358

def start_sub(options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style','onclick', 'ondblclick',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup']
    if options.nil?
        out << "<sub>\n"
    else
        out << "<sub"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_sup(options = {}) ⇒ Object



3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
# File 'lib/xhtml.rb', line 3411

def start_sup(options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style','onclick', 'ondblclick',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup']
    if options.nil?
        out << "<sup>\n"
    else
        out << "<sup"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_table(options = {}) ⇒ Object



155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# File 'lib/xhtml.rb', line 155

def start_table(options = {})
    out = '';
    opts = ['border', 'cellpadding', 'cellspacing', 'summary', 'width',
            'frame', 'rules', 'class', 'id', 'title', 'style', 'onclick',
            'ondblclick', 'onkeyup',  'onkeydown', 'onkeypress',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout']
    if options.nil?
        out << "<table>\n"
    else
        out << "<table"
       options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_tbody(options = {}) ⇒ Object



433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
# File 'lib/xhtml.rb', line 433

def start_tbody(options = {})
    out = '';
    opts = ['align', 'valign', 'char', 'charoff', 'class', 'id', 'title',
            'style', 'onclick', 'ondblclick', 'onkeyup',  'onkeydown',
            'onkeypress', 'onmousedown', 'onmouseup', 'onmouseover',
            'onmousemove', 'onmouseout']
    if options.nil?
        out << "<tbody>\n"
    else
        out << "<tbody"
       options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_td(options = {}) ⇒ Object



266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
# File 'lib/xhtml.rb', line 266

def start_td(options = {})
    out = '';
    opts = ['align', 'colspan', 'headers', 'rowspan', 'valign', 'axis',
            'char', 'class', 'id', 'title', 'id', 'onclick', 'ondblclick',
            'onkeyup',  'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<td>\n"
    else
        out << "<td"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_textarea(options = {}) ⇒ Object



3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
# File 'lib/xhtml.rb', line 3466

def start_textarea(options = {})
    out = ''
    opts = ['cols', 'name', 'rows', 'accesskey', 'disabled', 'onblur',
            'onchange', 'onfocus', 'onselect', 'readonly', 'tabindex',
            'class', 'id', 'title', 'style','onclick', 'ondblclick',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup']
    if options.nil?
        out << "<textarea>\n"
    else
        out << "<textarea"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_tfoot(options = {}) ⇒ Object



488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
# File 'lib/xhtml.rb', line 488

def start_tfoot(options = {})
    out = '';
    opts = ['align', 'valign', 'char', 'charoff', 'class', 'id', 'title',
            'style', 'onclick', 'ondblclick', 'onkeyup',  'onkeydown',
            'onkeypress', 'onmousedown', 'onmouseup', 'onmouseover',
            'onmousemove', 'onmouseout']
    if options.nil?
        out << "<tfoot>\n"
    else
        out << "<tfoot"
       options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_th(options = {}) ⇒ Object



322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
# File 'lib/xhtml.rb', line 322

def start_th(options = {})
     out = '';
     opts = ['abbr', 'align', 'colspan', 'rowspan', 'valign', 'axis',
             'char', 'charoff', 'scope', 'class', 'id', 'title', 'style',
             'onclick', 'ondblclick', 'onkeyup',  'onkeydown', 'onkeypress',
             'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
             'onmouseout']
    if options.nil?
        out << "<th>\n"
    else
        out << "<th"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n";
    end
    return out
end

#start_thead(options = {}) ⇒ Object



378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
# File 'lib/xhtml.rb', line 378

def start_thead(options = {})
    out = '';
    opts = ['align', 'valign', 'char', 'charoff', 'class', 'id', 'title',
            'style', 'onclick', 'ondblclick', 'onkeyup',  'onkeydown',
            'onkeypress', 'onmousedown', 'onmouseup', 'onmouseover',
            'onmousemove', 'onmouseout']
    if options.nil?
        out << "<thead>\n"
    else
        out << "<thead"
       options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_tr(options = {}) ⇒ Object



211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# File 'lib/xhtml.rb', line 211

def start_tr(options = {})
    out = '';
    opts = ['align', 'valign', 'char', 'charoff', 'class', 'id', 'title',
            'style', 'onclick', 'ondblclick', 'onkeyup',  'onkeydown',
            'onkeypress', 'onmousedown', 'onmouseup', 'onmouseover',
            'onmousemove', 'onmouseout']
    if options.nil?
        out << "<tr>\n"
    else
        out << "<tr"
       options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_tt(options = {}) ⇒ Object



3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
# File 'lib/xhtml.rb', line 3526

def start_tt(options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style','onclick', 'ondblclick',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup']
    if options.nil?
        out << "<tt>\n"
    else
        out << "<tt"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_ul(options = {}) ⇒ Object



1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
# File 'lib/xhtml.rb', line 1148

def start_ul(options = {})
    out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'style',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<ul>\n"
    else
        out << "<ul"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#start_var(options = {}) ⇒ Object



3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
# File 'lib/xhtml.rb', line 3579

def start_var(options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style','onclick', 'ondblclick',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup']
    if options.nil?
        out << "<var>\n"
    else
        out << "<var"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n"
    end
    return out
end

#strong(content, options = {}) ⇒ Object



3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
# File 'lib/xhtml.rb', line 3279

def strong(content, options = {})
    out = '<!-- While a valid part of XHTML, it is highly recommended'
    out << " that you use CSS instead of the strong element -->\n"
    opts = ['class', 'id', 'title', 'style','onclick', 'ondblclick',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup']
    if options.nil?
        out << "<strong>#{content}</strong>\n"
    else
        out << "<strong"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</strong>\n"
    end
    return out
end

#style(content, options = {}) ⇒ Object



969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
# File 'lib/xhtml.rb', line 969

def style(content, options = {})
    out = ''
    opts = ['media', 'title', 'type']
    if options.nil?
        out << "<style>\n#{content}\n</style>\n"
    else
        out << "<style"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">\n#{content}\n</style>\n"
    end
    return out
end

#sub(content, options = {}) ⇒ Object



3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
# File 'lib/xhtml.rb', line 3334

def sub(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style','onclick', 'ondblclick',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup']
    if options.nil?
        out << "<sub>#{content}</sub>\n"
    else
        out << "<sub"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</sub>\n"
    end
    return out
end

#sup(content, options = {}) ⇒ Object



3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
# File 'lib/xhtml.rb', line 3387

def sup(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style','onclick', 'ondblclick',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup']
    if options.nil?
        out << "<sup>#{content}</sup>\n"
    else
        out << "<sup"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</sup>\n"
    end
    return out
end

#table(content, options = {}) ⇒ Object



129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# File 'lib/xhtml.rb', line 129

def table(content, options = {})
    out = '';
    opts = ['border', 'cellpadding', 'cellspacing', 'summary', 'width',
            'frame', 'rules', 'class', 'id', 'title', 'style', 'onclick',
            'ondblclick', 'onkeyup',  'onkeydown', 'onkeypress',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout']
    if options.nil?
        out << "<table>#{content}</table>\n"
    else
        out << "<table"
       options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</table>\n"
    end
    return out
end

#tbody(content, options = {}) ⇒ Object



408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
# File 'lib/xhtml.rb', line 408

def tbody(content, options = {})
    out = '';
    opts = ['align', 'valign', 'char', 'charoff', 'class', 'id', 'title',
            'style', 'onclick', 'ondblclick', 'onkeyup',  'onkeydown',
            'onkeypress', 'onmousedown', 'onmouseup', 'onmouseover',
            'onmousemove', 'onmouseout']
    if options.nil?
        out << "<tbody>#{content}</tbody>\n"
    else
        out << "<tbody"
       options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</tbody>\n"
    end
    return out
end

#td(content, options = {}) ⇒ Object



241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
# File 'lib/xhtml.rb', line 241

def td(content, options = {})
    out = '';
    opts = ['align', 'colspan', 'headers', 'rowspan', 'valign', 'axis',
            'char', 'class', 'id', 'title', 'id', 'onclick', 'ondblclick',
            'onkeyup',  'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<td>#{content}</td>\n"
    else
        out << "<td"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</td>\n";
    end
    return out
end

#textarea(content, options = {}) ⇒ Object



3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
# File 'lib/xhtml.rb', line 3440

def textarea(content, options = {})
    out = ''
    opts = ['cols', 'name', 'rows', 'accesskey', 'disabled', 'onblur',
            'onchange', 'onfocus', 'onselect', 'readonly', 'tabindex',
            'class', 'id', 'title', 'style','onclick', 'ondblclick',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup']
    if options.nil?
        out << "<textarea>#{content}</textarea>\n"
    else
        out << "<textarea"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</textarea>\n"
    end
    return out
end

#tfoot(content, options = {}) ⇒ Object



463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
# File 'lib/xhtml.rb', line 463

def tfoot(content, options = {})
    out = '';
    opts = ['align', 'valign', 'char', 'charoff', 'class', 'id', 'title',
            'style', 'onclick', 'ondblclick', 'onkeyup',  'onkeydown',
            'onkeypress', 'onmousedown', 'onmouseup', 'onmouseover',
            'onmousemove', 'onmouseout']
    if options.nil?
        out << "<tfoot>#{content}</tfoot>\n"
    else
        out << "<tfoot"
       options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</tfoot>\n"
    end
    return out
end

#th(content, options = {}) ⇒ Object



296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'lib/xhtml.rb', line 296

def th(content, options = {})
     out = '';
     opts = ['abbr', 'align', 'colspan', 'rowspan', 'valign', 'axis',
             'char', 'charoff', 'scope', 'class', 'id', 'title', 'style',
             'onclick', 'ondblclick', 'onkeyup',  'onkeydown', 'onkeypress',
             'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
             'onmouseout']
    if options.nil?
        out << "<th>#{content}</th>\n"
    else
        out << "<th"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</th>\n";
    end
    return out
end

#thead(content, options = {}) ⇒ Object



353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
# File 'lib/xhtml.rb', line 353

def thead(content, options = {})
    out = '';
    opts = ['align', 'valign', 'char', 'charoff', 'class', 'id', 'title',
            'style', 'onclick', 'ondblclick', 'onkeyup',  'onkeydown',
            'onkeypress', 'onmousedown', 'onmouseup', 'onmouseover',
            'onmousemove', 'onmouseout']
    if options.nil?
        out << "<thead>#{content}</thead>\n"
    else
        out << "<thead"
       options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</thead>\n"
    end
    return out
end

#title(content) ⇒ Object



3497
3498
3499
3500
3501
# File 'lib/xhtml.rb', line 3497

def title(content)
    out = ''
    out << "<title>#{content}</title>\n"
    return out
end

#tr(content, options = {}) ⇒ Object



186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
# File 'lib/xhtml.rb', line 186

def tr(content, options = {})
    out = '';
    opts = ['align', 'valign', 'char', 'charoff', 'class', 'id', 'title',
            'style', 'onclick', 'ondblclick', 'onkeyup',  'onkeydown',
            'onkeypress', 'onmousedown', 'onmouseup', 'onmouseover',
            'onmousemove', 'onmouseout']
    if options.nil?
        out << "<tr>#{content}</tr>\n"
    else
        out << "<tr"
       options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</tr>\n"
    end
    return out
end

#tt(content, options = {}) ⇒ Object



3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
# File 'lib/xhtml.rb', line 3502

def tt(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style','onclick', 'ondblclick',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup']
    if options.nil?
        out << "<tt>#{content}</tt>\n"
    else
        out << "<tt"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</tt>\n"
    end
    return out
end

#ul(content, options = {}) ⇒ Object



1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
# File 'lib/xhtml.rb', line 1124

def ul(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'onclick', 'ondblclick', 'style',
            'onkeyup', 'onkeydown', 'onkeypress', 'onmousedown',
            'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout']
    if options.nil?
        out << "<ul>#{content}</ul>\n"
    else
        out << "<ul"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</ul>\n"
    end
    return out
end

#var(content, options = {}) ⇒ Object



3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
# File 'lib/xhtml.rb', line 3555

def var(content, options = {})
    out = ''
    opts = ['class', 'id', 'title', 'style','onclick', 'ondblclick',
            'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove',
            'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup']
    if options.nil?
        out << "<var>#{content}</var>\n"
    else
        out << "<var"
        options.each do |x,y|
            x = x.to_s
            if opts.include?("#{x}")
                if ( "#{x}" == 'class' or "#{x}" == 'id' and y.kind_of?(Array))
                    z = y.join(' ')
                    out << " #{x}='#{z}'"
                else
                    out << " #{x}='#{y}'"
                end
            end
        end
        out << ">#{content}</var>\n"
    end
    return out
end