Method: IsoDoc::ClassUtils#ns
- Defined in:
- lib/isodoc/class_utils.rb
#ns(xpath) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/isodoc/class_utils.rb', line 14 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 |