Re: Anyone able to help improve Dublin Core namespace XSLT to support RDFS RDFa?

On May 11, 2012, at 11:07 AM, Thomas Baker wrote:

> On Fri, May 11, 2012 at 01:31:00PM -0400, Gregg Kellogg wrote:
>> There are some minor issues remaining that I'm looking at right now:
>> 
>> It looks like rdfs:command and dc:description are reduced in the RDF/XML output. For example, dc:Agent:
>> 
>> <rdf:Description rdf:about="http://purl.org/dc/terms/Agent">
>>  <rdfs:label xml:lang="en-US">Agent</rdfs:label>
>>  <rdfs:comment xml:lang="en-US">A resource that acts or has the power to act.</rdfs:comment>
>>  <dcterms:description xml:lang="en-US">Examples of Agent include person, organization, and software agent.</dcterms:description>
>>  <rdfs:isDefinedBy rdf:resource="http://purl.org/dc/terms/"/>
>>  <dcterms:issued>2008-01-14</dcterms:issued>
>>  <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
>>  <rdf:type rdf:resource="http://purl.org/dc/terms/AgentClass"/>
>>  <dcterms:hasVersion rdf:resource="http://dublincore.org/usage/terms/history/#Agent-001"/>
>> </rdf:Description>
> 
> I'm not sure what you mean by "reduced".  The Web document says:
> 
>    Term Name:    Agent
>    URI:          http://purl.org/dc/terms/Agent
>    Label:        Agent
>    Definition:   A resource that acts or has the power to act.
>    Comment:      Examples of Agent include person, organization, and software agent.
>    Type of Term: Class
>    Instance Of:  http://purl.org/dc/terms/AgentClass
>    Version:      http://dublincore.org/usage/terms/history/#Agent-001
> 
> This matches the RDF/XML output except for the addition, in the RDF/XML, of
> rdfs:isDefinedBy and of the date issued (of the individual property or class).

Sorry, I ment _reversed_. It looks like the <dcterms:description> is the comment and the <rdfs:comment> is the description in the RDF/XML output.

>> The HTML output ends up pulling in several definitions for
>> http://purl.org/dc/dcam/VocabularyEncodingScheme. Perhaps this needs some
>> additional filter to not define anything not in dcterms?
> 
> In the dcmi-terms/index.shtml output (RDFa-to-Turtle) I'm looking at, I only
> see one entry for VocabularyEncodingScheme, as in [1]:
> 
>    <http://purl.org/dc/dcam/VocabularyEncodingScheme>
>       dc:issued "2008-01-14";
>       rdfs:identifier <http://purl.org/dc/dcam/VocabularyEncodingScheme>;
>       rdfs:seeAlso <http://dublincore.org/documents/2007/06/04/abstract-model/>;
>       rdf:type rdfs:Class;
>       dc:hasVersion <http://dublincore.org/usage/terms/history/#VocabularyEncodingScheme-001> .
> 
> The rdfs:identifier is wrong, if only because rdfs:identifier does not exist...
> 
> Compared to the Web document [1], what is systematically missing in this
> RDFa-to-Turtle output (and in the RDFa-to-Turtle output for all other
> properties and classes) is:
> 
>    rdfs:label for the "Term Name"
>    rdfs:comment for the "Definition"
>    dcterms:description for the "Comment" (though not for "VocabularyEncodingScheme", which does not have one)
> What is systematically missing compared to the RDF/XM

Corrected in my REPO. as is adding Date Issued and Date Modified to the tabluar definitions; it was explicitly removed before. If you'd like to keep it out of the term tables as hidden elements, I can go back to that.

> L output (e.g., [2]):
> 
>    rdfs:isDefinedBy <http://purl.org/dc/terms/>

I'll look into that, should be easy enough.

> [1] http://dublincore.org/documents/dcmi-terms/#dcam-VocabularyEncodingScheme
> [2] http://dublincore.org/2010/10/11/dcterms.rdf
> 
>> RDF/XML version does not provide a datatype definition for dcterms:issued and
>> dcterms:modified. This is done in HTML using the <time> element, where the
>> datatype is implicit.
> 
> +1
> 
>> HTML version outputs rdfs:identifier equivalent to the subject. This is easily omitted.
> 
> +1 (see above)
> 
>> The XSL was not outputting RDF for text properties, which I've corrected in
>> my working branch.
> 
> +1 - I should have read the message through before responding...!
> 
> The other error I see is: 
> 
>   rdfs:domain dc:Collection;
> 
> where Collection is a term from the DCMI Type Vocabulary, not /terms/, and
> should thus be given with its full URI <http://purl.org/dc/dcmitype/Collection>
> or using a @prefix for the Type Vocabulary:
> 
>   rdfs:domain dc:Collection;
>   rdfs:domain dc:Collection;
>   rdfs:domain dc:Collection;

Hmm. Not sure where this is coming from, I'll check that out too.

> Do I correctly understand that if the HTML/RDFa document completely expresses the 
> contents of the current HTML and RDF/XML documents, and we direct the PURLs to that 
> document, we could delete (or rather archive) the XSL scripts used to generate the
> RDF/XML?  The other simplifications I would like to make are:
> 
> -- Delete (or archive) the XSL script for generating the (redundant) stand-alone
>   DCMI Type Vocabulary document.
> 
> -- Revert to the pre-RDFa XSL script for generating the "history" document [2].
> 
> This means that only one XSL script for generating RDFa would need to be
> maintained.

That's true, but there is value in providing alternate representations (perhaps using content negotiation), which should probably include Turtle. You could certainly go to auto-generating this from the HTML+RDFa, though.

Gregg

> It looks to me like we are getting very close!
> 
> Tom
> 
> [2] http://dublincore.org/usage/terms/history/
> 
> -- 
> Tom Baker <tom@tombaker.org>

Received on Friday, 11 May 2012 18:27:18 UTC