Script tags also require self-closed tags fix.
Changed `repeat` to support multiple elements simultaneously

A simple wrapper class DOMTemplateRepeaterArray is used to forward the changes to each instance of DOMTemplateRepeater. This means that you can now template lists that appear more than once in the HTML!

Also, fixed an important bug where the XPath shorthand was partially matching classNames, instead of whole classNames.
ALL IS LOŚ͖̩͇̗̪̏̈́T ALL I​S LOST the pon̷y he comes he c̶̮omes he comes the ich​or permeates all MY FACE MY FACE ᵒh god no NO NOO̼O​O NΘ stop the an​*̶͑̾̾​̅ͫ͏̙̤g͇̫͛͆̾ͫ̑͆l͖͉̗̩̳̟̍ͫͥͨe̠̅s ͎a̧͈͖r̽̾̈́͒͑e n​ot rè̑ͧ̌aͨl̘̝̙̃ͤ͂̾̆ ZA̡͊͠͝LGΌ ISͮ̂҉̯͈͕̹̘̱ TO͇̹̺ͅƝ̴ȳ̳ TH̘Ë͖́̉ ͠P̯͍̭O̚​N̐Y̡ H̸̡̪̯ͨ͊̽̅̾̎Ȩ̬̩̾͛ͪ̈́̀́͘ ̶̧̨̱̹̭̯ͧ̾ͬC̷̙̲̝͖ͭ̏ͥͮ͟Oͮ͏̮̪̝͍M̲̖͊̒ͪͩͬ̚̚͜Ȇ̴̟̟͙̞ͩ͌͝S̨̥̫͎̭ͯ̿̔̀ͅ
Slight rewording of improvement by sani — better tag matching when repairing output HTML

Thanks for the going through the pain of fixing it yourself and submitting it, much appreciated! :)
Change instantiation to use a string instead of a filename

Fixes #1: Load using a string. WARNING: You must change your template
instantiation to read in the file and pass it to DOMTemplate, e.g.
`$template = new DOMTemplate (file_get_contents ('filename.html'));`
Fixed #2: Removal of ClassNames with `remove` method

Also improved comments throughout
support for multiple namespaces
should have a fallback value
typo
shortened the namespace registration code and changed the explanation on top
Integrated Nikolai's changes -- multiple namespace support
Moved the call to clone the template node to the start of the next() method

to overcome Segmentation fault in php-fpm 5.3.10 which appears to dislike using insertBefore with a node that already exists within the template

-- Iain Dooley
Revert "Moved the call to clone the template node to the start of the next() method"

This reverts commit a1a989fac6c7843eaa4236aecca9c07c4e06cd68.
setValue method would throw error if content empty (null) when `$asHTML = true`
integrated Sani's change: 'setValue method throws error if content empty (null) when `$asHTML = true`'
Fix #12: Store resolved XPaths to reduce overhead

This doubles the speed of `repeat` loops.
With big thanks to sani for pointing this out.

P.S. F* GIT. F* GIT SO MUCH. This buggered up so badly. Sorry for the
no-doubt spam of commit messages.
Some error handling to deal with invalid XPath expressions and invalid HTML.
Remember to handle the thrown exception in your code when you insert HTML!
Make regex more sensible, improve performance on long lines
Fixed #7: `html` should be a property, not a method
Fixed #15: Improve regex in `html()` method, with thanks to Sani
Added XML property to output code without cleaning for HTML