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…
...Patterns in time: validating dynamic behaviour of Java with Schematron and log4j
I was thinking more about my recent post on Alan Turing’s method for checking routines in Alan Turing and Tony Hoare in Assertions. How would we do that today, and could Schematron be useful? (This blog post is just a snapshot of a design to air the technique, not debugged…
...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…
...Resurrecting a free 17-year old VB app: Topologi Schematron Validator
Which software supports Schematron schema embedded in XSD schemas? This was the question in an email this week. (answer: Oxygen for IDE, for open source it is DIY using the XSLT on the Gitlab: I don’t know if there are libraries that support it), I remembered an old desktop utility…
...Validating complex text, embedded in XML without markup, in Schematron
Your XML documents have large chunks of text in some fixed notation: XPaths or JavaScript or dates that are not limited to ISO 8601 or even, because you are so perverse, JSON fragments. How are you going to validate that XML? You are not going to mark these up with…
...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…
...Making a Profile of a Large Schema with Schematron: Sugar-Free XSD
What do you do if you have to use an excessively large schema, but you only need parts of it, and you don’t want to open yourself up to a continuing maintenance problem, of updating your derived schema every time the base schema changes? Here is an example of one…
...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,…
...Error Messages and Diagnostics should be Inputs to the Developer not Outputs
It is hard for me to think of a project which does not start out with requirements saying things like “The error messages produced by the system must be comprehensible to the user (unlike the existing system.)” And, given that system acceptance testing is usually based on making sure that…
...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…
...