|
Subject: [xsl] Inserting File Attributes Into XSLT Output From: Nathan Tallman <ntallman@xxxxxxxxx> Date: Wed, 12 Dec 2012 13:33:37 -0500 |
Using XSLT 1.0, is it possible to insert linked file attributes during
a transformation?
For example:
My XML:
<dao linktype="simple" href="ms0778.01.07.pdf" actuate="onrequest" show="new"/>
My XSLT:
<xsl:template match="dao">
<xsl:variable name="dao_title" select="preceding-sibling::unittitle/."/>
<xsl:choose>
<xsl:when test="self::dao[@role='bio']">
<img class="bio" src="{@href}" title="{@title}" width="180px" height="225px"/>
</xsl:when>
<!-- Default handling, loads object in a new window -->
<xsl:otherwise>
<a href="{@href}" target="_blank" title="{$dao_title}">[Digital
Archival Object]</a>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
XSLT Output:
<a href="ms0778.01.07.pdf" target="_blank" title="Personal.
1916-1965.">[Digital Archival Object]</a>
Desired XSLT Output:
<a href="ms0778.01.07.pdf" target="_blank" title="Personal.
1916-1965.">[Digital Archival Object, 2.5 MB]</a>
Many thanks,
Nathan
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] AW: extrem performance br, Andrew Welch | Thread | Re: [xsl] Inserting File Attributes, Wendell Piez |
| Re: [xsl] AW: extrem performance br, Andrew Welch | Date | Re: [xsl] Inserting File Attributes, Wendell Piez |
| Month |