[XESAM] RDF vs .Desktop

Evgeny Egorochkin phreedom.stdin at gmail.com
Wed May 16 12:58:54 PDT 2007


It's quite hard to figure out how to best write this to suit the people who 
like to KISS everything, but I'll try :)

Note: 

I'm using syntax named Turtle(the most used N3 derivative). This is an 
alternative serialization to RDF+XML and is a well-accepted standard.

I will provide only one field definition featuring all aspects like parents, 
localization etc. No sense to define several fileds. 
If some feature is not needed, the corresponding line is omitted.
@base and @prefix headers are the same for all files.
A file can contain as many definitions as you want.

First attempt:

=====================================
@base <http://freedesktop.org/standards/xesam#>

Audio.Composer
	a			field;
	of_type		string;
	has_parent	Content.Creator;
	name		"Composer"@EN;
	name		"Композитор"@RU;
	description	"Audio composer".
=====================================	

Second attempt. This is the one I'd prefer, despite first attempt looking 
slighly better. Note that base url is xesam ns. Xesam: prefix actually points 
to RDF ns, so that we use xesam:Property instead of rdf:property and hide rdf 
traces completely :)
=====================================
@prefix xesam:	<http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix : 			<http://www.w3.org/2000/01/rdf-schema#>
@base 			<http://freedesktop.org/standards/xesam#>

Audio.Composer	
	a				xesam:Property;
	:range			string;
	:subPropertyOf		Content.Creator;
	:label			"Composer"@EN;
	:label			"Композитор"@RU;
	:comment		"Audio composer".
=====================================

--Evgeny


More information about the xdg mailing list