[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Will XML Ever Make Good on its Promise?
dave.cantrell@gunter.af.mil <dave.cantrell@gunter.af.mil> wrote:
> http://comment.cio.com/soundoff/053101.html
>
> This article makes a very good point, one which I've been wondering for a
> while now. I was looking over the Dublin Core usage guide [1], and couldn't
> help but shudder when I saw the following example under the Format section
> [2]:
The Dublin Core Usage Guide has a number of mistakes, and this may very well
be one of them. I will investigate and report back to you and the
appropriate Dublin Core lists.
> Now, if we are dealing with two GIF files here, why does one format specify
> file size and one specify dimensions, but neither specifies both?
>
> I applaud the desire to allow freedom in specifying metadata, but doing
> things this way seems to invite problems of the sort XML is trying to avoid.
Actually, this is one of the benefits of using RDF over XML. In generic XML,
a tag can mean anything. This gives XML a lot of flexibility, but it also
makes it hard to do powerful things with it. RDF, on the other hand,
restricts what you can say but in doing so opens up a number of interesting
avenues. For example, you can invent a dave:mimetype and use it for only the
mime type. If you write a schema for it, you can state that dave:mimetype is
a subClassOf dc:format. If you do that, schema-aware RDF processors will see
a dave:filesize and automatically get a dc:format with the same information
in it. That way, you can use your more restrictive form, but still have it
work in plain old Dublin Core processors.
Similar tools could be used to say, convert between Visa and other credit
card formats, if they had used RDF. You get all this functionality
essentially "for free" -- if you use good RDF tools you need not write any
extra code to take advantage of this.
> But I do favor consistency. If you define an element, I believe you should
> define its boundary conditions as well, e.g. "Any format specifying
> 'image/*' (i.e. 'image/gif', etc) will specifiy it's file size (in bytes)
> and dimensions (as width by height)."
So feel free to define a metadata element that works consistently.
--
[ Aaron Swartz | me@aaronsw.com | http://www.aaronsw.com ]