Question

So Im putting semantics on my page using RDFa Lite and the vocabulary Schema.org, but I have ran into an problem. Im putting it on a Person that is a soocer player. I got informations like player number, player position and so on? How do I define these with Schema.org?

So my code looks like this

<div class="indhold"  vocab="http://schema.org/" typeof="Person">

    <h2>Spiller - <span property="name" >Morten Jensen</span></h2>
    <img property="image" src="http://e2.365dm.com/12/06/660x350/YannMvila_2775667.jpg" alt="Morten Jensen billede" class="spiller" />
    <p><b>Navn:</b> <span property="name">Morten Jensen</span></p>
    <p><b>Fødselsdag:</b> <span property="birthDate">1989-12-12</span></p>
    <p><b>Hold:</b> <span property="memberOf"><span typeof="Organisation" property="name"><a href="hold.php?id=1">FC København</a></span></span></p>
    <p><b>Spillernr.:</b> <span property="playerNumber">2</span></p>
    <p><b>Position:</b> <span property="playerPosition">Målmand</span></p>
    <p><b>Beskrivelse:</b><br/>
    <span property="description">Denne spiller startede i en meget tidlig alder, men var fast besluttet på at blive en kæmpe stjerne! Om få år spåes han en kæmpe fremtidig indenfor dansk fodbold!     </span>
    </p>

</div>

I have tried google, but Im not quite sure you can just create properties like that?

Was it helpful?

Solution

To extend schema.org to support custom properties you usually have to find a more generic type or property that is a superset of your custom term. In the case of playerNumber and playerPosition, I can't think of any property from schema.org that relates to these two custom terms. You could potentially use 'description' even though it is very generic, so something like: property="description/playerNumber" property="description/playerPosition"

In any case, this should not prevent you from publishing your content in RDFa lite. If you are not sure what to do about playerNumber and playerPosition, you can also just leave them out and not add RDFa Lite for them. You don't have to annotate every single item of your page, you can always improve that later.

You could also ask your question on http://lists.w3.org/Archives/Public/public-vocabs/, it is the official mailing list for the scgem

BTW, the rest of your markup looks good. Just make sure to move the typeof="Organization" into the span that has property="memberOf", since you are defining a new entity organization entity, it should be in the same HTML element as the property that creates it. Also, in schema.org, Organization is spelt in US English with a "z".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top