[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Template IO (was: ProtocolDataModel issues)




Ezra Cooper wrote:



On Sep 14, 2004, at 2:45 PM, Robert Sayre wrote:


Ezra Cooper wrote:

  * Templates
      - template body
      - name
      - target filename


Could this be rephrased as
- content
- MIME type
- title
- URI


Is "URI" the for the XML Atom resource, or for the public HTML file?

I was groping for a way to determine the URLs of the public HTML files. We could certainly have a static URL field to be used for templates that only generate one HTML file. However, a common scenario is that where one template will generate many HTML files, at URLs determined by a given pattern. If we wanted to get fancy, we could make the "URI" field MIME-typed, like the content field, so that you could use a template language to specify the scheme of URLs generated by that template. Clients could treat it as a vanilla text box, or they could provide UI help for certain URL-template languages.

Oh... this is much more involved than what I was thinking of. I had a SimpleResource in mind, with a title property and maybe some notion of templateness. The URI would be where you PUT the template to update it.


Now I understand that "target filename" was supposed to be roughly analogous to the "output file" in Movable Type. For those not familiar with MT template configuration, here's a screenshot:

http://franklinmint.fm/archives/images/mt_interface.jpg

The output filename seems to be way a to say that resource/collection A is a view of resource/collection B (the view is probably limited in quantity, time frame, etc).

so B --> template --> A

or

B --> [input set] --> template --> [output set] --> A

So the question is whether the input and output selection can be specified in an interoperable manner. I'm pessimistic, but if the WG can come to consensus, great.

In other words, I think "output file" is really part of MT's template format. In WebDAV terms, an extension property. My feeling is that by leaving this up to MIME, there's space for future standardization work on templating.

Robert Sayre