Mike,
Thanks for the help. After a week's work, I finally persuaded it to work.
The if statement turned out not to be necessary so the code was clean, but
finding the right place to put it turned out not to be obvious. Anyway,
thanks again for the help--much appreciated.
Judith
On Tue, 22 Apr 2008 13:49:56 -0400, Michael Rush <[log in to unmask]>
wrote:
>Judith,
>
>You are on the right track. Your EAD may validate, but if your stylesheet
>isn't taking the c02/scopecontent/@id and transforming that into some sort
>of anchor, the link won't work. I'd suggest taking that @id and either
>passing it on to an @id on whatever block your <scopecontent> is rendered
in
>- <div>, <p>, etc. - or creating an empty anchor tag, i.e. <a
>name="idvalue">. Off the top of my head, the XSL would look something
like
>this:
>
><xsl:template match="c02/scopecontent">
><div>
><xsl:if test="@id>
><xsl:attribute name="id">
><xsl:value-of select="@id"/>
></xsl:attribute>
><xsl:apply-templates/>
></xsl:if>
></div>
></xsl:template
>
>Or something like this:
>
><xsl:template match="c02/scopecontent">
><div>
><xsl:if test="@id>
><xsl:element name="a">
><xsl:attribute name="name">
><xsl:value-of select="@id"/>
></xsl:attribute>
></xsl:element>
><xsl:apply-templates/>
></xsl:if>
></div>
></xsl:template>
>
>I think the former is a cleaner more elegant solution.
>
>Good luck.
>
>Mike Rush
>
>____________________________________
>Michael Rush | [log in to unmask]
>Processing Archivist / EAD Coordinator
>Beinecke Rare Book & Manuscript Library
>Yale University
>P.O. Box 208240
>New Haven, CT 06520-8240
>Tel: (203) 432-8123 Fax: (203) 432-4047
>
>
>On Tue, Apr 22, 2008 at 1:35 PM, Judith Beale <[log in to unmask]> wrote:
>
>> I am trying to add internal links from a series (c01) scope content to a
>> subseries (c02) scope content. The source <ref> seems OK with the target
>> attribute, and the link target has a matching id attribute. The problem
>> seems to lie with the stylesheet which has a template to make <ref> the
link
>> source
>>
>>
>> <xsl:template match="ref">
>> <a href="#{@target}">
>> <xsl:apply-templates/>
>> </a>
>> </xsl:template>
>>
>> but it seems to need a template to make the C02 a link target. All the
>> advice I have found relate to TOC and that is not the situation here.
>> Someone else must have cracked this so I would appreciate any advice.
>>
>> Judith
>>
>>
>> Judith Beale CA
>> Senior Archivist
>> Department of Special Collections & University Archives
>> UCF Libraries
>> 407 823 3129
>>
>
|