hiruzen has asked for the wisdom of the Perl Monks concerning the following question:
It is giving error Can't locate object method "new" via package "XML::Schematron::LibXSLT" at schematron.pl line 14. which tell module don't have new method. May be module is updated.use XML::Schematron::LibXSLT; my $schema_file = $ARGV[0]; my $xml_file = $ARGV[1]; die "Usage: perl schematron.pl schemafile XMLfile.\n" unless defined $schema_file and defined $xml_file; my $tron = XML::Schematron::LibXSLT->new(); $tron->schema($schema_file); my $ret = $tron->verify($xml_file); print $ret . "\n";
But it dosen't print anything. Don't know what is wrong!use XML::Schematron; my $pseudotron = XML::Schematron->new_with_traits( traits => ['LibXSLT +'], schema => "$schema_file"); my $messages = $pseudotron->verify($xml_file); print "$messages\n";
|
|---|