On Fri, 13 Jul 2012, Jeremy Ruston wrote:

I'm now worried that we're talking at cross purposes. I'm talking
about the content type that may be stored in the 'type' field of a
tiddler. It seems that you are talking about the content type used to
represent a TiddlyWiki serialisation of a bunch of tiddlers. I agree
that in the latter case you will need two distinct content types for
the two different varieties of TiddlyWiki that will be wrapped around
the serialised tiddlers.

I am talking about both implementations, but they both use the same
concept: Media types. I want to make sure that concept maintains its
health and simplicity throughout the ecosystem.

A single tiddler which is requested for the default type (e.g.
"Accept: */*") will be presented according to its 'type' field. If
that type field is recognized as "renderable", the tiddler text will
be rendered into HTML.

Is there such a distinction between the two uses of content types, or
am I just getting more confused?

Well, you've introduced, or at least reminded, of an important point,
which ought to be addressed at some point:

There probably needs to be a distinction of media type between a
TiddlyWiki _document_ that _contains_ tiddlers, a tiddler which _is_
tiddlywiki text.

In that scenario we still need to distinguish between tiddlywiki 2 and
5:

* wiki text with 2 syntax
* wiki text with 5 syntax
* a TiddlyWiki document
* a TiddlyWiki5 document

Each type of document can clearly contain tiddlers of various types.

The current tiddlywebwiki package sort of conflates the two media type
types (ugh) in large part because we were inclined to do what people
might expect (descriptive rather than prescriptive, in that particular
case) . The details of the implementation are not quite that
crystal clear though: a tiddler with no type or type of "None" is
considered to be tiddlywikitext (2) to handle existing tiddlers.

In any case we're left with needing some media types and I contiue to
think that simple explicit types (without parameters) are best.
Parameters that are _only_ going to be used by renders could be fields
on the tiddler, not custom things in type. That is: custom stuff
should go where custom stuff goes, and type should be left more tidy.

Possible media type ideas follow. These are just pulled out of my head
to engender discussion. I'mm not a fan of vnd., always preferred x- or
x., but I've been told vnd is more kosher, so that's what I'm using in
the examples below. I'm also not a fan of "application", but it might
actually be an accurate distinguisher here.

Group 1:

* application/vnd.tiddlywiki: a TiddlyWiki document (e.g empty.html)
* application/vnd.tiddlywiki5: a TiddlyWiki 5 container document
* text/vnd.tiddlywiki: a tiddler of tiddlywiki text
* text/vnd.tiddlywiki5: a tiddler of tiddlywiki 5 text

Group 2:

* text/vnd.tiddlywiki
* text/vnd.tiddlywiki5
* text/vnd.tiddlywikitext
* text/vnd.tiddlywiki5text

Then a tiddler which has a special vocab

 {
  "title": "hello",
  "fields": {
    "_vocab": "http://tiddlywiki.vocabs.com/some/vocab/uri";
  },
  "type": "text/vnd.tiddlywiki5",
 }
--
Chris Dent                                   http://burningchrome.com/
                                [...]

--
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tiddlywikidev?hl=en.

Reply via email to