Hi Nathan,
I have a generic style sheet that I adapt for tasks just like this.
It's pretty simple XSLT. I took the liberty of adapting it for your
purpose. I haven't tested this at all, but I think it will serve the
trick. The xslt assumes a schema-valid file - you'll have to adapt it
for a DTD valid file.
Let me know if it works.
On Fri, Oct 28, 2011 at 10:39 AM, Nathan Tallman <[log in to unmask]> wrote:
> Is it possible to write an XSL stylesheet to flatten the controlled access
> terms? We'd like to shift from encoding like this:
> <controlaccess>
> <head>Search Terms</head>
> <note>
> <p>The following terms have been used to index the description of this
> collection in
> the American Jewish Archives's online catalog.</p>
> </note>
> <controlaccess>
> <head>Contributors</head>
> <persname source="lcnaf" encodinganalog="700" />
> </controlaccess>
> <controlaccess>
> <head>Subjects</head>
> <persname encodinganalog="600" source="lcnaf" />
> <corpname encodinganalog="610" source="lcnaf" />
> <subject source="lcsh" encodinganalog="650" />
> <occupation encodinganalog="656" source="lcsh" />
> <geogname encodinganalog="651" source="lcnaf" />
> </controlaccess>
> <controlaccess>
> <head>Genres</head>
> <genreform encodinganalog="655" source="lcsh">LCSH</genreform>
> </controlaccess>
> </controlaccess>
> to this:
> <controlaccess>
> <head>Search Terms</head>
> <note>
> <p>The following terms have been used to index the description of this
> collection in
> the American Jewish Archives's online catalog.</p>
> </note>
> <persname source="lcnaf" encodinganalog="700" />
> <persname encodinganalog="600" source="lcnaf" />
> <corpname encodinganalog="610" source="lcnaf" />
> <subject source="lcsh" encodinganalog="650" />
> <occupation encodinganalog="656" source="lcsh" />
> <geogname encodinganalog="651" source="lcnaf" />
> <genreform encodinganalog="655" source="lcsh" />
> </controlaccess>
> </controlaccess>
> And let the HTML/PDF stylesheets do the sorting. Alas, I have about 800
> finding aids encoded in the former example that need to be converted. Any
> help would be much appreciated!
> Many thanks,
> Nathan
|