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

re: RDF considered optional

  • From: David Megginson <david@m...>
  • To: "'XML-DEV'" <xml-dev@i...>
  • Date: Wed, 17 Mar 1999 17:57:19 -0500 (EST)

flightsim.com
Jeffrey E. Sussna writes:

 > The RDF syntax spec states that "The RDF element is optional if the
 > content can be known to be RDF from the application context."
 > 
 > Can anyone clarify exactly what is meant by "application context"? 

That means that if you know in advance what you're reading, you don't
need to have an rdf:RDF element.  For example, if I define an
RDF-based format for exchanging Flight-Simulator scenery information
(FSML), and I never intend to embed this in a web page, etc., I can
just use something like this:

  <?xml version="1.0"?>

  <!-- Yes, Virginia, this is RDF-conformant! -->

  <fsml:Building xmlns:fsml="http://flightsim.com/ns/fsml#">
   <fsml:name>Lennox Generating Station</fsml:name>
   <fsml:latitude>N44*8'33"</fsml:latitude>
   <fsml:longitude>W76*51'9"</fsml:longitude>
   <fsml:length>300m</fsml:length>
   <fsml:width>150m</fsml:width>
  </fsml:Building>

What's really entertaining is that I can do this, and be
RDF-conformant, without even declaring the RDF namespace.

The most recent version of SiRPAC that I saw still chokes on this
example, but I consider that a bug in SiRPAC (or at least, a
deliberate implementation choice).

For the curious, here's the basic serialisation syntax for the same
thing:

  <?xml version="1.0"?>

  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
           xmlns:fsml="http://flightsim.com/ns/fsml#">

  <rdf:Description>
   <rdf:type resource="http://flightsim.com/ns/fsml#Building"/>
   <fsml:name>Lennox Generating Station</fsml:name>
   <fsml:latitude>N44*8'33"</fsml:latitude>
   <fsml:longitude>W76*51'9"</fsml:longitude>
   <fsml:length>300m</fsml:length>
   <fsml:width>150m</fsml:width>
  </rdf:Description>

  </rdf:RDF>

Actually, this is *not* exactly identical because the RDF spec has a
bizarre requirement that when you use rdf:Description explicitly the
processor has to build about a zillion extra tuples for reification
purposes, whether you want them or not.  Go figure.


All the best,


David

-- 
David Megginson                 david@m...
           http://www.megginson.com/

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 (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe 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.