Commits

Shlomi Fish  committed 2ec6e6d

Add more to the synopsis.

  • Participants
  • Parent commits 292608b

Comments (0)

Files changed (1)

File XML-GrammarBase/lib/XML/GrammarBase/Role/RelaxNG.pm

 
     with ('XML::GrammarBase::Role::RelaxNG');
 
+    has '+module_base' => (default => 'XML::Grammar::MyGrammar');
+    has '+rng_schema_basename' => (default => 'my-grammar.rng');
+
+    package main;
+
+    my $rnger = XML::Grammar::MyGrammar::RelaxNG::Validate->new(
+        data_dir => "/path/to/data-dir",
+    );
+
+    # Throws an exception on failure.
+    $rnger->rng_validate_file("/different-path-to-xml-file.xml");
+
 =head1 SLOTS
 
 =head2 module_base