I am trying to validate an XML file with Schematron, which is more complicated than XSD. I googled a lot and the best thing that came up is this Microsoft website. But that
I recommend that you instead use Rick Jelliffe's reference implementation of ISO Schematron using pure XSLT, preferably XSLT 2.0, with an established XSLT processor such as Michael Kay's Saxon.