Aaron –


We use this stylesheet to sort by unitid:


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xlink="http://www.w3.org/1999/xlink"
    exclude-result-prefixes="marc xlink">
<xsl:output omit-xml-declaration="yes" encoding="UTF-8" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="node()|@*">
<xsl:apply-templates select="node()|@*"/>

<xsl:template match="c01">
<xsl:apply-templates select="@*"/>
<xsl:apply-templates select="c02">
<xsl:sort select="./did/unitid" data-type="text"/>


Perhaps you can use it as a guide to craft your own.


Best regards –




Bertram Lyons, CA

Digital Assets Manager / Folklife Specialist

American Folklife Center

Library of Congress



From: Encoded Archival Description List [mailto:[log in to unmask]] On Behalf Of Cusick, Aaron M
Sent: Wednesday, April 09, 2014 2:40 PM
To: [log in to unmask]
Subject: sorting by unitid




I have a container list in a finding aid that I would like to be able to sort ascending by the unitids, which are currently out of order. The basic structure is:


<c01 level=”series”>

               <c02 level=”file”>









I am not familiar enough with xslt to make this work on my own. Could anyone assist me by providing a basic stylesheet? Thanks.


Aaron Cusick

Digital Services Section
State Archives of North Carolina
4614 Mail Service Center
Raleigh, N.C. 27699-4614
[log in to unmask]

E-mail correspondence to and from this address may be subject to the North Carolina Public Records Law "NCGS.Ch.132" and may be disclosed to third parties by an authorized state official.