Archive for June, 2007

have a different value (Web site translator) for the version attribute.

Thursday, June 28th, 2007

have a different value for the version attribute. In practice this works, despite the different and theoretically illegal values in the version attribute in RSS 0.91 and 0.92 documents, because many aggregators ignore the value in the version attribute. If you are writing an RSS 2.0 document, the start tag of the rss element should be written as follows: You can also write it using single quote marks: The rss element has a single child element, the channel element. All content of the information feed document is contained in the channel element. Notice that there is no namespace declaration on the preceding rss start tag. For consistency with RSS 0.91 and 0.92, the elements of RSS 2.0 are in no namespace. This has the advantage of backwards compatibility but does mean there is a risk of naming collisions. In practice, the risk of naming collisions is slight because most non-RSS 2.0 elements likely to be found in an RSS 2.0 document are in a namespace, which allows the aggregator or other user agent to distinguish those elements from RSS 2.0 elements. The channel Element The channel element is the only permitted child element of the rss element. The channel element has no attributes. The remainder of an RSS 2.0 document consists of child elements or descendant elements of the channel element. The following child elements of the channel element are required in all RSS 2.0 documents. . title: Contains the name that refers to the information feed. If the information feed refers back to a Web site or blog, the value of the title element is typically the name of that site or blog. . link: Contains a URL that allows linking to the Web site or blog that s associated with the information feed. . description: Contains a brief description of the information feed. A minimalist RSS 2.0 document would therefore look like the following document:
http://www.tfosorcim.org/blog/ The Reflecting on Microsoft blog discusses issues relating to specific Microsoft products as well as the much larger issue of the competition between the proprietary and open-source approaches to software development.
123 RSS 2.0: Really Simple Syndication

How to cite a web site - The changes in RSS 2.0 from RSS 0.92

Wednesday, June 27th, 2007

The changes in RSS 2.0 from RSS 0.92 are, with one exception, fairly minor. For example, there are a few new elements and a few changes regarding what particular elements should contain. The one substantive change in RSS 2.0 is the use of XML namespaces. Using XML namespaces opens up possibilities for extending RSS 2.0 using modules. XML Namespaces in RSS 2.0 RSS 2.0 uses the XML namespaces technique specified in the Namespaces in XML recommendation, located at www.w3.org/TR/REC-xml-names/. Because versions 0.91 and 0.92 of RSS don t use XML namespaces, all the elements associated with those specifications are, inevitably, not in any XML namespace. Therefore, unlike the situation with RSS 1.0 where a namespace URI is defined, in RSS 2.0 all the RSS elements are in no namespace. The availability of XML namespaces allows RSS 2.0 documents to use elements from other namespaces, provided that an appropriate namespace declaration has been made. For example, you can use the Dublin Core module described in Chapter 10. New Elements in RSS 2.0 There are several new elements in RSS 2.0. Each is briefly described in the following list. The use of these new elements is described in more detail in the discussion on RSS 2.0 document structure. . author: An optional child element of the item element . comments: An optional child element of the item element . generator: An optional child element of the channel element . guid: An optional child element of the item element . pubDate: An optional child element of the item element . ttl: An optional child element of the channel element The RSS 2.0 Document Structure The RSS 2.0 document structure has many similarities to the structure of RSS 0.91 and RSS 0.92 documents. For convenience, if you choose to implement RSS 2.0 only, the document structure is described without requiring you to cross-reference the chapter on RSS 0.91 and 0.92. The rss Element The rss element is the document element of an RSS 2.0 document. It has a required version attribute with a value of 2.0. Supposedly, RSS 0.91 and 0.92 documents are legal RSS 2.0 documents but they The RSS 2.0 specification is located at http://blogs.law.harvard.edu/ tech/rss. 122 Chapter 12

12 RSS 2.0: Really Simple Syndication RSS 2.0, (Web hosting domain)

Wednesday, June 27th, 2007

