The following situation arises routinely in our XML documents, in which
there are sometimes multiple unit dates contained within a unit title
tag, e.g.
<unittitle>ABC<unitdate>1994-1996</unitdate><unitdate>2003-2006</unitdate></unittitle>
Ideally, we'd like to format this information (in html) in one of two ways.
1.Multiple lines, unit date children enclosed in parentheses on new lines.
ABC
(1994-1996)
(2003-2006)
2. Single line, unit title followed by a colon, and unit dates followed
by commas
ABC: 1994-1996, 2003-2006
How would you write a generic template or rule in XSLT to ouput these
cases, taking into account the possibility for both singular and
multiple unit dates, i.e. in the second example "don't follow a unit
date by a comma if it is the only unit date."
Thanks!
Jaime Margalotti, University of Delaware
--
Jaime L. Margalotti
Assistant Librarian
Special Collections Department
University of Delaware Library
Newark, DE 19717-5267
302-831-0554
[log in to unmask]
|