Re: [xsl] Retrieve images from a RSS feed

Subject: Re: [xsl] Retrieve images from a RSS feed
From: "M. David Peterson" <m.david@xxxxxxxxxxxxx>
Date: Sun, 20 May 2007 11:12:32 -0600
On Fri, 18 May 2007 07:47:08 -0600, Rien van Herpen (@Home)
<R.van.Herpen@xxxxxxx> wrote:

OK, do you known an extension function that can do this ?

Was doing some work on something somewhat related so wrote a quick extension function to handle this. I'm not sure how well versed you are with the .NET platform, so I am assuming that what follows will simply make sense. If it does not, then my apologies.

http://extf.googlecode.com/svn/trunk/Xameleon/Function/FileStream.cs

This will work with Saxon-N 8.9+.  You would need to compile the above
code into an assembly (you're welcome to access the same project I placed
this in and use that if you'd like, but the functionality goes well beyond
extension functions and as such is probably quite a bit more than what you
would want/need), make sure that assembly is signed, install that assembly
into the GAC, and then access the method using something similar to,

<xsl:variable name="file"
    select="file:SaveExternalFile('http://s3.amazonaws.com/m.david/xslt/evee
l_plan/XSLnT.png',
'/tmp/foo.png')"
    xmlns:file="clitype:Xameleon.Function.HttpFileStream?asm=Xameleon;ver=1.
0.0.0;sn=8974f7aaf62d3d0f"/>

inside of your transformation file, where the value of sn is the public
key that the assembly was signed with.  To gain access to that
information, as long as you have the assembly installed into the gac,

via MS.NET: gacutil /l Xameleon
via Mono: gacutil -l Xameleon

(replacing "Xameleon" with the short name of the assembly.)

Hope this helps!

--
/M:D

M. David Peterson
http://mdavid.name | http://www.oreillynet.com/pub/au/2354 |
http://dev.aol.com/blog/3155

Current Thread