Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Run the original Schematron validator and the PHP port against the same XML fixtures, then compare their structured results rule by rule. A matching test suite gives you evidence for the schema edition, features, and cases you tested; it does not prove universal Schematron conformance.
First define what “correct” means
Schematron expresses rules and assertions about XML, commonly using XPath. In the legacy XSLT skeleton workflow, the schema is compiled into XSLT, which then validates an XML document and can produce an SVRL report. That report can contain more information than a simple valid/invalid result. See the Schematron project and its SVRL documentation.
As an Amazon Associate I earn from qualifying purchases.
Before writing tests, record the contract the PHP implementation is expected to meet:
Recommended Free Tools
- The exact
.schrevision, declared Schematron edition, and query binding. - The active phase, included resources, namespace declarations, and any extension functions.
- The PHP version and XML/XPath API used in deployment.
- Which results matter to callers: validity, severity, messages, diagnostics, locations, fired-rule information, and successful reports.
This prevents a port from appearing equivalent merely because both implementations return the same pass/fail bit while disagreeing on details an application consumes.
#1 Best Overall
Build paired fixtures for the rules
For each assertion or rule, create at least one XML document that should pass and one minimal document that should fail. For conditional or relational rules, vary one relevant condition at a time. Keep the fixture, expected outcome, and rule identifier together so a mismatch points to a specific behavior.
A simple example is a rule requiring a particular element: test a document where it is present and populated, then one where it is absent. If the rule also rejects blank content, add separate empty and whitespace-only cases rather than assuming they behave alike.
Expand the fixture set to cover the features the schema actually uses:
- Required and forbidden elements or attributes; empty, whitespace-only, and populated text.
- Value patterns, code-list membership, and relationships between fields.
- Namespaced elements and attributes, including prefixes declared for XPath.
- Context selection, nested nodes, axes, and predicates used by the rules.
- Every supported phase and include path; abstract patterns or rules, diagnostics, severity, and extensions where applicable.
- Malformed XML and parser errors, tracked separately from Schematron assertion failures.
Namespace behavior deserves explicit cases: Schematron guidance uses sch:ns to declare prefixes used in XPath, and PHP’s XPath APIs provide namespace registration. A validator that parses the same document but binds a prefix differently can silently select different nodes. See PHP’s DOMXPath namespace registration documentation.
Run both validators and compare structured results
- Choose a reference engine whose supported edition, query binding, and feature set are known.
- Run the same schema and XML fixture through that engine and the PHP implementation.
- Normalize only presentation details that are not part of your contract, then compare the structured outcomes.
- For each difference, identify the rule or assertion, inspect the two reports, and decide whether the PHP port is wrong or the contract intentionally allows the variation.
Compare failed assertions and, where relevant, fired rules, successful reports, messages, diagnostics, severity, and locations in SVRL or an equivalent structure. Do not normalize away differences that downstream consumers rely on. If report ordering is not contractual, compare equivalent sets rather than serialized bytes; if ordering matters, assert it explicitly.
The NEMSIS Technical Assistance Center describes a domain-specific test-kit workflow that generates XML cases for passing or failing particular Schematron rules and checks expected results. It is a useful example of the method, not evidence that any particular PHP port has passed: NEMSIS Schematron Development Kit.
Rank #3
Account for PHP and Schematron version differences
XPath and XML APIs
PHP’s DOMXPath evaluates XPath 1.0 and supports namespace registration. PHP 8.4 introduced DomXPath, documented as a modern, spec-compliant equivalent. Check the production runtime and enabled XML extensions rather than assuming a development machine matches it: DOMXPath and DomXPath.
Free tools Windows power users keep installed
One-click scans. No signup required.
XMLReader is a forward-only pull parser. If the port uses it for streaming, test whether the implementation can reproduce the context and navigation behavior of the tree-based XPath rules; the cursor model may require extra machinery. PHP documents the API at XMLReader.
Also test scalar XPath results on the actual PHP version if using SimpleXMLElement::xpath(): PHP 8.5 changes behavior for expressions that return values such as booleans or numbers. See the SimpleXML XPath documentation.
Edition, binding, and feature scope
The Schematron project reports the fourth edition as ISO Schematron 2025, with additions including XQuery 3.1 and XSLT 3.1 bindings, plus group, library, rules, typed let, and severity features. A port designed for an older subset should state that boundary explicitly; a .sch extension alone does not identify supported features. See the Schematron edition information.
The legacy skeleton is a possible reference for schemas within its supported scope, but its project records conformance limitations and recommends considering SchXslt for new applications. An independently implemented validator can also be useful as a comparison path, but confirm its edition and feature support before treating it as authoritative. Sources include the legacy skeleton project and the ph-schematron project.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Turn every mismatch into a regression test
When a difference appears, reduce it to the smallest XML fixture that still reproduces the mismatch. Preserve the rule identifier, reference output, PHP output, runtime version, and the reason the difference was fixed or accepted. Add the case permanently and rerun the suite after translation changes and on each supported PHP/runtime combination.
Keep parser failures distinct from failed assertions: malformed input is not evidence that a Schematron rule fired. Likewise, if a discrepancy is accepted because the output ordering is outside the contract, document that once in the test comparison policy instead of quietly discarding other report differences.
State the result at the scope you verified
A defensible claim names the reference engine, schema revision, supported feature subset, and tested cases—for example: “The PHP implementation matches engine X for schema revision Y and the declared subset across the tested namespace, phase, and diagnostics cases.” Do not claim complete ISO conformance unless an appropriate conformance assessment supports it. A test suite establishes observed behavior over its cases, not mathematical proof of equivalence.
Quick Recap
Release checklist
- Schema revision, edition, binding, phase, includes, and extensions are recorded.
- Each rule has passing and failing fixtures; relevant namespace and XPath edge cases are covered.
- Both implementations receive identical XML inputs.
- Structured outputs are compared at the level consumers depend on.
- Reference-engine limitations and PHP runtime versions are part of the documented scope.
- Every resolved mismatch is now a permanent regression case.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errors




