On mandag 24 januar 2005, 18:40, justin+earth@dicatek.com wrote:
Or perhaps I'm misunderstanding, since you mention the "fragment" method. But if you're going to provide a method to return a fragment, the limitations of whatever module you get to do the heavy lifting aren't relevant, surely.
Well, it could be, if it can't return a fragment, the behaviour has to be defined...
I would imagine it can't be too difficult to have the formatter turn an HTML document into a fragment? (Am I missing something?)
Hmmm, I came to think of, the current spec is too tied to HTML. The idea is to allow any format. So, yeah, you could strip some elements, and get a fragment.
But the idea with a fragment is that you shouldn't add more than you can defend. It is a minimum, and leave the rest to the calling application. Then, document to fragment is not so clearly defined.
It would be nice to get a fragment anyway, that's true. But the question is if it is a good idea for the Formatter to try or if it is better to tell the app that "this is not clearly defined", and the app may call the document instead, and do it its own way. I think I would prefer the latter.
The alternative is to define on a per-format basis what is meant by a "fragment". While it is doable, I do prefer the idea of a minimal fragment. Or?
Cheers,
Kjetil