Method: IsoDoc::ClassUtils#ns
- Defined in:
- lib/isodoc/class_utils.rb
#ns(xpath) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/isodoc/class_utils.rb', line 15 def ns(xpath) xpath.gsub(%r{/([a-zA-z])}, "/xmlns:\\1") .gsub(%r{::([a-zA-z])}, "::xmlns:\\1") .gsub(%r{\[([a-zA-z][a-z0-9A-Z@/]* ?=)}, "[xmlns:\\1") .gsub(%r{\[([a-zA-z][a-z0-9A-Z@/]*[/\]])}, "[xmlns:\\1") end |