[Bug 13466] New: URL generation algorithm for RDF properties is problematic

http://www.w3.org/Bugs/Public/show_bug.cgi?id=13466

           Summary: URL generation algorithm for RDF properties is
                    problematic
           Product: HTML WG
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: HTML Microdata (editor: Ian Hickson)
        AssignedTo: ian@hixie.ch
        ReportedBy: msporny@digitalbazaar.com
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
                    public-html@w3.org


This feedback is filed as a personal comment and is not intended to be any sort
of official feedback from any standards working group.

As an example, the Microdata URL generation algorithm currently generates RDF
triples with predicates of the following form:

<http://www.w3.org/1999/xhtml/microdata#http://schema.org/Person%23:name>

where-as an RDF system would ideally expect the following URL:

<http://schema.org/name>

These sorts of URLs are generated for short-form properties specified using
@itemprop. Using a full IRI "resolves" the issue, but the point is that the URL
above is foreign and nearly useless to RDF systems for the following reasons:

1. There is some sort of strange hierarchical layout to the URL meaning that a
"given-name" value would not map to the same URL when used in an hcard
(hcard.n.given-name) and an hcard used inside a
(hrecipe.author.hcard.n.given-name). The path to the item is encoded in the
URL, which is bad. A good RDF application would just have given-name always map
to the same vocabulary URL.

2. Microdata mints new, different URLs for all RDF properties that currently
have URLs. That is, if you want to use the RDF URLs, you must use full IRIs
everywhere. Authors are expected to understand that the RDF URLs that you are
generating will be different from the ones used by other RDF systems thus
creating a complexity at the application layer. Now, application authors
depending on this data in RDF must introduce complexity into their system to
understand that any URL ending in "given-name" with "microdata" somewhere in
the URL really maps to <http://schema.org/name> or
<http://schema.org/Person/name> .

3. The URLs are hard to read, which people building applications on top of
Microdata, Microformats or RDFa tend to need to do from time to time.

Change the RDF generation algorithm in Microdata to generate the following URL
for the example given above:

<http://schema.org/name>

A name is a name - don't have a different name property for People, Places,
Events, Things, etc.

You could change the RDF property URL generation algorithm to the following:

1. Get the Items @itemtype value (e.g. http://schema.org/Person). 
2. Find the greatest offset of '/' or '#' in the URL. 
3. Replace everything after the greatest offset with the short name in
@itemprop.

This would generate much nicer, easy to read, URLs for the RDF that is
generated from Microdata.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Received on Saturday, 30 July 2011 15:13:10 UTC