-
Notifications
You must be signed in to change notification settings - Fork 36
Schematron Best Practices
Philip Helger edited this page Jul 9, 2024
·
1 revision
This page tries to collect best practices around Schematron. The recommendations will grow over time, so check back later.
Schematron Rules | Description |
---|---|
Try to avoid <rule> context values that start with or contain //
|
The selection of XML elements using // is very slow and should be avoided to improve execution speed |
Favour forward references over backward references in XPath | To support the execution via streaming, only forward references (e.g. a/b ) should be used. Backward reference (e.g. ../c/d ) would require to go back in the stream which is not possible in streaming without storing the full data store. |
Clearly state the engine (incl. the XSLT version if needed) your file requires. | E.g. XSLT1 has no function to check for regular expressions, whereas XSLT2 can use the matches function. |
On Twitter: Follow @philiphelger
Donation link: https://paypal.me/PhilipHelger
It is appreciated if you star the GitHub project if you like it.