Class: TestVisitor

Inherits:
Object
  • Object
show all
Includes:
XMLScan::NSVisitor, XMLScan::Visitor
Defined in:
lib/xmlscan/parser.rb,
lib/xmlscan/scanner.rb,
lib/xmlscan/xmlchar.rb,
lib/xmlscan/htmlscan.rb,
lib/xmlscan/namespace.rb

Instance Method Summary collapse

Methods included from XMLScan::NSVisitor

#ns_valid_error, #on_attribute_ns, #on_stag_end_empty_ns, #on_stag_end_ns, #on_stag_ns

Methods included from XMLScan::Visitor

#on_attr_charref, #on_attr_charref_hex, #on_attr_entityref, #on_attr_value, #on_attribute, #on_attribute_end, #on_cdata, #on_chardata, #on_charref, #on_charref_hex, #on_comment, #on_doctype, #on_end_document, #on_entityref, #on_etag, #on_pi, #on_prolog_space, #on_stag, #on_stag_end, #on_stag_end_empty, #on_start_document, #on_xmldecl, #on_xmldecl_encoding, #on_xmldecl_end, #on_xmldecl_key, #on_xmldecl_other, #on_xmldecl_standalone, #on_xmldecl_version, #valid_error

Instance Method Details

#ns_parse_error(msg) ⇒ Object



338
339
340
# File 'lib/xmlscan/namespace.rb', line 338

def ns_parse_error(msg)
  STDERR.printf("%s:%d: %s\n", $s.path, $s.lineno, msg) if $VERBOSE
end

#ns_wellformed_error(msg) ⇒ Object



341
342
343
# File 'lib/xmlscan/namespace.rb', line 341

def ns_wellformed_error(msg)
  STDERR.printf("%s:%d: NSC: %s\n", $s.path, $s.lineno, msg) if $VERBOSE
end

#parse_error(msg) ⇒ Object



286
287
288
# File 'lib/xmlscan/parser.rb', line 286

def parse_error(msg)
  STDERR.printf("%s:%d: %s\n", $s.path, $s.lineno, msg) if $VERBOSE
end

#warning(msg) ⇒ Object



292
293
294
# File 'lib/xmlscan/parser.rb', line 292

def warning(msg)
  STDERR.printf("%s:%d: warning: %s\n", $s.path,$s.lineno, msg) if $VERBOSE
end

#wellformed_error(msg) ⇒ Object



289
290
291
# File 'lib/xmlscan/parser.rb', line 289

def wellformed_error(msg)
  STDERR.printf("%s:%d: WFC: %s\n", $s.path, $s.lineno, msg) if $VERBOSE
end