Hi Chris
> There probably needs to be a distinction of media type between a
> TiddlyWiki _document_ that _contains_ tiddlers, a tiddler which _is_
> tiddlywiki text.
This all makes sense. In my code at the moment I'm using
`text/x-tiddlywiki` for wikitext and `application/x-tiddlywiki` for
tiddlywiki documents.
> 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.
I'll work with the vocabulary as a separate field when the time comes,
and see how it goes.
> 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.
Agreed.
> 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
I prefer the group 1 suggestions. The only thing that concerns me is
that we end up with the newly introduced unqualified content types
referring to a format that I at least hope will become obsolete in the
near future.
So, how would this look:
* application/vnd.tiddlywiki: a TiddlyWiki 5+ document (e.g empty.html)
* application/vnd.tiddlywiki2: a TiddlyWiki 2.x.x container document
* text/vnd.tiddlywiki: a tiddler of tiddlywiki 2.x.x text
* text/vnd.tiddlywiki2: 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",
>
> }
Parenthetically, the TW5 code puts all the user fields of a tiddler in
the tiddler.fields hashmap, which has turned out to be much more
convenient. The old way allowed one to write 'tiddler.title' instead
of 'tiddler.fields.title', but it made almost everything else more
complicated.
I wondered if we could make the use of the 'fields' hashmap optional
in the JSON representation, or is it too late for that? It feels like
an unwelcome artefact of the original TW design.
Best wishes
Jeremy
> --
> 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.
>
--
Jeremy Ruston
mailto:[email protected]
--
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.