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:


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

----- 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:when test="self::extptr[@show='embed']">
                                          <img src="{@xpointer}"
alt="{@title}" align="{@altrender}"/>

>>Similarly, I need to get from the line below in my xml doc:
>> <extref href="";
>> show="new"></extref>
>> using an xsl template, to create line below in the resulting html
>> <a href="";
>> target="_blank"></a>

    <xsl:template match="extref">
        <a href="{@href}"  target="_blank">

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.