topical media & game development
server-php-xml-class-schematron-schematron-sample.php / php
<head>
<title>Schematron sample</title>
</head>
<?php
include_once("class_schematron.php");
print("<h1>Schematron Test</h1>");
s->compile_schematron_from_file("validation_sample1.xml");
s->get_compiled("validation_sample1.xml");
fp=fopen("validation_sample1.xml","r");
fp,filesize("validation_sample1.xml"));
fclose(fp=fopen("sample1.xml","r");
fp,filesize("sample1.xml"));
fclose(ret=ret</textarea>");
/* FILE USING MEM */
s->schematron_validate_file_using_mem("sample1.xml",ret</textarea>");
/* MEM USING FILE */
s->schematron_validate_mem_using_file(ret</textarea>");
/* MEM USING MEM */
s->schematron_validate_mem_using_mem(uncompiled);
print("<textarea rows='10' cols='20'>
** COMPILED SCRIPTS *
print("<h3>Now testing for compiled scripts</h3>");
/* FILE USING FILE */
ret=ret</textarea>");
/* FILE USING MEM */
s->schematron_validate_file_using_compiled_mem("sample1.xml",ret</textarea>");
/* MEM USING FILE */
s->schematron_validate_mem_using_compiled_file(ret</textarea>");
/* MEM USING MEM */
s->schematron_validate_mem_using_compiled_mem(compiled);
print("<textarea rows='10' cols='20'>
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.