I am using <xsl:number count=""> to generate series and subseries links for the TOC and the DSC portion of my finding aids. (I am partial to the "count" function rather than the random id option because it looks cleaner and is more intelligible to the user, but I can be persuaded otherwise.) Here's my problem. The c02 links in the TOC do indeed jump to the body of the DSC, but they only jump to the subseries in the first series. So, for example, if I click "3.6" in the TOC, it jumps to "1.6" in the finding aid. I think there's some sort of nesting problem here. It's been suggested that I post some of my code to show you all what I'm working with. Below is the way my code for generating c01 and c02 links currently looks for the Table of Contents list. I have added the text "THIS LINE SEEMS TO BE THE PROBLEM--->" where I think I need to change something. ***<!--C01 AND C02 LINKS--> <xsl:for-each select="archdesc/dsc/c01[@level='series' or @level='subseries' or @level='subgrp' or @level='subcollection']"> <p> <a> <xsl:attribute name="href"> <xsl:text>#series</xsl:text> <xsl:number count="c01" from="dsc"/> </xsl:attribute> <xsl:choose> <xsl:when test="did/unittitle/unitdate"> <xsl:for-each select="did/unittitle"> <xsl:value-of select="text()"/> <xsl:text> </xsl:text> <xsl:apply-templates select="./unitdate"/> </xsl:for-each> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="did/unittitle"/> <xsl:text> </xsl:text> <xsl:apply-templates select="did/unitdate"/> </xsl:otherwise> </xsl:choose> </a> </p> <xsl:for-each select="c02[@level='subseries']"> <p style="margin-left:15pt"> <a> <xsl:attribute name="href"> <xsl:text>#subseries</xsl:text> THIS LINE SEEMS TO BE THE PROBLEM---> <xsl:number count="c02" from="dsc"/> </xsl:attribute> <xsl:choose> <xsl:when test="did/unittitle/unitdate"> <xsl:for-each select="did/unittitle"> <xsl:value-of select="text()"/> <xsl:text> </xsl:text> <xsl:apply-templates select="./unitdate"/> </xsl:for-each> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="did/unittitle"/> <xsl:text> </xsl:text> <xsl:apply-templates select="did/unitdate"/> </xsl:otherwise> </xsl:choose> </a> </p> </xsl:for-each> </xsl:for-each> <!--END CO1 AND C02 LINKS-->*** Now, here's my c02 code in the DSC. Note that, because our library's stylesheet does weird things with any <a> tag, I have replaced the normal <a name="subseries"> referent with an "id='subseries'" attribute. No big thing. ***<xsl:template name="c02-level"> <xsl:for-each select="did"> <tr valign="top"> <td> </td> <td colspan="7"> <xsl:attribute name="id"> <xsl:text>subseries</xsl:text> THIS LINE SEEMS TO BE THE PROBLEM---> <xsl:number from="dsc" count="c02"/> </xsl:attribute> <xsl:call-template name="component-did"/> </td> </xsl:for-each>*** Thanks! Sorry to keep gumming up the listserv. Best, Jordon Jordon Steele Archivist Biddle Law Library University of Pennsylvania Law School (215) 898-5011 -----Original Message----- From: Encoded Archival Description List [mailto:[log in to unmask]] On Behalf Of Mike Ferrando Sent: Monday, April 16, 2007 11:58 AM To: [log in to unmask] Subject: Re: Table of Contents links to c01 and c02 tags Jordon, I think it would be a good idea for you to post some of your code. Mike Ferrando Library Technician Library of Congress Washington, DC (202) 707-4454 ----- Original Message ---- From: Jordon Steele <[log in to unmask]> To: [log in to unmask] Sent: Monday, April 16, 2007 11:36:30 AM Subject: Re: Table of Contents links to c01 and c02 tags Thanks, Michele. I like the "count" option, and it works fine for the c01 tags, but any idea how to achieve that differentiation among c02 tags? Basically, right now all it's doing is jumping to the first set of subseries, no matter which subseries link I click on in the TOC. Thanks, Jordon Jordon Steele Archivist Biddle Law Library University of Pennsylvania Law School (215) 898-5011 -----Original Message----- From: Encoded Archival Description List [mailto:[log in to unmask]] On Behalf Of MicheleR Sent: Saturday, April 14, 2007 12:03 PM To: [log in to unmask] Subject: Re: Table of Contents links to c01 and c02 tags Hi Jordon -- It's a two-part process; you didn't mention which part you need, so here's both. Part 1 is making sure that the c01s and c02s in the body of the inventory have an ID to link to; this is done in the dsc# style sheet. Part 2 is adding a listing in the TOC that links to the correct IDs; that's done in the eadcbs# style sheet. IDs can be fixed (via use of the id attribute in EAD) or generated during transformation; the former is obviously more reliable. The code for part 1, inserting the ID in the body of the inventory resides in whatever dsc style sheet you're using and looks something like this for fixed IDs: <xsl:if test="@id"> <a id="{@id}"> (blah blah, usually unittitle goes here) </a> </xsl:if> Part 2, putting the listing in the TOC, is done something like so for fixed IDs: <xsl:for-each select="archdesc/dsc/c01[@level='series' or @level='subseries'] or archdesc/dsc/c02[@level='subseries']"> <p> <b> <a href="#{@id}"> (blah blah, usually unittitle goes here) </a> <b> </p> There is a generate-id function that will create ids during transformation: <a href="#{generate-id(.)}"> but it can be problematic for a couple of reasons. First, since the IDs are recreated every time you run a transformation you don't know what they'll be at the time you're creating the TOC. Second, if you have any internal links to c01s or c02s, you won't know what href to use in your EAD since the IDs haven't yet been generated and may be different each time. If you're really set on generating IDs during transformation, a more reliable way is to generate IDs by counting the number of c01s/c02s, something like this: <xsl:attribute name="href"> <xsl:text>#series</xsl:text> <xsl:number count="c01" from="dsc"/> </xsl:attribute> This will work easily for c01s since there's only one set of c01 tags at the top level, but you'd have to somehow differentiate between the c02s that are children of different c01s. Caveat: if you're employing that feature that automatically links lists in the <arrangement> element to their respective inventory items (in eadcbs9 it's the section that begins "<!-- The next three templates format a list within an arrangement..."), that uses the "count" function and switching to the fixed-id method will require repairs to that feature. Michele Jordon Steele wrote: > Hello, > > Does anyone know what code to use to create links between series and > subseries titles in the table of contents to the corresponding c01 and > c02 tags in the body of the finding aid? I think I tweaked this part of > the code on my stylesheet a little too much, and I forgot what the > original code was! > > If it helps, I'm using a customized version of eadcbs9.xsl as my primary > stylesheet. > > Thanks, > > Jordon > > Jordon Steele > Archivist > Biddle Law Library > University of Pennsylvania Law School > (215) 898-5011 > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com