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

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

-------------- next part --------------
<?xml version="1.0"?>
<rdf:RDF xmlns="http://www.rdfSchemas.org/person.rdf#"
    <Person rdf:ID="Paul1"> 
			<street>Lovers Lane</street> 
		    <City rdf:about="#Dallas" /> 
		    <State rdf:about="#Texas" /> 
		<rdf:li rdf:resource="#Paul3" /> 
		<rdf:li rdf:resource="#Paul2" /> 
		<rdf:li rdf:resource="#Paul4" /> 
    <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>

More information about the Xml-dev mailing list