Skip to Content.
Sympa Menu

cc-metadata - Re: Verify 1.0

cc-metadata AT lists.ibiblio.org

Subject: discussion of the Creative Commons Metadata work

List archive

Chronological Thread  
  • From: Mike Linksvayer <ml AT creativecommons.org>
  • To: cc-metadata AT lists.ibiblio.org
  • Subject: Re: Verify 1.0
  • Date: Sun, 21 Sep 2003 22:26:15 -0700

Chris Karr wrote:
The problem I have is that I'm using an XML parser to go through the documents linked in the tags, and it will completely skip past the RDF file above. Perhaps I need to implement screenscraping to get the XML out of the HTML page, but I have to think that there is a better solution. One idea that I had would be to make the rdf:RDF elements children of the head node in an HTML document. However this assumes that the rest of the HTML is proper XML -- which it probably isn't and
inclusion of these extra elements may conflict with XHTML standards.

In the spirit of parsing as liberally as possible, but sending as conservatively as possible (well, actually only the former) you might extract RDF/XML chunks first with a regular expression which matches whether you have an RDF/XML document, RDF/XML embedded in a comment, or syntactically included in a larger XML document. Or you could accomplish the same with lots more work by walking through an XML document, looking for rdf:RDF nodes, also checking comments for embedded RDF. If the document fails to parse, try running it through HTML Tidy <http://sourceforge.net/projects/jtidy/> and try again.

I guess another question I have is what is the justification of allowing the RDF files to live in the HTML documents? Is it so difficult to have the users create a single XML file with all the licenses of the content they are distributing, or have them use single files per work? (I can see how this would get messy quick though...)

There's a brief note addressing this at <http://creativecommons.org/learn/technology/metadata/extend#html>. I suspect that if we recommended a method that required metadata in separate files, or even in the <head> of an HTML document we'd have far fewer people publishing metadata. Getting the RDF automatically when you copy&paste the HTML code that includes the some/no rights reserved button means we don't have to sell licensors on the concept of metadata, which otherwise suffers from a chicken&egg problem -- no benefit to the publisher if no apps use the metadata, no point in creating the apps that use the metadata if there's none published.

It'd be far preferable to "syntactically include" RDF and hide or render it with a stylesheet, but that doesn't validate in any version of [X]HTML. When and if a general solution comes along we'll probably adopt it. Some people are discussing this at <http://esw.w3.org/topic/EmbeddingRDFinHTML>.

Mike





Archive powered by MHonArc 2.6.24.

Top of Page