12 RSS 2.0: Really Simple Syndication RSS 2.0, Really Simple Syndication, was announced in August 2000. It follows a line of inheritance from RSS 0.9x. RSS 2.0, unlike RSS 1.0, makes no use of the Resource Description Framework (RDF). However, RSS 2.0 does move one step closer to the RSS 1.0 approach, in that XML namespaces are adopted. Any RSS 0.91 document is supposed to be a legal RSS 2.0 document. At least if the value of the version attribute were changed to a value of 2.0 it might be legal. In practice, many aggregators will process the information feed document without taking account of the value of the version attribute of the rss element. The variations in the versions of RSS have taught many authors of aggregator tools to be generous in what markup is accepted for processing. Therefore, any discrepancy in the value of the version attribute is unlikely to cause a practical problem in the majority (or perhaps all) of aggregators. In this chapter you will learn: . What RSS 2.0 is . How to structure an RSS 2.0 document . What RSS 2.0 extensions are and how to use them What Is RSS 2.0? RSS 2.0 is, at the time of writing, the latest version of the development tree of RSS. It passes through the UserLand version of RSS 0.91 and RSS 0.92. In common with RSS 0.9x, RSS 1.0 avoids the use of RDF. It seems reasonable to conclude that the avoidance of RDF is partly a result of Dave Winer s preference for simplicity and his assumption that RSS feeds transmit information of largely transitory interest. Recall from Chapter 11 that those who see information feeds as conduits for disposable information don t see the value of using RDF in a feed, because metadata is unimportant for those developers who see information feeds as containing disposable, transitory information.

together with URIs to uniquely identify a fact. (Best web design)

Wednesday, June 27th, 2007

together with URIs to uniquely identify a fact. Facts are represented by RDF triples. RDF triples can be written in XML-compliant documents as RDF/XML. RSS 1.0 uses RDF to represent relationships between components of an RSS 1.0 information feed document. RSS 1.0 information feed documents can be extended using RDF-based modules that allow representation of additional associations between resources in RDF. In this chapter you learned that… . RDF is used in RSS 1.0 and provides a way to associate pieces of information using URIs. . RDF relies on a data model that uses the concepts of resource, predicate, and object. . RDF/XML is the typical way to serialize the RDF data model. 119 RDF: The Resource Description Framework

At present, most people (How to cite a web site) don t use FOAF in

Wednesday, June 27th, 2007

At present, most people don t use FOAF in their information feeds. Many aggregators don t yet handle FOAF markup. In time, perhaps, associations between people can be followed in aggregators. You might want to express the notion of a query as follows, Find information feeds of people who Danny Ayers has expressed a relationship with and who also blog or write on RSS and Atom. You can do something similar to this now by visiting various sites and manually reviewing the blogroll, adding some individuals to your chosen information feeds, and so on. However, just as viewing Web pages is evolving from manually visiting sites to automatically following information in sites using information feeds, so it seems possible in the not-too-distant future you might follow relationships between people using FOAF or some similar specification. RDF Toolkits Tools to make use of RDF are becoming more widely available. This section briefly describes some RDF tools. Jena Jena is an open-source project that is developing a Java API for RDF. Detailed information about the Jena project is located at http://sourceforge.net/projects/jena/. It provides an RDF API, an RDF parser (ARP), an RDF query language (RDQL), an OWL (Web Ontology Language) API; and rule-based inference for RDFS and OWL. A mailing list for discussion of Jena is located at www.yahoogroups.com/ group/jena-dev. Redland Redland is a multilanguage API for RDF. At its heart it is written in C. The C code is wrapped in APIs for languages such as Python, Perl, PHP, and Java. Detailed information on Redland is available at http:// librdf.org/. RDFLib RDFLib is a Python library for manipulating RDF. RDFLib includes an XML/RDF parser and serializer and a triple store. Further information on RDFLib is located at www.rdflib.net/. rdfdata.org There is still relatively little RDF data available on the Web. One useful source of RDF data is the Web site at http://rdfdata.org/, which lists sources of RDF data that you can access across the Web. Summary The Resource Description Framework, RDF, provides a way for machines to process metadata, which is data about data. RDF provides a data model that uses the notions of resource, predicate, and object 118 Chapter 11

RDF Vocabularies RSS 1.0 documents, because they are (My web server)

Tuesday, June 26th, 2007

