[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: RDF, again

  • From: Gabe Beged-Dov <begeddov@j...>
  • To: Paul Prescod <paul@p...>
  • Date: Tue, 23 Nov 1999 15:08:54 -0800

rdf city

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

<?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>


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.