[topicmapmail] Should resourceData have a MIME type?

Nikita Ogievetsky nogievet@cogx.com
Sat, 11 Jan 2003 13:24:10 -0800


Hi Tom,

> I have noticed that some people put markup into the resourceData element
of
> an occurrence.  One example is Kal Ahmed's nice topic map of the TM4J API.
>
> This practice makes a lot of sense, but the application has no way to know
> that one particular occurrence is going to have markup and another is not.
> It is not always easy to detect markup, especially the type of the markup.

You never know what to expect. I am not sure that it is worth standardizing.

> Presumably for a resourceRef, the application can find out the MIME type
> when it retrieves the resource, but not so for resource data.
>
> It would be clumsy to define different occurrence types to hold different
> types of resource data.  It would be very complex to specify each instance
> as being of some type that holds the right data type.

You can use occurrence scope in this case. (Or facets in HyTM.)
Just add a MIME theme into the scope soup.

> It would be very simple to add an optional attribute to resourceData that
> would specify the MIME type.  Then my app could get an occurrence of Kal's
> data, discover that it is intended to be HTML, and display it accordingly.
> Even inline images could be included, along with the other MIME types.
>
> This would be so useful and so simple - and backwards compatible - that I
> urge its adoption in the next version of the ISO standard.

Just like xml:lang? I agree that it is worth discussing. But I believe that
scope
can nicely do the job. So it is not of high urgency.

> Note that RDF has a similar problem with the values of their literals.
They
> tried to handle it with the "parsetype" attribute, but apparently they
have
> not gotten everything ironed out yet.

Topic maps are in better position because they have scopes.

All the best,

--Nikita.

Nikita Ogievetsky, nogievet@cogx.com;
Cogitech Inc.        http://www.cogx.com
Topic Maps Tutorials and Consulting.
phone:  1 (917) 406 - 8734