RDF Vocabularies RSS 1.0 documents, because they are RDF documents, can be processed by RDF processors. More often, they are processed by information feed aggregators that treat the content pretty much as XML rather than RDF or might limit awareness of RDF to the previously described association between rdf:li elements and item elements. However, other RDF vocabularies can be included inside RSS 1.0 documents. These vocabularies are covered in the following sections. Dublin Core The Dublin Core RSS 1.0 module, described in Chapter 10, is an RSS-standardized version of the wider Dublin Core Metadata Initiative, which is expressed in RDF. Full information about the Dublin Core Metadata Initiative is located at http://dublincore.org/. FOAF You saw earlier in this chapter how RDF can express relationships between a resource, its properties, and their values. RDF is also well-suited to capture information about human relationships. The Friend of a Friend specification which, at the time of writing, is undergoing development, attempts to capture and express information about human relationships in ways that can be expressed in markup or visually. The FOAF specification is located at http://xmlns.com/foaf/0.1/. The version number, 0.1, indicates that the FOAF specification is very much at an early stage of development. The following markup is contained in the RSS 1.0 information feed for Danny Ayers and attempts to express some information about Danny: Danny 669fe353dbef63d12ba11f69ace8acbec1ac8b17 There is a person whose nickname is Danny. You will sometimes see a foaf:name element used to express the same notion. This person has a homepage located at http://dannyayers.com. The person has a foaf:mbox_sha1sum property with a value of 669fe353dbef63d12ba11f69ace8acbec1ac8b17. Other FOAF elements such as foaf:img can be used to associate this person about whom you already have learned something with a visual representation of that person. The more FOAF elements are used the more you begin to build up a picture (forgive the pun) of the person. The rdfs:seeAlso element allows machines to access additional RDF-based information about the person. This begins to put in place the pieces of information that allow machine-based association of information. The processing of FOAF data enables the beginning of a machine-based version of the World Wide Web, with the URIbased information being the machine-targeted equivalent of hyperlinks in HTML or XHTMLWeb pages. 117 RDF: The Resource Description Framework

. Resource (Web domain) discovery: RDF can improve the relevance

Tuesday, June 26th, 2007

. Resource discovery: RDF can improve the relevance of resources returned by search engines. . Cataloging: RDF can allow relationships between parts of the content of a Web site or other source of information to be represented more meaningfully. . Intelligent agents: RDF can be used to facilitate the exchange of information between information systems. . Intellectual property: RDF can be used to express intellectual property rights for documents or collections of documents. One widely used piece of software that uses RDF under the covers is the Mozilla browser and its associated Firefox and Thunderbird companion products. RDF and RSS 1.0 Having briefly introduced some foundational parts of RDF, it s time to look in a little more detail at the use of RDF elements in RSS 1.0. The document element of each RSS 1.0 document is an RDF element, the rdf:RDF element. Each of the child elements of the RSS 1.0 rdf:RDF element, that is the channel, item, image, and textinput elements, must have an rdf:about attribute. The values in such rdf:about attributes are used to associate two elements in different parts of the RSS 1.0 document. For example, each item listed inside the items element has an rdf:resource attribute: The URI specified in each rdf:resource attribute must match the URI specified in an item element elsewhere in the RSS 1.0 document: Typically, the URI specified in these two attributes is a URL that specifies the location from which the resource associated with the URI can be retrieved. Formally, it is the link element, which is a child of the item element that contains the URL that allows the item to be retrieved. Often, however, the URI associating the rdf:li and item elements is character for character identical to the URL which is the content of the link element. The rdf:Seq element is used inside the items element since a sequence of items is being specified. Typically, the order of items inside the rdf:Seq element will be used by an aggregator to determine display order for the information feed items. In RSS 1.0 the rdf:Seq element is used in preference to the rdf:Bag, because the content of rdf:Seq is ordered, unlike the content of rdf:Bag. 116 Chapter 11

Web design seattle - How RDF and XML Are Related It doesn t

Tuesday, June 26th, 2007

How RDF and XML Are Related It doesn t take much imagination to realize that sending directed graphs across the Internet isn t, typically, a very practical solution. In order to express the RDF model (which we won t discuss in detail because the purpose of discussing RDF in this book is to help you understand its use in RSS 1.0) and send it across the wire, you need a way to serialize the RDF model. Serialization is the creation of a series of characters to represent the model. One way to do that is to serialize RDF as XML, which is called RDF/XML. All the RDF elements and attributes that you saw in RSS 1.0 documents or markup fragments are written in RDF/XML. You saw earlier that a URI is used in the arc of a directed graph. Having seen that, the way that parts of an RSS 1.0 document are related might now become clearer. Inside the channel element you will see an items element whose content represents the table of contents of an information feed: Each of the two rdf:li elements has a resource attribute that contains a URI. Somewhere else in the same document, you find the following markup relating to one item in the information feed:
http://www.XMML.com/2005/03/19.html This item describes what happened on March 19th.
Putting this in terms of the RDF triple, you could say the following: The [item in the TOC] has a URI http://www.XMML.com/2005/03/19.html associated with [the content of an item element] I hope you can see that the connection expressed in the preceding two pieces of RSS 1.0 markup is an XML-based way of expressing the relationship between the item in the TOC and the item elsewhere in the information feed document. In other words, the URI in the rdf:resource and rdf:about attributes corresponds to the arc of an RDF directed graph. What RDF Is Used For RDF, as mentioned earlier, is intended to provide a framework for machine processing of resources on the Web. RDF can be used in many situations, including those in the following list: 115 RDF: The Resource Description Framework

