On May 14, 2008, at 10:18 PM, James M Snell wrote:
I hadn't pursued it because I did not detect a lot of interest at the time, but I've toyed with the idea of a x:link-template extension element modeled after atom:link but using URI Templates, e.g.<x:link template rel="..." pattern="http://example/{foo}" title="..." /> Child elements can be used to describe the parameters if necessary. - James
Hi James,I was kicking around the idea of URI templating after I saw it in the OpenSearch spec. I was actually thinking of using it in a different context--pointing to different qualities of the images I serve. The full resolution images run around 50MB as jpegs, so I also provide 1/2 res and 1/4 res versions to get the file size down. Instead of adding a link to the different quality of images to each entry, I was going to make a template element at the feed level. The main stumbling block I was running into was interactions between mirror and quality. You've got two parameters in the template, mirror and quality, and things become difficult when a mirror doesn't mirror all of the qualities. It could work if I put the mirroring stuff in the service document, then the actual feed could use a template to specify the different qualities:
<x:link-template rel="..." v:quality="low" pattern="http://mirror/low/ {file}"/> <x:link-template rel="..." v:quality="medium" pattern="http://mirror/medium/ {file}"/> <x:link-template rel="..." v:quality="high" pattern="http://original/high/ {file}"/>
In this case the mirror has all of the low and medium quality images but not the high quality images. For the latter, it points back to the original location.
Just writing it out here, though, I haven't convinced myself that this is the best way, so I need to think about it a bit more.
Cheers, Josh