Work

From iXML to XSpec

Year: 2025
Type: conference-paper
Abstract: In the autumn of 2024, I attended the XML Summer School and persuaded (it wasn’t difficult) Stephen Pemberton to tack a session on iXML onto the end of his course on XForms. On the bus home, I made a start on my first iXML grammar. Within a week I had encountered a character encoding mystery and whitespace challenges, lost a day naming things and was working on repurposing XSpec for testing iXML grammars. In my opinion, learning to write an Invisible XML grammar is no more difficult that learning any other schema language and is worth the effort if you have a use-case where it would be useful. Although I would recommend that for your first grammar you too seek out a textual input that already has a very clearly defined, simple, stable and small content model. It was a relief to confirm that there are viable options other than eyeballing for testing an iXML grammar during development, not least because the notation for an iXML grammar is quite symbol-heavy which can make typos tricky to spot. Tests are also important in the maintenance of a grammar though, so that developers can fix bugs or extend the content model with greater confidence that their changes haven’t introduced unintended side-effects. Especially if the person making the change wasn’t involved in writing the grammar originally — or even if they were but it’s been a long time since they worked on it. Once the invisible-xml() XPath/XQuery function is more widely supported it will be trivially easy to use XSpec to test an iXML grammar, per the approach proposed by Amanda Galtman. And if you already have the option to do so using XQuery, BaseX and Markup Blitz then you should try it out; it’s not complicated.
Language: English
Open Access status: hybrid
OpenAlex ID: W4414922627
FWCI:
Cites:
Cited by:
Related to: