Hello

I had need of the services of EZService the other day. Because I'm using METS for all our SIPs, instead of FOXML, I modified the XSLT to have an option for generating METS.

So that the FOXML and MODS output would have the same datastreams, I changed the structure from one monolithic template with lots of for-each loops, to several templates (for each format and for each datastream and instead of using for-each loops).

As the FOXML and METS are pretty much the same information in slightly different structures, and the information is all in the attributes, I used XSLT's attribute-sets, instead of repeating the same static values. And I made use of attribute value templates (e.g. ID="{@pid}") for dynamic attribute values.

I also changed one of the functions, from 'replace' to 'translate'. The effect is the same for replacing single characters, but it means that the stylesheet can be used by other XSLT processors which only support 1.0 functions.

I've attached modified ezdef and ezdep stylesheets and an ezcommon stylesheet which is included by both and contains common templates, global params and variables and the attribute sets.

I tested the FOXML output against the original stylesheets' (changing relative namespace URIs and using xmllint's c14n flag) and they are identical. The METS output looks fine and ingests fine, though I'm not sure how to test that it works, as I haven't yet created a new service.

I don't know if you want to put them on the wiki or in the bin.

Swithun.

--
The University of St Andrews is a charity registered in Scotland: SC013532

Attachment: ezdef.xsl
Description: ezdef.xsl

Attachment: ezdep.xsl
Description: ezdep.xsl

Attachment: ezcommon.xsl
Description: ezcommon.xsl

------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger. 
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today. 
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
Fedora-commons-users mailing list
Fedora-commons-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Reply via email to