Inasmuch as it exists as a PDF file, you, too, can have your own copy of my “Schematron Testing Framework” (
stf) poster from XML Prague 2012. I’m happy to say that I received constructive comments about
stf from people at XML Prague 2012 who read the poster, and I’ll be looking at incorporating the feedback in the near future.
One suggestion, from George Bina, was to make a single “framework” file for running the tests – and including the test files in the framework file either directly or by using XInclude to refer to external test files – rather than the current decentralised approach. A single framework file would make it easier to make a report of the results, unlike the the current approach where the idea is that the only report you really want to see is “
<errors/>” when there are no more errors. A single framework file could also become very large and hard to navigate when there’s lots of very similar tests in it. What do you think?
`imenu-generic-expression` makes using Emacs’ “Imenu” simpler, it’s this triennial’s “Obscure Emacs variable of the week“.
Continue reading “imenu-generic-expression”
Inasmuch as a suite of Schematron tests contains many contexts where a bug in a document will make a Schematron
assert fail or a
report succeed, it follows that for any new test suite and any reasonably sized but buggy document set, there will straight away be many
report messages produced by the tests. When that happens, how can you be sure your Schematron tests all worked as expected? How can you separate the expected results from the unexpected? What’s needed is a way to characterise the Schematron tests before you start as reporting only what they should, no more, and no less.
stf (https://github.com/MenteaXML/stf) is a XProc pipeline that runs a Schematron test suite on test documents (that you create) and winnows out the expected results and report just the unexpected. stf uses a processing instruction (PI) in each of a set of (typically, small) test documents to indicate the test’s expected
reports: the expected results are ignored, and all you see is what’s extra or missing. And when you have no more unexpected results from your test documents, you’re ready to use the Schematron on your real documents. Continue reading “Schematron Testing Framework”
Inasmuch as both HTML and XML markup – being descended from SGML – support a nested, hierarchical structure and as CSS allows, even promotes, a stream-of-consciousness style of coding, there can be a tension between the two approaches.
To put it another way:
- If you want different styles in a couple of contexts that depend on the type of several levels of ancestor, then you get to put all those ancestors in the CSS selectors for each of those styles;
- If you want to use the same colour in multiple different styles, then, by golly, you get to enter the same
color value in each of them (and if you want to change it later, you get to find them all again to do it); and
- If you want to use the same set of styles in multiple contexts – say, use rounded corners multiple places and with bigger radii on the outermost corners – then you get to repeat the same set of styles while jiggering their values every place that you want them.
The CSS soon gets to the point that only a machine can reliably work out the cascading and so we require tools such as Firebug to make sense of it and present it to us in ways that we can understand.
I have previously implemented a system for a client where the template CSS file is wrapped in an XML element and contains empty elements for each of the values of
color properties so the all-XML processing system can ‘skin’ the stylesheet by substituting the preferred
color values and outputting proper CSS on the way to making the HTML, but that was adding complexity, not taking it away.
Enter LESS (http://www.lesscss.org/), the “dynamic stylesheet language”. LESS is pretty much CSS as it should have been, since it elegantly solves the gripes listed above, and more besides. Continue reading “CSS for the hierarchically minded”
Inasmuch as my final “XSLT and XSL-FO toolbox of tips and tricks” session was well received, XML Summer School 2011 finished on a high note. My other sessions, “Developing and Testing in XSLT” with Jeni Tennison in the “XSLT/XQuery” track and a five-minute Ignite-format talk on EPUB, also went well, but it was that final talk in the “Publishing” track that got the most visible reactions. Continue reading “XML Summer School 2011 ends on high note”
Inasmuch as I was already asked to be on the Publishing track at XML Summer School 2011, I was then invited to co-teach “Developing and Testing in XSLT” with Jeni Tennison in the XSLT and XQuery track, so I’m pleased that I’ll be teaching two sessions at the XML Summer School in St Edmund Hall, Oxford University, on 18-23 September 2011. (Early bird discount ends 30 June 2011.)
My sessions are but 1/4 of their respective tracks, but I’ll be in the room for the entirety of each track and, indeed, like all Faculty at the XML Summer School, I’ll be around all week. Continue reading “XML Summer School 2011”
Inasmuch as the customised version of the “xmlspec” schema being used for the next version of the XSL spec is maintained in RELAX NG XML syntax (RNG) and Emacs’s nXML-mode only uses RELAX NG compact syntax (RNC), I yet again wanted to convert a schema from RNG to RNC.Â As you would expect, there’s more than one way to do it. Continue reading “Converting RNG to RNC”
Inasmuch as the
<?xml-model?> processing instruction (jointly developed by W3C and ISO/IEC JTC1/SC34) is the new, standard way to associate schemas with XML documents and I already had code for using a similar, oXygen-specific PI, it was easy to make a hook function to put in your .emacs file so nXML mode will use
<?xml-model?> to find a RNC schema: Continue reading “xml-model processing instruction with nXML mode”
Inasmuch as the EPUB: Chapter and Verse talk went down well and, for many people, the Saturday evening libations at The Strahov Monastic Brevery went down even better, I judge XML Prague 2011 to be a success for me (and for my co-author, Mark Howe) and for Mentea and also a success in its own right.
Several people made approving comments about the talk, which was good (some even commented on last year’s talk, which, since this showed they still remembered it, was even better). The best comment about this year’s though is probably @Innovimax‘s tweet:
Tony is a real 21th century XML Monk! He sponsored the Beer Station at #xmlprague and works on nicely printing bibles. #consideringJoining
Continue reading “XML Prague 2011 a success”
Inasmuch as XML Prague was where it became obvious that “Menteith” wasn’t working for many people, Mentea is pleased to be sponsoring the evening libations at XML Prague 2011 to promote the new name.