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…

...

Schematron and Scrum

How does Schematron fit in with Scrum? This a follow-up to Error Messages and Diagnostics should be Inputs to the Developer not Outputs. According to that, error messages and diagnostics should be provided through the Product Manager as details on the appropriate Product Backlog items. In Scrum terms, you want…

...

Trying out PlantUML with a package diagram for Schematron

PlantUML is a neat tool, quite mature, for generating UML diagrams from text, using a little domain-specific language. It reminds me of UNIX pic, which allowed really fast and easy generation of diagram, up to a point. WYSIWYG really sucks for many technical diagrams: I actively dislike Visio for UML,…

...

Optimizing Schematron using @saxon:memo-function

Tony Graham mentioned in an email his use of Saxon’s optimization hint attribute xsl:function/@saxon:memo-function to memo-ize the values of some functions.  He had investigated it for his Open Source focheck project that checks XSL-FO scripts. I was intrigued as I had never used this technique, and Tony kindly provided details…

...