Removal of schema.org in individual--foaf-person.ftl

10 views
Skip to first unread message

Donald R Elsborg

unread,
Sep 6, 2018, 1:35:55 PM9/6/18
to vivo...@googlegroups.com

Hello,

I was looking at our 1.9.3 VIVO markup in the WILMA template and noticed that people don’t have schema.org markup.

We were under the impression that this was added in VIVO 1.9 by Nate at one point.

Upon investigation I found:

https://jira.duraspace.org/browse/VIVO-1263

which led to

https://github.com/vivo-project/VIVO/commit/4abb77923556d05d2da57793b709eeb365fb2917#diff-1d98dfe4ded03f511a5cb472f6c8f38c

Looking at the individual—foaf-person.ftl file diffs I see that the itemscope itemtype=http://schema.org/Person was removed from the section.

Looking at Example 4 Microdata in the spec: https://schema.org/Person I see that the spec was followed initially.

 

I don’t see the rationale as to why this was removed.

Was this an oversight such that can we add this back in or am I missing something.

 

 

Additionally, I have some recommendations:

1.      All tickets need to include rationale for code fixes so we can avoid having to ask these questions years later

2.      The github commit mentions the JIRA, but the JIRA ticket doesn’t have a link back to the github commit or pull request. Recommend that JIRA tickets link back to the actual commits or pull requests.

 

 

Thanks

Don Elsborg

CU Boulder

Triggs, Graham

unread,
Sep 6, 2018, 2:26:41 PM9/6/18
to vivo...@googlegroups.com

Hi Don,

 

If you look at the other files in the commit, you can see that the Schema.org markup was moved from the section tag, to a span placed inside it.

 

The rationale is fairly simple – if you have the schema.org markup in an element contains an id attribute, then an extractor (e.g. https://search.google.com/structured-data/testing-tool ) will pull that out as the ID of the person. And that section id we definitely don’t want anything thinking is an ID for the person.

 

But it appears to be an oversight that the <span> is not included in one of those three templates.

 

G

--
You received this message because you are subscribed to the Google Groups "VIVO Tech" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vivo-tech+...@googlegroups.com.
To post to this group, send email to vivo...@googlegroups.com.
Visit this group at https://groups.google.com/group/vivo-tech.
To view this discussion on the web visit https://groups.google.com/d/msgid/vivo-tech/CY4PR03MB336553447D807CE206E64DEED5010%40CY4PR03MB3365.namprd03.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.

Donald R Elsborg

unread,
Sep 6, 2018, 5:27:56 PM9/6/18
to vivo...@googlegroups.com

Hi Graham,

Thanks for the quick reply and clarification.

The rationale makes sense.

What if we change the approach however and make a parent section like <section itemscope itemtype="http://schema.org/Person" id="https://experts.colorado.edu/individual/fisid_105842"> which can encapsulate most if not all of the other sections on the page outside of the header, menu, footer sections.

This should make it easy to add other itemprops for schema.

This can be extended to Organizations, Publications, Concepts, other.

 

I ran a quick test and things are looking pretty good in the google structured data testing link you provided.

Some example code below highlighting this. Also tweaked some position information to make it more readable by Google.

Try this in: . https://search.google.com/structured-data/testing-tool

 

<section itemscope itemtype="http://schema.org/Person" id="https://experts.colorado.edu/individual/fisid_105842">

<section class="vcard person" role="region">

    <section id="share-contact" role="region">

        <!-- Image -->          

        <div id="photo-wrapper">        <a href="/file/n1171/Veblen%2C+Thomas+T_100063016.jpg" title="Individual photo">

               <img itemprop="image" class="individual-photo" src="/file/n6073/thumbnail_Veblen%2C+Thomas+T_100063016.jpg" title="click to view larger image" alt="Veblen, Thomas T" width="160" />

        </a>

</div>

        <!-- Contact Info -->

        <div id="individual-tools-people">

            <span id="iconControlsLeftSide">

                <img id="uriIcon" title="https://experts.colorado.edu/individual/fisid_105842" src="/images/individual/uriIcon.gif" alt="uri icon"/>

                                                                           <img id="qrIcon"  src="/images/individual/qr_icon.png" alt="qr icon" />

                              <span id="qrCodeImage" class="hidden">

                                                                                          <a class="qrCloseLink" href="#"  title="QR Code">Close</a>

                                                                           </span>

            </span>

        </div>

    <ul style="font-size:1em;padding-bottom:4px"><li><strong>Contact Info</strong></li></ul>

   

     

         

            <ul id="additional-emails" class="individual-emails" role="list" >

                    <li role="listitem">

                        <a itemprop="email" class="email" href="mailto:thomas...@Colorado.EDU" title="email">Email</a>

                    </li>

            </ul>

               

        <!-- Websites -->

             <ul id="individual-ARG_2000028" class="individual-urls" role="list" >

         <li role="listitem">   

    <a href="http://www.colorado.edu/geography/biogeography/" title="link text">Webpage</a>

    </li>

        </ul>

    </section>

        <section id="individual-info" class="withThumb" role="region">

       

        <header>

                <h1 class="foaf-person">

                    <span itemprop="name" class="fn">    Veblen, Thomas T

</span>

                     < itemscope itemprop="worksFor" id="https://experts.colorado.edu">

           

        </span>

    </span>

                            <span itemprop="jobTitle" class="display-title">Distinguished Professor</span>

                </h1>

            <!-- Positions -->

            <span itemscope itemprop="worksFor" itemtype="http://schema.org/Organization">

        <span itemprop="name">Geography

        <span itemscope itemprop="employee" itemref="https://experts.colorado.edu/individual/fisid_105842" itemtype="http://schema.org/Person">

            <meta itemprop="jobTitle" content="Distinguished Professor">

        </span>

        </span>

    </span>

    <span itemscope itemprop="worksFor" itemtype="http://schema.org/Organization">

        <span itemprop="name">Company B</span>

        <span itemscope itemprop="employee" itemref="https://experts.colorado.edu/individual/fisid_105842" itemtype="http://schema.org/Person">

            <meta itemprop="jobTitle" content="Job 2">

            <meta itemprop="jobTitle" content="Job 3">

        </span>

    </span>

            <span itemprop="affiliation" name="Geography" url="/display/deptid_10170">

            <span itemprop="jobTitle" class="display-title">Distinguished Professor</span>

            </span>

     <h2 id="relatedBy" class="mainPropGroup" title="">Positions  </h2>

    <ul id="individual-personInPosition" role="list">

         <li role="listitem">   

    

    

    Distinguished Professor,

<a href="/display/deptid_10170" title="organization name">Geography</a> 

    </li>

    </ul>

        </header>

    </section>

Reply all
Reply to author
Forward
0 new messages