UTF-X test failed

I have recently downloaded a MARC to MODS style sheet from the LIBRARY of CONGRESS and attempted to use it out of the box to convert MARC to MODS. Although this worked, when I made a test for it and ran the UTF-X test suit over it the test failed. The reason for this was that the out of the box stylesheet was matching on “/” in the first template match.

When running UTF-X you have to specify the elements to match explicitly, for example if you want your stylesheet to match the root node element <marc:collection> you will have remove the original template match syntax

<xsl:template match=”/”>

and replace it with this:

<xsl:template match=”marc:collection”>

It is probably a good idea to only comment out the <xsl:template match=”/”> and put an explanation there incase somebody tries to use that stylesheet outside of the test environment and requires a root node match.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s