How to deal with missing wantlist from an IEPD?

Occasionally, you may find yourself needing a wantlist that does not exist. This typically occurs when dealing with older IEPDs from the GJXDM era.

Why you might need the wantlist?

1) You need to make modifications to GJXDM subset schemas. The SSGT cannot import subset schemas. Instead, it needs a wantlist. If you have the subset schemas but no wantlist, then you can't modify the subset schemas with the SSGT.

2) You need to migrate a GJXDM IEPD to the NIEM. The NIEM Migration Tool requires a wantlist from which to migrate. Again, if you only have the subset schemas, you can't use the tool.

A quick aside here: If your problem is that you have a GJXDM 3.0 or 3.0.2 wantlist and see that the Migration Tool only supports GJXDM 3.0.3 wantlists, the solution is simple. Open the wantlist file in a text or XML editor and simply change the version number to 3.0.3. Because GJXDM 3.x versions are backwards compatible, earlier versioned wantlists cannot have anything in them that isn't also in version 3.0.3. So you can safely rename the version and use that for migration.

Why is it missing?

In many cases, the wantlist doesn't exist simply because the IEPD predates the advent of wantlists in the Subset Schema Generation Tool (SSGT). The SSGT initially had no way of saving a partially completed subset. Wantlists were originally a means for a user to save their place. The wantlists themselves later became the standard for listing needed elements and types.

In other cases, the subset schemas may have been created in tools other than the SSGT, which may not have also produced a wantlist.

Additionally, some subset schemas were actually created by hand, in standard XML editors, or even in text editors.

Finally, there may have once been a wantlist at the time subset schemas were created for an IEPD, and yet it may have been omitted from a published IEPD through neglect or oversight.

What to do about it?

There are a few alternatives. The first one is to simply re-select all the elements in the SSGT. In the case of a minimal exchange, this may be the simplest method. In other cases, this will be a long and tedious process.

Another alternative is to create a tool to read the subset schemas and produce a wantlist. The format for wantlists is standardized and publicly available. It is also fairly simple. XSLT would be an good basis for such a tool.

A final alternative is to find someone who has already created such a tool. One example is gotWantlist, a whimsically named tool hacked together quickly to create wantlists while migrating some very old GJXDM IEPDs.

As an admitted hack, gotWantlist comes with a laundry list of requirements and caveats.

Firstly, gotWantlist is written in PHP5, so PHP5 must be installed, either locally or on a web server somewhere. The code can either be run from the command line, directing the output into a file. Or it can be saved on a web server somewhere and run via a browser, saving the output as plain text.

Using gotWantlist requires a small bit of preparation. Here are the steps:

1) Save your GJXDM subset somewhere. (Really, all you need is the "3.0.2/jxdm.xsd" file.)

2) Put gotWantlist.php in the "jxdm" directory for the subset.

3) Open "jxdm.xsd" in a text editor and delete all the "xsd:" occurrences. It's just a simple search and replace. Save it as "f-jxdm.xsd". The reason is that the code was a quick hack using PHP's SimpleXML parsing, which was choking on namespaces. This workaround was faster than trying to figure out the namespace problem.

4) Run gotWantlist.php. It'll parse through "f-jxdm.xsd" and output a wantlist to standard output.

gotWantlist is GPLed. Feel free to use it or share it within the confines of the GPL. The code comes with absolutely no guarantee of any kind.

The code can be obtained from the NISS Helpdesk.