Good points, Mike. One should also take note that the HREF attribute is
required according to the XLink standard upon which the EAD linking
elements are based. It is currently not required by the existing EAD
DTD, but is required by the EAD Schema for validation. One should take
this into account when devising their best practice.
Mark Carlson
Computer Support Analyst
Special Collections Division
University of Washington Libraries
BOX 352900
Seattle, WA, 98195
(206) 543-1929
http://staff.washington.edu/carlsonm/
Mike Ferrando wrote:
> Lynn,
> The element EXTPTR is difficult to transform due to the many attributes it can possess. Some of these are actually logically mutually exclusive, but they are not governed by the DTD. The EXTPTR could point to an image, or draw an image into the document build. But there is no way of knowing which it will be. Even the attributes and their values do not help you. These attributes can be used in any combination and with any values (some enumerated).
>
> This means you will have to have a best practices, or write conditions into the template.
>
> If you want to get the SYSTEM value from an ENTITY, you can use:
>
> unparsed-entity-uri(@entityref)
>
> The location of the image, file size, image size, etc. may all result in a failed build.
>
> <xsl:value-of select="unparsed-entity-uri(@entityref)"/>
>
> Michele Combs' XSLT has you going in the right direction.
>
> Mike Ferrando
> Library Technician
> Library of Congress
> Washington, DC
> 202-707-4454
>
> ----- Original Message ----
> From: Michele Combs <[log in to unmask]>
> To: [log in to unmask]
> Sent: Wednesday, January 17, 2007 8:50:49 AM
> Subject: Re: Image and link help
>
>>>> [log in to unmask] 1/16/2007 4:47 PM >>>
>>> Can anyone help me get from this, in my xml doc:
>>> <extptr show="embed" actuate="onload" entityref="nyplogo"/>
>>> using an xsl template, to display the image.
>
> <xsl:template match="extptr">
> <xsl:choose>
> <xsl:when test="self::extptr[@show='embed']">
> <img src="{@xpointer}"
> alt="{@title}" align="{@altrender}"/>
> </xsl:when>
> <xsl:otherwise>
> <a
> href="{@xpointer}">"{@title}"</a>
> </xsl:otherwise>
> </xsl:choose>
> </xsl:template>
>
>
>>> Similarly, I need to get from the line below in my xml doc:
>>> <extref href="http://nypl.org/research/lpa/the/the.html";
> actuate="onload"
>>> show="new">http://nypl.org/research/lpa/the/the.html</extref>
>>> using an xsl template, to create line below in the resulting html
>>> <a href="http://nypl.org/research/lpa/the/the.html";
>>> target="_blank">http://nypl.org/research/lpa/the/the.html</a>
>
> <xsl:template match="extref">
> <a href="{@href}" target="_blank">
> <xsl:apply-templates/>
> </a>
> </xsl:template>
>
> Michele C.
>
>
> -=--=--=--=--=--=--=--=--=--=--=--=--=--=-
> Michele R. Combs
> [log in to unmask]
> Manuscripts Processor
> Special Collections Research Center
> Syracuse University Library
> 222 Waverly Avenue
> Syracuse, NY 13244
> (315) 443-2697
> -=--=--=--=--=--=--=--=--=--=--=--=--=--=-
>
>
>
>
>
>
> ____________________________________________________________________________________
> The fish are biting.
> Get more visitors on your site using Yahoo! Search Marketing.
> http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php
|