Then you need a way to uniquely refer (Free web hosting with ftp)

Monday, June 25th, 2007

Then you need a way to uniquely refer to the chapter. Because this is Chapter 11, use chapter11. A URI to identify uniquely the resource that is this chapter could reasonably be http://www.wrox.com/ 579169/chapter11/. So the statement can be rewritten as http://www.wrox.com/579169/chapter11/ has the author Andrew Watt The author (which is the predicate) can also be represented by a URI, perhaps http://www.wrox.com/ 579169/chapter11/author/. It becomes a bit clumsy in English to recast the previous statement using two URIs in it, but they fit nicely in the RDF way of looking at this the directed graph. Directed Graphs In RDF the directed, labeled graph is the default way to express an instance of the RDF data model. Because the RDF triple describing the author of this chapter is a simple example based on the RDF data model, you can express it as a simple directed, labeled graph. Figure 11-1 shows a directed, labeled graph that expresses as an RDF triple the notion that Andrew Watt is the author of this chapter. Figure 11-1 The resource is shown on the left in the round cornered rectangle. It s a node representing the resource and identified by the URI you chose earlier. The predicate (the URI representing the author) is shown as a URI, which labels the arc, which connects the resource node to the object node. An RDF triple can be represented by two nodes and an arc connecting them. There are three varieties of node, only two of which are used in Figure 11-1. The uriref type of node uses a URI reference, in this case to uniquely identify a chapter in a particular book (this chapter in this book). The literal node contains the name of this chapter s author. Directed labeled graphs can, of course, be much more complex than shown in Figure 11-1. For example, it uses literal text to represent the name of the author. But because this same person has written other chapters and other books you might want to use a URI to uniquely identify him. The literal value Andrew Watt is ambiguous. There might be hundreds of people with the same name. If he is identified by a URI, his relationships to other chapters in this book and to other books can be explored, as can his gender, eye color, and so on. If the various pieces of information were available publicly and appropriately associated with a unique URI such as http://www.andrewwatt.com/theguy/ then an RDF processor could bring those pieces of information together in a way that allows you to build up a picture of the characteristics and relationships of the person. Identifying people as objects and resources can seem a bit unnatural. It s also not usually convenient for human beings to identify each other by URIs. But on a global network some unique identifier is needed if related pieces of information are to be unambiguously associated. The URI provides a machine-processable solution. http://www.wrox.com/579169/chapter11/ Andrew Watt http://www.wrox.com/579169/chapter11/author/ 114 Chapter 11

The RDF Triple In RDF, the fundamental way

Monday, June 25th, 2007

The RDF Triple In RDF, the fundamental way to conceptualize a fact is through the RDF Triple. To convey a fact, three pieces of information are needed: a subject, a property, and a value. To express a fact, you need these three pieces of information. In the following example, the subject is chapter, the property is author, and the value is Andrew Watt. This chapter has the author Andrew Watt To express the same notion in a more generalized, abstract way, consider this: [The subject] has [a property] with this [value] The subject is the thing being described; in this case the subject is this chapter. In RDF jargon, the subject is a resource. The property is some characteristic of the resource. For example, it might be an attribute of the resource, or some relationship of the resource. In RDF jargon the property is called a predicate. The value corresponds to a value of the predicate. In RDF jargon the value is called the object. So, you can rewrite the preceding generalized form as [The resource] has a [predicate] with this [object]. For many newcomers to RDF the jargon does get in the way. If you find it easy to think that a subject has a property with a particular value, you might initially find it difficult to think in terms of a resource having a predicate with an object. Personally, I find it much more natural to think in terms of subject, property, and value. But whoever said that computing was natural? Now that you know the terms that RDF uses for the concepts that are part of the simple statement, This chapter has the author Andrew Watt how can you identify which chapter you are talking about? It s fine to use the term This chapter inside this chapter, but how can you refer in an unambiguous way to this chapter from other chapters inside this book or other books or other places that aren t books at all? To solve this problem, RDF uses URIs. Using URIs in RDF URIs are used to identify resources. So how can you use a URI to help identify which chapter you mean by the term this chapter ? What URI should be used? This book is published by Wrox Press. So, in constructing a URI, it seems a good choice to start with http://www.wrox.com. Of course Wrox publishes many books. So you need a way to identify the book. Using the last six digits of the ISBN, 579169, seems a reasonable approach. 113 RDF: The Resource Description Framework