- From: Charles McCathieNevile <charles@w3.org>
- Date: Sun, 5 Sep 2004 01:22:34 -0400 (EDT)
- To: Chaitanya Saragadam <go4chaitu_eng@yahoo.co.in>
- Cc: www-rdf-interest@w3.org
Very roughly, XML Schema and RDF let you define different things about your elements. In XML, you build a tree structure that you can put information into. The relation between the elements is essentially just parent-child-sibling and to understand what it means you can read the documentation included in the Schema. (Being able to explicitly do this is why XML schema is better than DTD for large schemas - you can reliably annotate a particular element in Schema, whereas in DTD the best guess is usually to look for comments close to the definition in the DTD, and hope you find something useful). In RDF you can express datatypes pretty much like you do in XML and human readable notes in a similar way to XML schemas. You can also express relations (something is a sub-class or sub-property of something else) between your elements and any other RDF terms anyone has defined, and you can express domain and range constraints (sort of like saying what the children of an element can be, although you're actually describing what things a given relation or property applies to). You can do this sometime after you started using the original schema, when you discover a new source of information. If you start by using RDF, then using OWL you can define more things about the elements, to give you some more of the syntactic validation stuff you can do with XML schema, while maintaining the possiblity to relate to other vocabularies. Again, you can refine this as you go. OWL also has some useful ways of describing versioning of your schema. Note that if you use OWL DL or OWL Lite you can't use all of RDF Schema - it's a trade-off between being able to guarantee that you can compute a result for a query - what DL/Lite give - and having more expressive power to deal with partial knowledge - what you get with OWL full, which is compatible with all the other bits of RDF specifications. There's a quick introduction to what RDF does in section 2 of the RDF Primer - http://www.w3.org/TR/rdf-primer/#statements (and there are lots of others around). For more information on defining classes and subclasses, properties, subproperties and the range and domain of properties I suggest looking at the RDF Primer - http://www.w3.org/TR/rdf-primer/#rdfschema introduces them. That section also gives some introduction to using datatypes - but these can be more generally applied. Have a look at the relevant section of the RDF Vocabulary Definition Language (http://www.w3.org/TR/rdf-schema - it used to be called RDF schema) for more. Using label and comment (and xml:lang to identify what language the labels are actually in) is in my opinion very important. There's a little bit on this in the Primer at http://www.w3.org/TR/rdf-primer/#otherschema and there are pplenty of examples (see my post in your more recent thread - http://lists.w3.org/Archives/Public/www-rdf-interest/2004Sep/0021.html - for an example). cheers Chaals On Tue, 31 Aug 2004, Chaitanya Saragadam wrote: >What is the difference rdf and xml , >rdf schema versus xml schema. > > see, > suppose, there is an xml file > file1.xml: > <x1> > <x2>5345</x2> > <x3> > <x4>34534</x4> > <x5>"cieaflkd"</x5> > </x3> > </x1> > ok, > now , the xml schema will define abt the elements and >its datatypes or its so called sub-elements. > >But here Rdf/xml file has, > <rdf> > <person> > <name> Uri or value </name> > <age> uri or value </age> > </person> > </rdf> > ok, > so where is the schema defined for the person >here.And what are the datatypes of name and ages , >where shud i define them ,like the one in xml schema. >Do i need to write one more rdf schema file defining >them?? > Pls clarify the concept clearly. >Thanx in advance, >bbye. > > > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail > Charles McCathieNevile http://www.w3.org/People/Charles tel: +61 409 134 136 SWAD-E http://www.w3.org/2001/sw/Europe fax(france): +33 4 92 38 78 22 Post: 21 Mitchell street, FOOTSCRAY Vic 3011, Australia or W3C, 2004 Route des Lucioles, 06902 Sophia Antipolis Cedex, France
Received on Sunday, 5 September 2004 05:22:34 UTC