Books
in black and white
Main menu
Share a book About us Home
Books
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics
Ads

the semantic web a gide to the future of XML, Web Services and Knowledge Management - Daconta M,C.

Daconta M,C. the semantic web a gide to the future of XML, Web Services and Knowledge Management - Wiley publishing , 2003. - 304 p.
ISBN 0-471-43257-1
Download (direct link): thesemanticwebguideto2003.pdf
Previous << 1 .. 40 41 42 43 44 45 < 46 > 47 48 49 50 51 52 .. 116 >> Next

100
Chapter 5
to its simpler syntax and easy validation. In Table 5.3 we see the differences between the implementations of RSS. The XML syntax is simple and straightforward, but it does not make use of namespaces. The RDF syntax has four significant differences:
■■ The root element must be rdf:RDF.
■■ Namespaces must be used.
■■ The rdf:Seq container is used to list the resources described in the channel.
■■ RDF has required attributes like rdf:about and rdf:resource.
An important element of the XML RSS version (on the left) is the declaration of a Document Type Definition (DTD) to validate the contents of the document. This switching back and forth between a DTD and RDF demonstrates the fact that these applications do not highlight RDF's main strength: predicates.
Table 5.2 Dublin Core in RDF and HTML
RDF VERSION HTML VERSION
<?xml version="1.0" ?> <HTML>
<!DOCTYPE rdf:RDF PUBLIC “-//DUBLIN <HEAD>
CORE//DCMES DTD 2002/07/31//EN" <TITLE> Buddy's TV Service </TITLE>
“http://dublincore.org/documents/2002/ <link rel = “schema.DC"
07/31/dcmes-xml/dcmes-xml-dtd.dtd"> href =
<rdf:RDF “http://purl.org/DC/elements/1.0/">
xmlns:rdf = <meta name = "DC.Title"
“http://www.w3.org/1999/02/22-rdf- content = "Buddys TV Services
syntax-ns#" Web Site">
xmlns:dc = <meta name = “DC.Creator"
“http://purl.org/dc/elements/1.1/" > content = “Michael Daconta">
<rdf:Description <meta name = “DC.Format"
about="http://c2i2.com/~budstv" /> content = “text/html">
<dc:title> Buddys TV Service <meta name = “DC.Language"
Web Site </dc:title> content = “en">
<dc:creator>Michael </HEAD>
Daconta</dc:creator> <BODY>
<dc:format>text/html</dc:format> <H1> <CENTER> Buddy's TV Service
<dc:language>en</dc:language> </CENTER></H1>
</rdf:Description> <HR>
</rdf:RDF> <CENTER> <IMG SRC= "stripmap.jpg" /> </CENTER> <UL> <! — omitted for brevity —> </BODY> </HTML>
Understanding the Resource Description Framework
Table 5.3 RSS in XML and in RDF
RSS IN XML
<?xml version="1.0" ?>
<!DOCTYPE rss PUBLIC
“-//Netscape Communications//DTD RSS
0.91//EN"
"http://my.netscape.com/publish/
formats/rss-0.91.dtd">
<rss version="0.91">
<channel>
<title>Super News Site</title> <link>http://snn.com</link> <description>News for Insomniacs </description>
<language>en-us</language> <copyright>Copyright 2003 SuperNews</copyright>
<managingEditor> editor@snn.com </managingEditor>
<webMaster>
webmaster@snn.com
</webMaster>
<image>
<titl e>WriteTh eWe b</title>
<u rl>http://sn n.com/logo.gif</ u rl>
<link>http://snn.com</link>
<width>88</width>
<height>31 </height> <description>News for insomniacs </description>
</image>
<item>
<title>The Next Web</title> <link>http://snn.com/article1</link> <description>This article explores how the semantic web will change business.</description>
</item>
<item>
<title>Syndication controversy </title>
<link>http://snn.com/article2</link> <description>How the RSS format flipflops have caused strife and confusion among developers.</description> </item>
</channel>
</rss>
RSS IN RDF
<?xml version="1.0" ?>
<rdf:RDF xmlns:rdf= "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/
elements/1.1/"
xmlns:sy=
“http://purl.Org/rss/1.0/modules/
syndication/"
xmlns:co="http://purl.org/rss/1.0/ modules/company/" xmlns="http://purl.org/rss/1.0/" > <channel rdf:about= "http://snn.com">
<title>News for Insomniacs</title> <link>http://snn.com</link> <description>News for Insomniacs</ description>
<dc:publisher>Super News Network</dc:publisher> <dc:creator>Michael Daconta</ dc:creator>
<sy:updatePeriod>hourly</
sy:updatePeriod>
<sy:updateFrequency>2</
sy:updateFrequency>
<image rdf:resource= "http://snn.com/logo.gif" />
<items>
<rdf:Seq>
<rdf:li resource= "http://snn.com/article1" />
<rdf:li resource= "http://snn.com/article2" /> </rdf:Seq>
</items>
</channel>
<image rdf:about="http://snn.com/ logo.gif">
<title>News for Insomniacs</title> <url>http://snn.com/logo.gif</url> <link>http://snn.com</link> </image>
<item rdf:about= "http://snn.com/article1">
<title>The Next Web</title>
(continued)
[102]
Table 5.3 (continued)
RSS IN XML RSS IN RDF
<link>http://snn.com/article1</
link>
<dc:description>
This article explores how the semantic web will change business. </dc:description>
<dc:publisher>Super News Network</dc:publisher>
<co:name>XM L.com</co:name> <co:market>NASDAQ</co:market> <co:symbol>SNN</co:symbol> </item>
<item rdf:about="http://snn.com/ article2">
<title>Syndication Controversy</ title>
<dc:description> How the RSS format flip-flops have caused strife and confusion among developers.</ dc:description>
<link>http://snn.com/article2"/
</link>
</item>
</rdf:RDF>
The explicit expression of associations between entities is not available in XML documents and is therefore a major benefit of RDF. Two applications of RDF that stress association between entities are the Publishing Requirements for Industry Standard Metadata (PRISM), available at http://www.prismstan-dard.org, and the Friend Of A Friend (FOAF) vocabulary, available at http://xmlns.com/foaf/0.1/. While we will not go into the details of these formats, it is encouraging that the proficiency with RDF is growing to the point where compelling vocabularies are being developed.
Previous << 1 .. 40 41 42 43 44 45 < 46 > 47 48 49 50 51 52 .. 116 >> Next