e.g.
<link itemprop="url" href="http://www.acme-bagels.com/" />
Note that you can (should) use a closing / for link, but not for <meta>, which does the same for values that are not URIs.
> Hello,
>
> I have a case like follows:
>
>
> <div class="avatarcontainer" itemscope="" itemtype="http://schema.org/
> Organization">
> <div class="teamPerson">
> <img src="../images/context/team/team.jpg">
> <p itemprop="name" class="teamName">glücklich des Christoph Steiner</
> p>
> <div itemprop="address" itemscope="" itemtype="http://schema.org/
> PostalAddress">
> <p itemprop="streetAddress" class="teamPhone">Schlachthofstraße 9a</
> p>
> <p class="teamPhone"><span itemprop="postalCode">I-39100</span> <span
> itemprop="addressLocality">Bozen (BZ) Italia</span></p>
> <p class="teamPhone"></p><a itemprop="email"
> href="mailto:in...@gluecklich.it">in...@gluecklich.it</a>
> <p itemprop="telephone" class="teamPhone">+39 0471 974989</p>
> </div>
> </div>
> </div>
>
> I would like to add a "image" property. Unfortunatley, the image
> specified in the markup is not the company logo [which is what i want
> to insert], due to a design decision. How can i go ahead and add this
> metadata in an appropiate way?
> Must i specify all of this in the header OR is there a way to add in
> properties that will not be visible in the browser? [for example by
> setting display: none via CSS] Do google/yahoo/bing penalize this
> "attempted cloaking" of data?
>
> Thanks for your opinions.
--------------------------------------------------------
martin hepp
e-business & web science research group
universitaet der bundeswehr muenchen
e-mail: he...@ebusiness-unibw.org
phone: +49-(0)89-6004-4217
fax: +49-(0)89-6004-4620
www: http://www.unibw.de/ebusiness/ (group)
http://www.heppnetz.de/ (personal)
skype: mfhepp
twitter: mfhepp
Check out GoodRelations for E-Commerce on the Web of Linked Data!
=================================================================
* Project Main Page: http://purl.org/goodrelations/
* Quickstart Guide for Developers: http://bit.ly/quickstart4gr
* Vocabulary Reference: http://purl.org/goodrelations/v1
* Developer's Wiki: http://www.ebusiness-unibw.org/wiki/GoodRelations
* Examples: http://bit.ly/cookbook4gr
* Presentations: http://bit.ly/grtalks
* Videos: http://bit.ly/grvideos
Actually, only <link> is valid for specifying a URL property. So says
the spec: "If a property's value, as defined by the property's
definition, is an absolute URL, the property must be specified using a
URL property element."
I'm not sure which closing / you mean, but the URL will be resolved so
it need not include a trailing / while the trailing / in the tag
itself is only needed for XHTML, not HTML.
--
Philip Jägenstedt
> On Thu, Sep 15, 2011 at 11:53, Martin Hepp <mfh...@gmail.com> wrote:
>> You can use meta or link attributes for this
>>
>> e.g.
>>
>> <link itemprop="url" href="http://www.acme-bagels.com/" />
>>
>> Note that you can (should) use a closing / for link, but not for <meta>, which does the same for values that are not URIs.
>
> Actually, only <link> is valid for specifying a URL property. So says
> the spec: "If a property's value, as defined by the property's
> definition, is an absolute URL, the property must be specified using a
> URL property element."
Yes, thanks for stressing that.
>
> I'm not sure which closing / you mean, but the URL will be resolved so
> it need not include a trailing
There are two issues here:
For referring to the identifier of a value (e.g. http://schema.org/InStock), it does matter whether you attach a trailing slash or not.
You must write the URI in exactly the same way as it is specified; otherwise, a meta-data parser will not understand the data unless it applies some data cleansing heuristics that go beyond the standard.
So from the data perspective,
and
are two different identifiers and only the correct one can be assumed to be understood by consuming client.
So the sloppy usage of trailing slashes in URIs in the past should be avoided in future Microdata usages.
Whether an HTTP server will serve a document or redirect the client or return a 404 error when you request http://schema.org/InStock/ while it should be http://schema.org/InStock is a completely different issue at the HTTP protocol level.
A good server will likely point you to the correct URI.
> / while the trailing / in the tag
> itself is only needed for XHTML, not HTML.
That is what I was actually referring to. Even if it is needed only in XHTML, I personally think closing elements properly as in XML makes a lot of sense, even though it may not be mandatory from a HTML perspective, simply because it helps see the tree of elements during development and debugging.
>
> --
> Philip Jägenstedt
Yes, itemtype is treated as an opaque identifier, so URLs must be both
absolute and normalized in the same way. However, itemid and any URLs
used as property values (which was the case here) are resolved, so
they need neither be absolute URLs or be normalized in any particular
way.
>> / while the trailing / in the tag
>> itself is only needed for XHTML, not HTML.
>
> That is what I was actually referring to. Even if it is needed only in XHTML, I personally think closing elements properly as in XML makes a lot of sense, even though it may not be mandatory from a HTML perspective, simply because it helps see the tree of elements during development and debugging.
That is fine, as long as it is clear that it is a matter of style, not
actually required by the HTML syntax.
--
Philip Jägenstedt
Actually, only <link> is valid for specifying a URL property. So says
the spec: "If a property's value, as defined by the property's
definition, is an absolute URL, the property must be specified using a
URL property element."
Philip Jägenstedt
As far as I know the usage of link and meta in the HTML body is now legal in HTML5 if you use it with Microdata/itemprop.
I do not have a reference at hand, but there was a lengthy discussion on this earlier this year.
Martin
--------------------------------------------------------
Both <link> [1] and <meta> [2] are allowed where phrasing content is
allowed if the itemprop attribute is present.
[1] http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-link-element
[2] http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-meta-element
--
Philip Jägenstedt