RDF, again

Gabe Beged-Dov begeddov at jfinity.com
Wed Nov 24 00:19:38 GMT 1999


Paul Prescod wrote:

> The thing I find confusing about the RDF syntax is that the element type
> name can be either an RDF type name or an RDF property. XML makes no
> distinction and that's why I think that it is difficult to use for
> object oriented interchange. Your example doesn't run into that problem
> really because it only goes one level deep. But what does the RDF for
> this CSS-style object representation look like:

RDF/XML 1.0 uses a striped syntax of alternating Type/Property elements (you will see this
referred to as Type/Accessor in XML schema related discussions). This is perfect for object
oriented interchange and is fine once you keep track of nesting level by  twos
(type/accessor).

If you use the shorthand to specify the type as the element name rather than as the rdf:type
property  (this is how the Mozilla Directory dump does it) you save some typing and get a
more natural syntactic representation. If you also use  Java style naming conventions for
types vs. property names you can get even more  intuitive.

I've attached a slightly modified version of your CSS example in RDF. I changed the #!
references (what does #! mean?) to regular intra-document references and did something
similar to the siblings list so that everything would resolve by adding some dummy instances
at the end.

Cordially from Corvallis,

Gabe Beged-Dov
http://www.jfinity.com/gabe

-------------- next part --------------
<?xml version="1.0"?>
<rdf:RDF xmlns="http://www.rdfSchemas.org/person.rdf#"
         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    <Person rdf:ID="Paul1"> 
	<name> 
	    <Person-name> 
		<first>Paul</first> 
		<last>Prescod</last> 
	    </Person-name> 
	</name> 
	<address> 
	    <Snail-mail-address> 
		<street> 
		    <Street-address> 
			<number>5936</number> 
			<street>Lovers Lane</street> 
		    </Street-address> 
		</street> 
		<city> 
		    <City rdf:about="#Dallas" /> 
		</city> 
		<state> 
		    <State rdf:about="#Texas" /> 
		</state>
	    </Snail-mail-address> 
	</address> 
	<siblings> 
	    <rdf:Seq> 
		<rdf:li rdf:resource="#Paul3" /> 
		<rdf:li rdf:resource="#Paul2" /> 
		<rdf:li rdf:resource="#Paul4" /> 
	    </rdf:Seq> 
	</siblings> 
    </Person> 
    <Person rdf:ID="Paul2"></Person>
    <Person rdf:ID="Paul3"></Person>
    <Person rdf:ID="Paul4"></Person>
    <City rdf:ID="Dallas"></City>
    <State rdf:ID="Texas"></State>
    
</rdf:RDF>



More information about the Xml-dev mailing list