Oxygen add-on hosted on GitHub

Inasmuch as I’m going to be authoring test files for the XSLT 3.0 testbed, I wanted an easy way to use Wendell’s oXygenJATSFramework. The easiest way would have been as an Oxygen framework add-on, but there wasn’t yet one. Since (unsigned) framework add-ons can be Zip archives and I’d recently downloaded archived releases from other GitHub projects, I did some experimenting and got GitHub to host the framework descriptor and the framework add-on itself.

GitHub releases are Zipped or tarred-and-gzipped archives containing a top-level directory that contains a copy of the code as of that release, and Oxygen expects a framework add-on to be a Jar file or Zipped archive containing a top-level directory that contains the framework XML file, so the Zipped option is a natural fit. All I had to do to the current oXygenJATSFramework project was move everything up one level so the framework XML file is at the top level in the repository and all the relative links in the framework file continued to work.

Creating releases on GitHub is straightforward: all you really need is to specify a tag, e.g., v1.0.0, that is appended to the project name to make the name of that top-level directory in the archive. You can also add a title and description that will show up on GitHub but won’t make any difference to using the release as an Oxygen add-on.

GitHub release
GitHub release

The important part is the URL of the “Source code (zip)”.

Oxygen add-on descriptors are, unsurprisingly, XML files, and, just as unsurprisingly, Oxygen comes with a Oxygen add-ons update site template. When you create the descriptor, insert the location of the Zip version of the release as the value of xt:location/@href:

<xt:extensions xmlns:xt="http://www.oxygenxml.com/ns/extension"
    xsi:schemaLocation="http://www.oxygenxml.com/ns/extension http://www.oxygenxml.com/ns/extension/extensions.xsd">
    <xt:extension id="v0.0.2">
        <xt:location href="https://github.com/MenteaXML/oXygenJATSframework/archive/v0.0.2.zip"/>
        <xt:description xmlns="http://www.w3.org/1999/xhtml"></xt:description>

You can try the framework descriptor out locally, or you can go ahead and commit the descriptor into your local Git repository and push it to GitHub.

When registering the GitHub version of the add-on descriptor with Oxygen, use the URL of the Raw version of the file:copy-link-locationas the add-on URL:

'Raw' URL as add-on siteOther than that, it’s just like adding any other Oxygen add-on, and soon you’ll be able to use the framework from the GitHub-hosted add-on within your Oxygen:

Templates provided by add-on