Re: Getting Started w/ RDFa

On Mar 21, 2012, at 18:00 , Will Clark wrote:

> I've been looking into to incorporating RDFa into a cms my company has developed. I think I understand the core concepts of semantic markup and specifying the context for content. I do need some help with the implementation.
> 
> I'm very, very new to this, so if there are resources that anyone can point me to, I'm more than happy to do my own research (RTFM, right).
> 
> It appears you can specify multiple "schemas/definitions/terms" for a given page, you just have to namespace/prefix those libraries (hope that's the right term) so it can be declared which term is associated with which library.
> 
> Is there a recommended location to declare those prefixes? In the <html>, <body>, further down in the document? Does it make a difference?

Will,

from an RDFa point of view, there is no difference. I think there are two issues that might influence your thoughts

- If you intend to provide HTML-RDFa snippets that you expect others to cut and paste to their own pages, then placing @prefix as 'close' to where those statements are is a good idea. By doing so you make it sure that whoever picks up your snippet will also pick up the corresponding @prefix attributes
- You should avoid putting long @prefix statements into <html> if you may have problems with the character encoding of your page. HTML5 parsers, in some cases, 'sniff' into the HTML code to find the charset setting <meta> statements in the head, and they usually sniff into a specific number of characters starting from the html element. Making the html element too 'long' via lots of prefix declarations may disrupt this.

I hope this helps

Ivan


> 
> I've read Manu Sporny's concerns with schema.org. And I'd agree wholeheartedly with his post (http://manu.sporny.org/2011/false-choice/).
> 
> I'll say that what I do like about schema.org is how easy it was to find the types/terms that are available to define the content. Is there a similar listing for Dublin Core / DOAP / FOAF / etc.? Or do I just need to read through the XML documents?
> 
> I really hope these questions make sense, and apologies if my terminology is off.
> 
> Thanks,
> Will
> 


----
Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
FOAF: http://www.ivan-herman.net/foaf.rdf

Received on Saturday, 24 March 2012 08:25:15 UTC