XSLT 3.0 testbed

Inasmuch as few people yet have much (or any) experience using XSLT 3.0 on more than toy examples, https://github.com/MenteaXML/xslt3testbed is a public, medium-sized XSLT 3.0 project where people could try out new XSLT 3.0 features on the transformations to (X)HTML(5) and XSL-FO that are what we do most often and, along the way, maybe come up with new design patterns for doing transformations using the higher-order functions, partial function application, and other goodies that XSLT 3.0 gives us. Continue reading

Is there life after libXSLT 1?

Inasmuch as I was talking at Balisage about adapting the Saxon-CE event model to XSL-FO, I ended up talking with Lauren Wood and Matt Patterson about the general case for a XSLT 2.0 processor, or a processor for a subset of XSLT 2.0, that could be used in language bindings and web browsers as a replacement for the stuck-at-XSLT-1.0 libXSLT processor.

Since we were going to talk about it more at the XML Summer School anyway, I did a five-minute lightning talk (slides) at the “unconference sessions”.  Happily, it got more people at the Summer School trying things. Michael Kay of Saxonica was at the presentation, and not only did he welcome the idea of compiling Saxon to C, Saxonica now state that they’re looking at the possibility.

XML Summer School 2013

Inasmuch as the offer’s open a bit longer, you can still use the XML13 discount code for a 10% discount on your fees for this year’s XML Summer School.

This year, with Patricia Walmsley, I’m teaching Improv­ing stylesheets through the use of advanced features in the XSLT and XQuery track:

Most XSLT developers stick to a famil­iar core set of XPath and XSLT instruc­tions and func­tions. There are a num­ber of advanced fea­tures, many of them intro­duced in ver­sion 2.0, that appear only rarely in stylesheets even though they can be very use­ful in cer­tain situ­ations. In this course, we will explore some of these less-used fea­tures, show­ing inter­act­ively how they can be applied to improve exist­ing XSLT stylesheets. XPath fea­tures covered will include oper­at­ors like inter­sect and except, << and >>, quan­ti­fied expres­sions, and 2.0 func­tions that can sig­ni­fic­antly sim­plify your stylesheets. XSLT fea­tures covered will include group­ing, reg­u­lar expres­sion match­ing and advanced mod­u­lar­iz­a­tion using modes and instruc­tions like xsl:apply-imports and xsl:next-match.

Other sessions in the track are XSLT Effi­ciency and Effectiveness taught by Michael Kay, Query­ing XML Data­bases with XQuery taught by Adam Ret­ter, and Trends in XSLT/XQuery taught by Florent Georges, while the other tracks during the week are XML Primer, Hands-on Introduction to XML, Publishing With XML, Semantic Technologies, Trends and Transients, and Hands-on Web Publishing. There's also the evening events, such as punting, the formal dinner, and the unconference session, where I'm lined up to present a lightning talk.

Whither Mentea?

Inasmuch as the last twelve months of on-site contracting has been more remunerative than any twelve month period of my usual mix of mostly-off-site consulting and on-site training, it’s time to consider what’s next for Mentea and what I’ll be doing come September: will I be a consultant, a contractor, or (gasp) even an employee?

I have enjoyed the work and the company of my co-workers, but there’s a few points to note:

  • Going “across the water” to England to work may be almost an Irish tradition, yet it has shown the undesirability of living away from home for extended periods
  • Since I’ve not known what I’ll be doing after the contract ends, I’ve kept doing work for some of my consulting clients at nights and weekends, but that hasn’t always got them results as quickly as they would like and, frankly, it made a very poor lifestyle choice
  • There’s been little time left for side projects (or, you may have noticed, for blog posts), yet I have many side projects related to XML, XSLT, and XSL-FO and would have more if I had the time – I don’t aspire to it, but I was interested to see that the .net awards has elevated side projects to being an award category of their own
  • As a contractor rather than an employee, I don’t get sick leave or holiday pay, so catching a cold can (and did) cost me money, but I’m able once the contract ends to have a long break visiting family on the other side of the world and then going to Balisage
  • As a contractor, I’ve also had the freedom to go to XML Prague and to the MultilingualWeb workshop in Rome without having to fret about departmental training budgets, how the events align with corporate goals, or using precious holiday days and my own money (though in a sense it was) if I did out of my own pocket, though I did miss the W3C “eBooks and I18n” workshop last week in Tokyo because of pressures of work, so to be a contractor isn’t to be a completely free agent, and if I was still or again a member of an active W3C WG, then multiple face-to-face meetings a year would strain my finances more than they would a large corporation’s

So what am I looking for?  Firstly, a good, long break before I address the question for real after Balisage in August. Secondly, to be based back in Ireland, at least most of the time. Beyond that, it’s undecided.  I’m not running away from consulting nor running towards either employment or more contracting. Consulting has been good to me, and been good for me since I can use a wide range of skills with different clients, but the difficulty has always been getting the right amount of work to arrive at just the right intervals so that I’m neither swamped nor starved for work.

Adapt Saxon-CE event model to XSL-FO?

