Perl
Perl version of Schematron
00:18, 12 Dec 2000 UTC | Edd Dumbill

Kip Hampton has written a native Perl version of Rick Jelliffe's Schematron XML schema validator.

Schematron defines constraints on a document instance by using the XPath language. Jelliffe's implementation used XSLT, Hampton's is the first non-XSLT version.

The Schematron has proved useful for developers wanting rapid development of user-friendly validators for vocabularies. Hampton gives an example of its invocation:

use XML::Schematron::XPath;
my $pseudotron = 
  XML::Schematron::XPath->new(schema => 
  'my_schema.xml');
my $messages = 
  $pseudotron->verify('my_file.xml');

Some of the ideas giving birth to this module are explained in a recent XML.com article written by Hampton.

XML::Schematron is available from CPAN.

  
xmlhack: developer news from the XML community

Front page | Search | Find XML jobs

Related categories
Perl
Schemas