Re: [whatwg] Proposal: allow itemid to record multiple identifiers for an item

2012-12-05 Thread Ian Hickson
On Wed, 5 Dec 2012, Ed Summers wrote:
> 
> Was the "id" itemprop you used in your examples a hypothetical property 
> that would need to be defined at schema.org or elsewhere, or did you 
> find it defined already?

Hypothetical. In the schema.org vocabulary, the existing "url" property 
could be used, maybe? Or a new one, of course. I couldn't quite tell from 
the schema.org documentation if "url" was intended to do this.

-- 
Ian Hickson   U+1047E)\._.,--,'``.fL
http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


Re: [whatwg] Proposal: allow itemid to record multiple identifiers for an item

2012-12-05 Thread Ed Summers
Ian,

Thanks very much for the guidance re: using  and . I like
both solutions quite a bit better than leaning more on itemid for this
use case.

Was the "id" itemprop you used in your examples a hypothetical
property that would need to be defined at schema.org or elsewhere, or
did you find it defined already?

//Ed


Re: [whatwg] Proposal: allow itemid to record multiple identifiers for an item

2012-12-04 Thread Ian Hickson
On Tue, 4 Dec 2012, Ed Summers wrote:
> 
> Over on a schema.org related list [1] there has been a discussion about 
> making identifiers for bibliographic items (books, articles, etc) 
> available in microdata using itemid. The use case is well described in 
> the dev edition, with this example [2]:
> 
>  itemtype="http://vocab.example.net/book";
> itemid="urn:isbn:0-330-34032-8">
>  Title
>  The Reality Dysfunction
>  Author
>  Peter F. Hamilton
>  Publication date
>  26 January 1996
> 
> 
> Our use case is when a publisher wants to record multiple identifiers 
> for an item. For example The Reality Dysfunction also has an OCLC number 
> 225870439, which can be expressed as a URI, info:oclcnum/225870439.

When a property isn't the sole unique identifier for an item, just use a 
property instead of itemid="", as in:

 http://vocab.example.net/book";>
  
  
  
   Title
   The Reality Dysfunction
   Author
   Peter F. Hamilton
   Publication date
   26 January 1996
  
 

...or, if continuing to use URLs makes more sense:

 http://vocab.example.net/book";>
  
  
  
   Title
   The Reality Dysfunction
   Author
   Peter F. Hamilton
   Publication date
   26 January 1996
  
 


> One alternative to using itemid would be to define an oclcnum itemprop 
> to the relevant schema.org types. This solution is a bit unwieldy 
> because there are so many identifier types in the bibliographic world. I 
> imagine the same is similar in other domains.

That's another possibility, yes. If having a large numbmer of properties 
is not practical for some reason, then having one property use a common 
syntax that can express all the identifier types (e.g. URLs, or the "type 
number" syntax in the first example above) can work too.


> Another solution would be to come up with some generic identifier 
> mechanism, but I feel like this would then duplicate what itemid is 
> already doing.

That's fine. itemid="" is intended just for the very specific case of 
there being a specific unique identifier that is globally used as the key 
by which a particular vocabulary's items are identified; if there's no 
such key, or there are many keys and none are more important than the 
others, then it's better to just use a property.

Honestly, itemid="" isn't really intended to be a particularly widely used 
feature. This is reflected by the way the spec only has one example that 
uses itemid="", and that example's purpose is to demonstrate itemid="". 
It's really just a shorthand for a property (though not one whose name can 
be specified in itemprop=""), and if it doesn't quite fit, it's fine to 
ignore it and use something else.

HTH,
-- 
Ian Hickson   U+1047E)\._.,--,'``.fL
http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


[whatwg] Proposal: allow itemid to record multiple identifiers for an item

2012-12-04 Thread Ed Summers
Hi WHATWG,

Over on a schema.org related list [1] there has been a discussion
about making identifiers for bibliographic items (books, articles,
etc) available in microdata using itemid. The use case is well
described in the dev edition, with this example [2]:

http://vocab.example.net/book";
itemid="urn:isbn:0-330-34032-8">
 Title
 The Reality Dysfunction
 Author
 Peter F. Hamilton
 Publication date
 26 January 1996


Our use case is when a publisher wants to record multiple identifiers
for an item. For example The Reality Dysfunction also has an OCLC
number 225870439, which can be expressed as a URI,
info:oclcnum/225870439. It would be convenient if we could say:

http://vocab.example.net/book";
itemid="urn:isbn:0-330-34032-8 info:oclcnum/225870439">
 Title
 The Reality Dysfunction
 Author
 Peter F. Hamilton
 Publication date
 26 January 1996


But it appears that the current specification does not allow for this [3]

"""
The itemid attribute, if specified, must have a value that is a valid
URL potentially surrounded by spaces.
"""

One alternative to using itemid would be to define an oclcnum itemprop
to the relevant schema.org types. This solution is a bit unwieldy
because there are so many identifier types in the bibliographic world.
I imagine the same is similar in other domains.

Another solution would be to come up with some generic identifier
mechanism, but I feel like this would then duplicate what itemid is
already doing.

So, is it feasible for the Microdata specification to allow for
multiple space separated identifiers in an itemid, similar to the set
of space-separated tokens microsyntax [4]? Or is there an alternate
solution that I'm missing?

Thanks for your attention,
//Ed

[1] http://lists.w3.org/Archives/Public/public-schemabibex/2012Dec/.html
[2] http://developers.whatwg.org/links.html#global-identifiers-for-items
[3] 
http://www.whatwg.org/specs/web-apps/current-work/multipage/microdata.html#items
[4] 
http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#set-of-space-separated-tokens