Inasmuch as the Print and Page Layout Community Group at the W3C is looking at how to get feedback from the XSL formatter and I’ve also been reading about how Saxon-CE handles user input, I’m now wondering whether the same sort of pattern could be adapted to handling feedback from the XSL formatter.  Saxon-CE does it through template rules that match the element that receives the event and are in a mode that reflects the type of event, and similarly an XSL formatter could trigger on exceptional events such as overflow occurring or even on mundane events such as completion of a page sequence, and the templates in the corresponding modes could match on either FOs in the FO tree or areas in the area tree. Continue reading

generate-id() in xsl:attribute-set

Inasmuch as xsl:attribute-set is most often thought of for adding constant sets of XSL-FO properties, it’s easy to forget that, as it says in the XSLT 2.0 spec:

Evaluating the same attribute set more than once can produce different results, because although an attribute set does not have parameters, it may contain expressions or instructions whose value depends on the evaluation context. Continue reading

\Boot\BCD is missing required information

Inasmuch as a Windows partition that wouldn’t boot frustrated and inconvenienced me for nearly a week, and the solution, when I found it, took only a couple of minutes, I’m writing it up here.

The symptom when trying to boot into Windows was a black-and-white screen of death containing:

File: \Boot\BCD
Status: 0xc0000034
Info: The Windows Boot Configuration Data file is missing
  required information

The official Microsoft advice at http://support.microsoft.com/kb/927391/en-us didn’t help.  What did work was the second option, “Manually Repairing the Windows Bootloader”, from http://neosmart.net/wiki/display/EBCD/Recovering+the+Windows+Bootloader+from+the+DVD:

attrib -h -s C:\boot\BCD

del C:\boot\BCD
bootrec.exe /rebuildbcd

Happily, I didn’t need to do the third, “Nuclear Holocaust” option from that page.

XML Summer School 2012

Inasmuch as last year’s sessions were both enjoyable and well received, I’m teaching two sessions at XML Summer School again in September this year.

One, in the XSLT and XQuery track, is an update of the Developing and Testing in XSLT talk, again alongside Jeni Tennison, that got us such a good review last year:

Unit tests, pro­fil­ing, debug­ging and, increas­ingly, test-driven devel­op­ment are part of the bread and but­ter of work­ing with other pro­gram­ming lan­guages but are not always so with XSLT or XQuery. In test-driven devel­op­ment, which is a fun­da­mental part of agile approaches to soft­ware devel­op­ment, the developers write tests that describe the desired beha­viour of their applic­a­tion, then write code that meets the tests. This style of devel­op­ment keeps code focused, avoids break­ing exist­ing code and facil­it­ates refactoring.

In this ses­sion, Jeni Ten­nison and Tony Gra­ham will describe both the state of the art in test­ing and debug­ging XSLT and XQuery and how test-driven devel­op­ment applies to XSLT and XQuery devel­op­ment. In par­tic­u­lar, they will focus on the use of the XSpec test­ing framework.

The other, in the Publishing track, is XML and Publishing Workflows:

Some formats are bet­ter or worse than oth­ers for cap­tur­ing and/or rep­res­ent­ing the inform­a­tion for pub­lish­ing pur­poses. Can you cre­ate and man­age life-cycle work­flows which ration­al­ise or reg­u­lar­ise mixes of formats using XSLT and other XML tool­sets? Should XML be the begin­ning of your pub­lish­ing work­flow, the hub format in the middle, the res­ult, or all three? How can XSLT and related tools be used to cover up the defi­cien­cies or excesses of the source XML? What are the argu­ments for mov­ing authors towards sub­mit­ting in XML (or not)? For mov­ing editors?

Incor­por­at­ing both live examples and war stor­ies, Tony Gra­ham will lead an exam­in­a­tion of XML in pub­lish­ing work­flows, the advant­ages and dis­ad­vant­ages of using XML at each stage, and some of the tools and tech­niques avail­able to you.

XML Sum­mer School 2012 is on Septem­ber 16–21 2012 at St Edmund Hall, Oxford Uni­ver­sity.

Posted in XML

Robbery Under Arms

Inasmuch as I was in primary school in Australia when I first read it as a dead-tree book, it’s something of a turn for the books as well as a turn of the books that I’ve just finished reading Robbery Under Arms by Rolf Boldrewood as an EPUB while living and working in Ireland and, now, England.  I think at the time I would have found the medium even more unlikely than the geography, but as the ready availability of EPUB readers has given new life and new audiences to many out-of-copyright books, when I was first stocking up on EPUBs I specifically looked for the EPUB of Robbery Under Arms since I was unlikely to find it the dead-tree version in either an Irish library or an Irish bookstore.

“My name is Dick Marston” as the opening words of Robbery Under Arms may not have the recognition nor the ring of “Call me Ishmael” (though for a great young-adult read, Don’t Call Me Ishmael), but it is one of the great Australian novels.  If you want to read the EPUB, a search for ‘”Robbery Under Arms” EPUB’ will turn up several sources.