For the time being I have resolved my issue regarding my XSL stylesheets, and I have done so by removing the namespaces from my schema-based EAD files.
In short, I have two different types of valid EAD files: 1) DTD-based and 2) schema-based. Programmatically limited to the use of XSLT 1.0, I need to do three things: 1) transform the EAD into browsable HTML, 2) insert unitid's into each did-level element, if they don't already exists, and 3) extract each did-level element while feeding the result to Solr for indexing.
I had a process that worked just fine for the DTD-based EAD files, but when I started getting schema-based files (from Archivist's Toolkit), my process failed miserably -- namespaces. At first I thought I would update my various XSL files to include the namespaces, but that was too hard and unscalable, I think. "Copying" the schema-based EAD files sans namespaces seemed like the next best step, but in reality, "removing" the namespaces is/was a better approach. Ironically, after I articulated my problem more differently, and after using Google to search for something, I found the following XSL from the TEI Web space that works just fine:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="no" />
<xsl:apply-templates select="@*|node()" />
<xsl:value-of select="." />
With this in hand, my newly updated processing pipeline includes:
1. mirror EAD files from remote location
2. validate them against the DTD or schema
3. strip the name spaces from them
4. add unitids to each did-level element
5. extract the did-level elements
6. index the whole lot
This exact process works for my DTD- and schema-based EAD files. No checking necessary to see what kind of EAD file is in hand. My next step is to enhance my transformation into HTML process because some of my schema-based EAD files are richer in content.
Thank you for the helpful and useful replies. I will see about subscribing to the Mullberry XSL-Tech mailing list. Alas, I'm limited to the use of XSLT 1.0 and Perl -- Saxon and friends are not really an option right now. Many of the replies included code very similar to the stylesheet above. That tells me I'm on the right track. Yes, simply removing the namespaces is not ideal nor complete, but I will cross the xlink and camel-case bridges when I come to them. Software development is never done.
Eric Lease Morgan
University of Notre Dame