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…

...

What’s in Java 10 (and 9) for XML Developers?

Java JDK 10 arrived this month (March 2018). It has much less radical changes compared to Java 9. The general trend: In: JSON/AJAX, Docker, effeciency, security JavaDoc, unmutable collections, more support for charsets in API Out: XML-WS (SOAP), CORBA, Java WebStart, RMI (When I say “out”, some are just removed…

...

The most interesting Class of Computer Languages

In the previous blog  (XML as a canary in the mine: can Intel IPSC help stagnant C get its mojo back?), I mentioned three classes of languages that are thriving, plus one that I suggest is not. But that leaves out what I think is the most interesting class of…

...

Using XPath to make Assertions is now a common technique

The idea of using XPath in a schema language about structured data probably first came up with Dave Raggett’s Assertion Grammars. This was a recasting DTDs that allowed (I don’t know if this part was ever implemented) the context element to specified using an XPath: called Conditions. I think of…

...

How many developers think different?

The StackOverflow yearly survey came out today. This week I have been writing some posts thinking about what modes of thinking, jobs, technologies, debugging strategies might be suitable for developers with smaller working memories or below average short-term-memory-consolidation.  And I have suggested that the emphasis in the hiring exams of…

...

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…

...