xsl-list
[Top] [All Lists]

Re: [xsl] Re: Inserting File Attributes Into XSLT Output

2012-12-13 04:39:54
2012/12/12 Liam R E Quin <liam(_at_)w3(_dot_)org>:
On Wed, 2012-12-12 at 16:19 -0500, Nathan Tallman wrote:
Was trying to find a way to inform the user of the linked
PDF file size, so they can download instead of opening in the browser,
if they so choose.

There's an ls2xml script floating around, and David Lee's xmlsh may be
able to do it too, in both cases by creating an auxilliary XML file
containing the file sizes. Or write a short program to do it, depending
on your operating environment (Linux, VMS, Solaris, Microsoft Windows
3.11, etc.)

Here's a small Java application that generates an XML listing of a
given directory:
http://code.google.com/p/xml-dir-listing/

It works flawlessly in my experience.

If each filename is unique (if no two files in different directories
have the same name) you can retrieve the size of each file with a key
on the 'file' element / 'name' attribute of the generated XML dir.

Regards,
EB

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--