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

RE: RDF, again

  • From: Mark Birbeck <Mark.Birbeck@i...>
  • To: 'Paul Prescod' <paul@p...>, "'xml-dev@i...'" <xml-dev@i...>
  • Date: Tue, 23 Nov 1999 23:46:23 -0000

RE: RDF
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.

I got the impression from the spec that this is intentional, so that a
straightforward XML document - that might not contain *any* RDF - can
still be interpreted as a set of RDF statements. In other words,
different XML layouts (elements for attributes, e.g.) of the same data
would result in the same RDF statements.

The XML would still need to be well thought out though. For example:

	<person name="Paul">
		<food>trifle</food>
	</person>

might mean trifle is your favourite food, the main food you're allergic
to, or your pudding preference for the office Xmas party. All of these
are acceptable in XML, but the RDF interpretation of this may well be
incorrect - or at least not as rich in meaning as we would like:

	Person has a name "Paul" and a food "trifle"

So, to make the first statement - trifle is Paul's favourite food - we
could use the following RDF:

<rdf:RDF>
	<rdf:Description ID="1">
		<rdf:Type rdf:resource="person" />
		<x:name>Paul</x:name>
	</rdf:Description>

	<rdf:Description ID="2">
		<rdf:Type rdf:resource="food" />
		<x:name>trifle</x:name>
	</rdf:Description>

	<rdf:Description about="#1">
		<x:favourite rdf:resource="#2" />
	</rdf:Description>
</rdf:RDF>

Using the abbreviated forms allowed to us, this is the same 'RDF':

	<x:person x:name="Paul">
		<x:favourite>
			<x:food>trifle</food>
		</x:favourite>
	</x:person>

or:

	<x:person>
		<x:name>Paul</x:name>
		<x:favourite>
			<x:food>trifle</x:food>
		</x:favourite>
	</x:person>

or:

	<x:person>
		<x:name>Paul</x:name>
		<x:favourite x:food="trifle" />
	</x:person>

So - to turn this round - any of the previous three XML documents can be
interpreted as the same set of RDF statements - a person with the name
"Paul" has a favourite food, and that food is called trifle - even
without any explicit RDF present.

As to whether it is any good for object interchange, I think it is. Of
course, if the relationships between elements contained within other
elements can be inferred then straight XML is fine. But as soon as you
need something more complex then RDF is very good (not to mention when
the objects being referred to are outside of the XML document you're,
and so you can't use ID/IDREF.)

Best regards,

Mark

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@i... the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)



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.