[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Inserting File Attributes Into XSLT Output

Subject: RE: Inserting File Attributes Into XSLT Output
From: Michele R Combs <mrrothen@xxxxxxx>
Date: Wed, 12 Dec 2012 19:56:39 +0000
RE:  Inserting File Attributes Into XSLT Output
I assume the tidbit of linked data you want to grab and insert is the "2.5 MB"
?  Am I correct in thinking you're wanting to harvest the file size directly
from the PDF, or does it live in some other XML or metadata file?

Michele

-----Original Message-----
From: Nathan Tallman [mailto:ntallman@xxxxxxxxx]
Sent: Wednesday, December 12, 2012 1:34 PM
To: xsl-list
Subject:  Inserting File Attributes Into XSLT Output

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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.