Note by Apollia on Nov. 8, 2023: Please join my Patreon if you'd like to support me and my work!

My main personal website is now Apollia.org. I'm still not sure what to do with Astroblahhh.Com, so it's mostly staying as-is for now.





Software Blog Archive - Feb 2017

Posts Below
2/3/2017 - How to get the Schematron Testing Framework (stf) to run in Lighthouse 64 Puppy Linux 6.02 Beta 2
2/5/2017 - A simple Schematron demo for PHP 5.6.28 and Saxon/C 1.0.2

    Hide/Show:


   ▲ Top  ▼ Bottom  △ TOC   ↓ Down
How to get the Schematron Testing Framework (stf) to run in Lighthouse 64 Puppy Linux 6.02 Beta 2
Friday, February 3rd, 2017
22:56:21 GMT


The operating system with which I accomplished the below was Lighthouse 64 Puppy Linux 6.02 Beta 2.


I've been messing around with XML and XSLT lately, since I want to use XSLT to do some clever things with VUE: Visual Understanding Environment concept maps. (Here's my slightly modified version of VUE.)

So, I've been trying to figure how to use the XML-validation language Schematron, so I'll have a way to validate concept map files I generate or modify with XSLT instead of VUE.

In addition to Schematron, I also stumbled across some Java software called the Schematron Testing Framework (stf), which I'm not yet sure I'm going to need, but, figured out how to run anyway just in case I ever do need it.


It took me a while, but I finally figured out I needed to download some other Java software, and edit the "properties.xml" file included with the Schematron Testing Framework (stf) to tell it where to find that other software in my system.

Here's my entire "properties.xml" file:


In addition to the Schematron Testing Framework (stf) itself, I had to download the following three Java programs. I lazily downloaded binaries instead of compiling anything from scratch. (Possibly other versions than the ones I used would work.)


  1. Saxon-HE 9.7.0.14. You can get the "saxon9he.jar" file you need simply by unzipping "SaxonHE9-7-0-14J.zip".

    Quoted from the official web page about libre, open-source editions of Saxon:

    "Saxon-HE (Home Edition) is the open-source version of the Saxon XSLT and XQuery processor."


  2. XML Calabash 1.1.15-97. The "xmlcalabash-1.1.15-97.jar" file is an installer, which you can run either by double-clicking on it, or opening a console at its folder, and using this command:

    Quoted from the official XML Calabash web page:

    "XML Calabash is an implementation of XProc: An XML Pipeline Language."


  3. xml-commons-resolver-1.2.zip - Another file you can just unzip and don't have to install in any special place. The file you need for the Schematron Testing Framework (stf) is "resolver.jar".

    Here's the official Apache xml-commons web page.


I also used:


With everything installed and the "properties.xml" properly configured, all I had to do to run Schematron Testing Framework (stf) was go to stf's "example" folder, open a console there, and type:


That resulted in this output:


To confirm that Schematron Testing Framework (stf) was really reading the example XML files "foo-1.xml" and "foo-2.xml", I edited them, which, as expected, changed the output of the "ant" command a bit:


   ▲ Top  ▼ Bottom  △ TOC   ↓ Down


   ▲ Top  ▼ Bottom  △ TOC   Up ↑
A simple Schematron demo for PHP 5.6.28 and Saxon/C 1.0.2
Sunday, February 5th, 2017
04:38:05 GMT


Today, I figured out how to use the XML-validation language Schematron with PHP 5.6.28 and the XSLT processor Saxon/C 1.0.2.

And since examples of using Schematron with PHP plus Saxon/C currently seem to be quite rare on the web - possibly even nonexistent, except for my own - I put together this GitHub repo:

Simple-Schematron-Demo-for-PHP-5.6.28-and-Saxon-C-1.0.2


I only authored the PHP script and the "README.md" file. The included Schematron schema and XML files are my slightly modified versions of things from the the official Schematron repo.

Everything else is unmodified stuff from the official Schematron repo.


Now that I can use Schematron, I'm guessing I'm probably going to have a much easier time with all of my current and future XSLT projects.

Soon, I'll be able to be far more sure I'm generating valid VUE: Visual Understanding Environment concept maps with tools other than VUE itself. (Here's my slightly modified version of VUE.)

   ▲ Top  ▼ Bottom  △ TOC   Up ↑


    Hide/Show:





Note by Apollia on Nov. 8, 2023: Please join my Patreon if you'd like to support me and my work!

My main personal website is now Apollia.org. I'm still not sure what to do with Astroblahhh.Com, so it's mostly staying as-is for now.