RDF Schema

|  | Search W3Schools : |

HOME | HTML | CSS | XML | JAVASCRIPT | ASP | PHP | SQL | MORE... |  | References | Examples | Forum | About

ADVERTISEMENTS XML Certification Download XML editor Custom Programming |  |

Table of contents

RDF Tutorial
RDF HOME
RDF Intro
RDF Rules
RDF Example
RDF Elements
RDF Containers
RDF Collections
RDF Schema
RDF Dublin Core
RDF OWL
RDF Reference
RDF Reference

Selected Reading

Web Statistics
Web Glossary
Web Hosting
Web Quality
W3Schools Tutorials
W3Schools Forum
Helping W3Schools

# RDF Schema (RDFS)

RDF Schema (RDFS) is an extension to RDF.

## RDF Schema and Application Classes

RDF describes resources with classes, properties, and values.

In addition, RDF also need a way to define application-specific classes and properties. Application-specific classes and properties must be defined using extensions to RDF

One such extension is RDF Schema.

## RDF Schema (RDFS)

RDF Schema does not provide actual application-specific classes and properties.

Instead RDF Schema provides the framework to describe application-specific classes and properties

Classes in RDF Schema is much like classes in object oriented programming languages. This allows resources to be defined as instances of classes, and subclasses of classes.

## RDFS Example

The following example demonstrates some of the RDFS facilities:

    <?xml version="1.0"?>

    <rdf:RDF
    xmlns:rdf= "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    xml:base=  "http://www.animals.fake/animals#">

    <rdf:Description rdf:ID="animal">
      <rdf:type
       rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
    </rdf:Description>

    <rdf:Description rdf:ID="horse">
      <rdf:type
       rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
      <rdfs:subClassOf rdf:resource="#animal"/>
    </rdf:Description>

    </rdf:RDF>

In the example above, the resource "horse" is a subclass of the class "animal".

## Example Abbreviated

Since an RDFS class is an RDF resource we can abbreviate the example above by using rdfs:Class instead of rdf:Description, and drop the rdf:type information:

    <?xml version="1.0"?>

    <rdf:RDF
    xmlns:rdf= "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    xml:base=  "http://www.animals.fake/animals#">

    <rdfs:Class rdf:ID="animal" />

    <rdfs:Class rdf:ID="horse">
      <rdfs:subClassOf rdf:resource="#animal"/>
    </rdfs:Class>

    </rdf:RDF>

That's it!

## Altova® XMLSpy® - The world's best-selling XML editor!

Whether you're new to XML or already an advanced user, the user-friendly views and powerful entry helpers, wizards, and debuggers in XMLSpy are designed to meet your XML and Web services development needs from start to finish.

- XML editor
- Graphical XML Schema / DTD editors
- XSLT 1.0/2.0 editor, debugger, profiler
- XQuery editor, debugger, profiler
- Support for Office Open XML (OOXML)
- Graphical WSDL editor & SOAP debugger
- Java, C#, C++ code generation
- And much more!

Download a fully functional free 30-day trial today!

WEB HOSTING
ASP.NET Shopping Cart
$15 Domain Name Registration Save $20 / year!
Buy UK Domain Names Register Domain Names
Cheap Domain Names Cheap Web Hosting
Best Web Hosting
PHP MySQL Hosting
Top 10 Web Hosting
UK Reseller Hosting
Web Hosting
FREE Web Hosting

WEB BUILDING
Website Templates Flash Templates Website Builder Internet Business Opportunity
Custom Programming
FREE Trial or Demo Web Content Manager Forms,Web Alerts,RSS
Download XML editor
FREE Flash Website
FREE Web Templates

EDUCATION
US Web Design Schools
HTML Certification
JavaScript Certification
XML Certification
PHP Certification
ASP Certification

HOME or Top of Page |  | Printer Friendly
W3Schools is for training only. We do not warrant the correctness of its content. The risk from using it lies entirely with the user. While using this site, you agree to have read and accepted our terms of use and privacy policy. Copyright 1999-2009 by Refsnes Data. All Rights Reserved.