Method: IsoDoc::HtmlFunction::Html#htmlstyle
- Defined in:
- lib/isodoc/html_function/html.rb
#htmlstyle(docxml) ⇒ Object
209 210 211 212 213 214 215 216 217 218 219 |
# File 'lib/isodoc/html_function/html.rb', line 209 def htmlstyle(docxml) return docxml unless @htmlstylesheet title = docxml.at("//*[local-name() = 'head']/*[local-name() = 'title']") head = docxml.at("//*[local-name() = 'head']") css = htmlstylesheet if title.nil? then head.children.first.add_previous_sibling css else title.add_next_sibling css end docxml end |