More than one URL for a item

50 views
Skip to first unread message

jreyest

unread,
Jul 16, 2011, 10:49:52 AM7/16/11
to schemaorg-...@googlegroups.com
How if I have two URLS for a book? One for the author and one for the title book. Is it correct something like this?
<div itemscope itemtype="http://schema.org/Book">
<a itemprop="url" href="http://www.example.com/The_Count_of_Monte_Cristo"><span itemprop="name">The Count of Monte Cristo</span></a> by 
<a itemprop="url" href="http://www.example.com/Dumas"><span itemprop="author">Dumas</span></a>.
</div>


Philip Jägenstedt

unread,
Jul 16, 2011, 10:58:58 AM7/16/11
to schemaorg-...@googlegroups.com

In this particular example what you really wanted was 1 URL for the
book and 1 URL for the author, right? This should work:

<div itemscope itemtype="http://schema.org/Book">
<a itemprop="url"
href="http://www.example.com/The_Count_of_Monte_Cristo"><span
itemprop="name">The Count of Monte Cristo</span></a> by

<span itemprop="author" itemscope
itemtype="http://schema.org/Person"><a itemprop="url"
href="http://www.example.com/Dumas"><span
itemprop="name">Dumas</span></a></span>.
</div>

--
Philip Jägenstedt

jreyest

unread,
Jul 16, 2011, 12:02:55 PM7/16/11
to schemaorg-...@googlegroups.com
It makes sense. Thanks!

David Beaumont

unread,
Jul 27, 2011, 7:59:17 AM7/27/11
to Schema.org Discussion
But if you do have two urls for an item, can you markup both of them
(*) or must you only markup one.

Cheers,
David

* - I don't mind if some agents ignore all but one of the images but I
don't want it to be an error.

Philip Jägenstedt

unread,
Aug 3, 2011, 1:05:11 PM8/3/11
to schemaorg-...@googlegroups.com

I asked about this in
http://groups.google.com/group/schemaorg-discussion/browse_thread/thread/95dfc4aa1ab89dbf

Guha replied that "Right now, it is always allowed to have multiple values."

The markup for it is simple, just specify the same property twice:

<div itemscope itemtype="http://schema.org/Book">

<a itemprop="url" href="http://www.example.com/foo"></a>
<a itemprop="url" href="http://www.example.com/bar"></a>
</div>

--
Philip Jägenstedt

shilong ao

unread,
Aug 10, 2011, 5:38:13 AM8/10/11
to Schema.org Discussion
www.seodiary.info

On 7月27日, 下午7时59分, David Beaumont <dbeaum...@google.com> wrote:
> Philip Jägenstedt wrote:

> > On Sat, Jul 16, 2011 at 16:49, jreyest <jrey...@gmail.com> wrote:
> > > How if I have two URLS for a book? One for the author and one for the title
> > > book. Is it correct something like this?
> > > <div itemscope itemtype="http://schema.org/Book">
> > > <a itemprop="url"
> > > href="http://www.example.com/The_Count_of_Monte_Cristo"><span
> > > itemprop="name">The Count of Monte Cristo</span></a> by
> > > <a itemprop="url"
> > > href="http://www.example.com/Dumas"><span itemprop="author">Dumas</span></a>.
> > > </div>
>
> > In this particular example what you really wanted was 1 URL for the
> > book and 1 URL for the author, right? This should work:
>
> > <div itemscope itemtype="http://schema.org/Book">
> > <a itemprop="url"
> > href="http://www.example.com/The_Count_of_Monte_Cristo"><span
> > itemprop="name">The Count of Monte Cristo</span></a> by
> > <span itemprop="author" itemscope
> > itemtype="http://schema.org/Person"><a itemprop="url"
> > href="http://www.example.com/Dumas"><span
> > itemprop="name">Dumas</span></a></span>.
> > </div>
>

> 但是,如果你为一个项目有两个网址,可以标记他们两人(*),或你必须只标记之一 。
>
> 欢呼声,    大卫
>
> * -我不介意一些代理商忽略所有,但其中一个图像,但我不希望它是一个错误 。

Reply all
Reply to author
Forward
0 new messages