Class: Malline::XHTML
Overview
Quite stupid plugin for XHTML, we should be able to do this only with a DTD or similar.
Defines all usable tags, list which one can be self-close, defines a short cut tag xhtml. Also makes sure that there is some necessary elements in the document.
Defined Under Namespace
Modules: Tags
Constant Summary collapse
- CUSTOM_TAGS =
%w{head title meta}
- XHTML_TAGS =
grep ELEMENT xhtml1-transitional.dtd | cut -d’ ‘ -f2 | tr “n” “ ”
%w{html head title base meta link style script noscript iframe noframes body div p h1 h2 h3 h4 h5 h6 ul ol menu dir li dl dt dd address hr pre blockquote center ins del a span bdo br em strong dfn code samp kbd var cite abbr acronym q sub sup tt i b big small u s strike basefont font object param applet img map area form label input select optgroup option textarea fieldset legend button isindex table caption thead tfoot tbody colgroup col tr th td} - CUSTOM_TAGS
- SHORT_TAG_EXCLUDES =
grep ‘ELEMENT.*EMPTY’ xhtml1-transitional.dtd | cut -d’ ‘ -f2 | tr “n” “ ”
XHTML_TAGS + CUSTOM_TAGS - %w{base meta link hr br basefont param img area input isindex col}
Class Method Summary collapse
Methods inherited from Plugin
Class Method Details
.do_install(view) ⇒ Object
72 73 74 75 76 |
# File 'lib/malline/plugins/xhtml.rb', line 72 def self.do_install view view.malline. XHTML_TAGS view.malline.short_tag_excludes += SHORT_TAG_EXCLUDES view.extend Tags end |