module XMLScan::NSVisitor

Public Instance Methods

ns_parse_error(msg) click to toggle source
   # File lib/xmlscan/namespace.rb
24 def ns_parse_error(msg)
25   raise NSParseError.new(msg)
26 end
ns_valid_error(msg) click to toggle source
   # File lib/xmlscan/namespace.rb
32 def ns_valid_error(msg)
33   raise NSNotValidError.new(msg)
34 end
ns_wellformed_error(msg) click to toggle source
   # File lib/xmlscan/namespace.rb
28 def ns_wellformed_error(msg)
29   raise NSNotWellFormedError.new(msg)
30 end
on_attribute_ns(qname, prefix, localpart, *a) click to toggle source
   # File lib/xmlscan/namespace.rb
60 def on_attribute_ns(qname, prefix, localpart, *a)
61 end
on_stag_end_empty_ns(qname, namespaces, *a) click to toggle source
   # File lib/xmlscan/namespace.rb
66 def on_stag_end_empty_ns(qname, namespaces, *a)
67 end
on_stag_end_ns(qname, namespaces, *a) click to toggle source
   # File lib/xmlscan/namespace.rb
63 def on_stag_end_ns(qname, namespaces, *a)
64 end
on_stag_ns(qname, prefix, localpart, *a) click to toggle source

<foo:bar hoge:fuga='' hoge='' > <foo hoge:fuga='' hoge='' >

^       ^          ^ ^     ^  ^
1       2          3 4     5  6

The following method will be called with the following arguments
when the parser reaches the above point;

  1: on_stag_ns           ('foo:bar', 'foo', 'bar')
      or
     on_stag_ns           ('foo', '', 'foo')
  2: on_attribute_ns      ('hoge:fuga', 'hoge', 'fuga')
  3: on_attribute_end     ('hoge:fuga')
  4: on_attribute_ns      ('hoge', nil, 'hoge')
  5: on_attribute_end     ('hoge')
  6: on_stag_end_ns       ('foo:bar', { 'foo' => '', ... })
      or
     on_stag_end_empty_ns ('foo:bar', { 'foo' => '', ... })
   # File lib/xmlscan/namespace.rb
57 def on_stag_ns(qname, prefix, localpart, *a)
58 end