Two issues with this solution.
1. Inserting the apply-templates select="dao" statement into component-did-core solves the problem of invoking the dao template but it leaves the image hanging in the middle of a <table> but outside any <td>. I wonder if this will cause a positioning problem for other images that are not full screen, problems that are not apparent in this case.
2. I don't understand the suggestion to reposition the dao template within eadcbs6. Is it simply a matter of personal preference? I see no XSL reasons for preferring one location over another and it works well where it is. Am I missing something?
Michael
-----Original Message-----
From: Encoded Archival Description List [mailto:[log in to unmask]]On Behalf Of
Mark Carlson
Sent: Wednesday, April 13, 2005 10:18 AM
To: [log in to unmask]
Subject: Re: Linking jpegs using <dao>
Linda: At line 100 in dsc15.xsl (this is in the named template section
<xsl:template name="component-did-core">) find the following line:
<xsl:apply-templates select="physdesc"/>
Insert this line after that:
<xsl:apply-templates select="dao"/>
Then, in eadcbs6.xsl, move the dao template clear to the bottom of the
stylesheet, just before the <xsl:include element> and closing
<xsl:stylesheet> element:
<xsl:template match="dao[@show='new']">
<img src="{@href}">
<xsl:apply-templates/>
</img>
</xsl:template>
<!--Insert the address for the dsc stylesheet of your choice here.-->
<xsl:include href="dsc15.xsl"/>
</xsl:stylesheet>
There are a number of other points I would make about your <dao>
attributes and what you are intending to do, but this will at least get
things working for you.
On Wed, 13 Apr 2005, Linda Raditz wrote:
> Good morning. I tried pasting the template you sent into the stylesheet and
> coded the xml document (using XMetal), but it's not working and I'm not sure
> what I'm doing wrong. When I transform the document into html (using
> Notetab) I don't see a link at all. I've attached the stylesheets and xml
> document (this is a finding aid in progress) in case you have a second or
> two to spare for me. Again, I really appreciate your help.
>
> Have a great day,
> Linda
> -------------
>
> Linda Machado Raditz
> Archivist
> Freer Gallery of Art and Arthur M. Sackler Gallery Archives
> Smithsonian Institution
> P.O. Box 37012, MRC 707
> Washington, DC 20013-7012
> Telephone: 202-633-0329
> Fax: 202-357-4911
> http://www.asia.si.edu/
>
>>>> [log in to unmask] 04/12/05 04:08PM >>>
> Probably doesn't matter really as the <xsl:include> that pulls dsc15 into
> eadcbs6 creates in essence one virtual stylesheet but for my own practice, I
> like to include gneralized templates like this towards the beginning of the
> base stylesheet.
>
> -----Original Message-----
> From: Encoded Archival Description List [mailto:[log in to unmask]]On Behalf Of
> Linda Raditz
> Sent: Tuesday, April 12, 2005 2:54 PM
> To: [log in to unmask]
> Subject: Re: Linking jpegs using <dao>
>
>
> Michael,
>
> Thanks for your quick response. I'm using the cookbook stylesheet eadcbs6
> and dsc15 - do I include the template in eadcbs6 or dsc15?
>
> Thanks again for your help,
> Linda
>
>>>> [log in to unmask] 04/12/05 03:06PM >>>
> Linda,
> This is a two step process.
>
> 1. In your finding aid, you obviously have to include a pointer to
> the
> image file in your encoding of each <dao>. Assuming that this is a url in
> an HREF attribute, it might look like this.
>
> <dao show="embed" href="picture.jpg"/>
>
> 2. You need to include a template like the following in your
> stylesheet to create the link from the <dao> element to the digital image
> file.
>
>
> <xsl:template match="dao[@show='embed']">
> <img src="{@href}">
> <xsl:apply-templates/>
> </img>
> </xsl:template>
>
> In the example above, this would generate the following in your HTML
> output.
>
> <img src="picture.jpg">
>
> Michael
>
>
> -----Original Message-----
> From: Encoded Archival Description List [mailto:[log in to unmask]]On Behalf Of
> Linda Raditz
> Sent: Tuesday, April 12, 2005 1:19 PM
> To: [log in to unmask]
> Subject: Linking jpegs using <dao>
>
>
> I am trying to encode a finding aid and am having problems linking to the
> jpegs. I have jpegs of every item described in the inventory of this
> finding
> aid and I would like to link to the component description to the jpeg. I'd
> like to use <dao> . I've tried inserting <dao> and setting the attributes,
> but when I transform my file to html there is no link. Do I need to add
> something to my stylesheet to do this? Should I use a linking tag other
> than
> <dao>? I'm sorry if the answer is obvious - my ead skills are rusty (at
> best) and I've never tried to link to an outside file before.
>
> Any help is much appreciated!
>
> Linda
> -----------------------
>
> Linda Machado Raditz
> Archivist
> Freer Gallery of Art and Arthur M. Sackler Gallery Archives
> Smithsonian Institution
> P.O. Box 37012, MRC 707
> Washington, DC 20013-7012
> Telephone: 202-633-0329
> Fax: 202-357-4911
> http://www.asia.si.edu/
>
|