New XSLT2 implementation of ISO Schematron: SchXslt

There is a promising looking new implementation of Schematron for XSLT2 up at GitHub, the Open Source SchXslt project.  Kudos to David Maus for developing this, and making it available. It is intended as a drop-in replacement for the most common skeleton implementation (also on GitHub at Schematron), so it…

...

Schematron reimagined for JSON/JSONPath

On GitHub you can find jsontron which is Schematron  moved out of the XML/XSLT/XPath ecosystem and applied to the JSON/JavaScript/JSONPath ecosystem.  What is particularly pleasing to me is that this seems to be a really full implementation of ISO Schematron, including phases (not abstract rules and abstract patterns, no biggie.) It…

...

Assertions in Java

In Schematron, an assertion is a positive natural language statement about some aspect of a pattern that is expected to be found in an XML document.  It is implemented (to whatever extent possible) with the assert test. However, in programming languages, assertions have a wider range of meaning. (To the…

...

The Most Common Programming Error with Schematron

Schematron is a small, simple language, by design.  The complexity is not in the elements, but sloughed off to the XPaths. But if there is one mistake that I sometimes see developers make, it is this: people think that all the rules in a pattern will be tried.  In fact,…

...

Sorting out Log4J 2.0’s strict schemas

Log4J version 2.0 has two dialects of its XML configuration language: concise and strict. Concise mode is fairly well document and freeform. It uses the reflection API and plugins, so that if there is a plugin available, you can just call its name directly.  So there is no schema: the…

...

Alan Turing and Tony Hoare on Assertions

Schematron is a language for making assertions about whole XML documents, that each part of various patterns must be present. Schematon (and the other XML schema languages starting with DTDs) are a little special in that they are geared for assertions to be made on large complex data structure, but…

...

Alexander Schwartzman’s Quasi-Static and Quasi-Dynamic Constraints

Alexander Schwartzman has written a good article summarizing the lessons learned from using Schematron and DTDs together over multiple years for a non-trivial DTD. JATS Subset and Schematron: Achieving the Right Balance  from the Journal Article Tage Suite Conference 2017 is now online. Alexander is mainly concerned about whether you…

...

Can I assert patterns in Java Objects with Schematron?

Schematron has been useful over the years for detecting patterns in documents.  A simple expert system (multiple if-then-else changes) for capturing the constraints as human language,  implementing the tests using XPaths to provide a context and then to assert or report on things that should be true at the context. …

...

Validation result caching using a keystore

Scenario: You have a messaging or distributed pipeline architecture for your XML documents. An XML document make multiple stopovers from beginning to end, and a document may be stored and requested multiple times in its life.  Your documents go between different operations or groups under your roof, or comes from…

...

Could Schematron be used for Content Completion in editors?

Over at XML.COM,  Gerrit Imsieke has a stimulating article Epischemas: Schema Constraints that facilitate Content Completion.  He wants to improve content completion in XML editors (where the editor automatically fills in the next step) given that many interesting types of documents have additional constraints to those available in a simple…

...

Using Schematron to Test Transformations: Lesson Learned

This decade, I been twice involved in quite intense year-long projects to do exhaustive acceptance testing of XML transformations using Schematron. What lessons did I learn? Projects So the context here is the need for error-free transformations of large numbers of high-value complex documents, where the number of documents and…

...