Skip to content

Instantly share code, notes, and snippets.

@hubgit
Created April 11, 2019 10:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hubgit/bb02212a55f7b9e27bde0e6dc1315323 to your computer and use it in GitHub Desktop.
Save hubgit/bb02212a55f7b9e27bde0e6dc1315323 to your computer and use it in GitHub Desktop.
Use Saxon in PHP
<?php
$saxon = new Saxon\SaxonProcessor();
print "{$saxon->version()}\n";
$input = 'schematrons/1.0/jats4r-topic.sch';
$xsl = 'skeleton/iso_schematron_skeleton_for_saxon.xsl';
$output = 'jats4r-topic.xsl';
$processor = $saxon->newXsltProcessor();
$processor->transformFileToFile($input, $xsl, $output);
print $processor->transformFileToString($input, $xsl);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment