2010-11-10

What is your vision on Web 3.0? What are the key technologies that will make it happen?



The term Web 3.0 is a very hot topic nowadays. However, as popular as it is, its definition is still not confirmed yet thanks to the many different meanings given to it by several experts which makes the definition of Web 3.0 one of the hottest debates in the history of the World Wide Web. According to the Wikipedia, an online encyclopedia, Web 3.0 is a third generation of Internet based Web services which emphasizes on machine-facilitated understanding of information in order to provide a more productive and intuitive user experience. The term "machine-facilitated" is very important as it summaries what Web 3.0 is all about. Unlike Web 2.0 which is about people communicating, contributing and collaborating and the results coming from the wisdom of crowds, Web 3.0 derives its "wisdom" from software that learns by searching, analyzing and drawing conclusions from online contents. Instead of depending on people to refine information and opinion, intelligent software would do the same thing. This transformation of the Web into an artificial intelligence technology, the Semantic web, is in my opinion what defines Web 3.0.

In the perspective of Semantic Web, Web 3.0 is an evolving extension of the World Wide Web in which web content can be expressed not only in its natural language but also in a form that can be understood, interpreted and used by software applications and thus permitting them to find, share and integrate information more easily. The Semantic Web was first thought up by Tim Berners-Lee, the inventor of first World Wide Web, and expressed as follows:

"I have a dream for the Web [in which computers] become capable of analyzing all the data on the Web – the content, links, and transactions between people and computers. A 'Semantic Web', which should make this possible, has yet to emerge, but when it does, the day-to-day mechanisms of trade, bureaucracy and our daily lives will be handled by machines talking to machines. The 'intelligent agents' people have touted for ages will finally materialize."
– Tim Berners-Lee, 1999

What is my rationale behind for defining Web 3.0 as Semantic Web? It is that I see the Semantic Web as a huge engineering solution for generalizing the format of the data on the Web in the form that can be easily processed by anyone and any system which makes the idea of Web 3.0 to be possible. The problem now for Web 2.0 is that majority of data published on the Web is generally hidden away in HTML files as the format of HTML is not as standardized as one may want to which makes it difficult for other systems and software applications to extract the data from the HTML web page. For example, if a HTML web page that is used to provide weather information to other software applications has changed its design and style, then those software applications have to change their methods of extracting information from the web page too to adapt to the new format of the HTML files. This is not workable as one may not know when the other web pages will change their HTML design and style. As a result, more and more web technologies such as RDF, OWL, SWRL and SPARQL have been developed with the aim of generalizing the format of the data on the Web in order to make the data understandable by other systems and software applications and thus evolve the World Wide Web into a new generation of Web 3.0 and Semantic Web. In this article below, I will try to describe some of the Semantic web technologies that will make this evolution into Web 3.0 possible.

The Semantic Web is generally built on syntaxes which utilize the triple based structures of the Uniform Resource Identifier (URI) to represent data. These syntaxes are called "Resource Description Framework" (RDF) syntaxes. RDF is designed to be read and understood by computers and not for being displayed to people. It is usually written in XML and makes use of XML syntax such as namespaces. RDF is often used as a framework for describing Web resources such as the title, author, modification date, content, and copyright information of a Web page and can be illustrated in the following example:

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:dc="http://rom1023.blogspot.com/">
    <rdf:Description rdf:about=" http://rom1023.blogspot.com/">
        <dc:title>What is your vision on Web 3.0? What are the key technologies that will make it happen?</dc:title>
                <dc:author>Roman</dc:author>
    </rdf:Description>
</rdf:RDF>

This piece of RDF basically says that this article has the title "What is your vision on Web 3.0? What are the key technologies that will make it happen?" and was written by someone whose name is "Roman".

The benefit for using RDF is that the information maps directly and unambiguously to a model which is decentralized and the data represented in RDF form is easy to be processed since RDF is a generic format which already has many parsers. This means that when you have a RDF application, you know which data are the semantics of the application and which data are just syntactic fluff. Thus, the data represented in RDF form can become a part of the Semantic Web.

Another popular Semantic Web technology is the Web Ontology Language (OWL) which is designed for software applications to process the online content instead of just presenting information to humans. OWL can facilitate machines to interpret the Web content better by providing additional vocabulary along with a formal semantics to describe the meaning of the terminology used in Web documents. This helps machines to perform useful reasoning tasks on these Web documents and thus be able to process any Web content that can be published by anyone. OWL provides three sublanguages designed for use by specific communities of implementers and users respectively and they are OWL Lite, OWL DL, OWL Full which is ordered by increasing expressiveness. Each of these sublanguages is an extension of its simpler predecessor. The following set of relations hold but their inverses do not:

  • Every legal OWL Lite ontology is a legal OWL DL ontology.
  • Every legal OWL DL ontology is a legal OWL Full ontology.
  • Every valid OWL Lite conclusion is a valid OWL DL conclusion.
  • Every valid OWL DL conclusion is a valid OWL Full conclusion.
The OWL family of languages support a variety of syntaxes and they are grouped into two categories which are high level syntaxes and exchange syntaxes. High level syntaxes are for specification and exchange syntaxes are more for general use. The below examples, which are taken from the W3C, show the syntax of the OWL2 Functional Syntax which is a high level syntax and OWL2 XML Syntax which is an exchange syntax.

OWL2 Functional Syntax

Ontology(
Declaration( Class( :Tea ) )
)

OWL2 XML Syntax

<Ontology ontologyIRI="http://example.com/tea.owl" ...>
   <Prefix name="owl" IRI="http://www.w3.org/2002/07/owl#"/>
   <Declaration>
     <Class IRI="Tea"/>
   </Declaration>
 </Ontology>

Consider an ontology for tea based on a Tea class as shown above. Every OWL ontology must be identified by an URI (http://www.example.org/tea.owl in this case). To save space, preambles and prefix definitions have been skipped for the above examples.

The main power of Semantic Web languages is that anyone can publish the languages easily by using the RDF that describes a set of URIs without the fear that they might get misinterpreted or stolen and with the knowledge that anyone in the world that has a generic RDF processor can use them. However, although the future of the Semantic Web technologies appears to be bright, they are still very much in their infant stage and there seems to be little consensus about the likely direction and characteristics of the early Semantic Web. Nevertheless, I still believe that the Semantic Web is a vision of the future of the World Wide Web and is what that defines the generation of Web 3.0.


References


2010-11-05

What are ID, IDREF, and IDREFS simple types in XSD? How is xs:unique used to constrain values? Give examples to explain the usage of these XSD constructs.




The purpose of the ID simple type in XSD is to define unique identifiers that are global to a document and emulate the ID attribute type available in the XML DTDs. The ID simple type provides a way to uniquely identify the containing element of the attribute defined using this data type through IDREF and IDREFS.

IDREF and IDREFS are simple types in XSD which can be used to refer to the values of the attributes with data type defined as ID and thus enabling links between documents. The difference between IDREF and IDREFS simple types is that IDREF simple type is a reference to the identifiers defined by the ID simple type whilst IDREFS is derived as a whitespace-separated list of what IDREF simple type can refer to.

The relationships between ID and IDREF / IDREFS simple types are synonymous with the primary key and foreign key relationship in the database. For every foreign key (IDREF / IDREFS), there must be a matching distinct and unique primary key (ID) which it is referring to.

For the identifiers defined in the ID, IDREF and IDREFS simple types to be valid:
  • The value of an ID simple type must be unique and distinct within the XML document.
  • For every identifier defined in IDREF and IDREFS simple types, the reference ID values must be in the XML document.
  • The value of an ID, IDREF and IDREFS must be a named token and neither numerical identifiers nor whitespace is allowed (for example, the integer value 202 can not be an ID value).
The following example illustrates the ID, IDREF and IDREFS approach. Notice that the element “orderID” is defined as ID simple type in XSD and it is represented by two values, “k1” and “k2”, in the example XML document. In the XML document, the value for the element “orderIDREF” must match the value of any elements “orderID” (in this case “k1” or “k2”) in order for the document to be valid. For the element “orderIDREFS”, its value can be made up of a list of the “orderID” element values separated by whitespace or a single value which match the value of any elements “orderID” just like the case for the element “orderIDREF”.

XML Schema

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="orders">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="order" type="orderDetails" />
                <xsd:element name="orderlist" type="orderLists" />
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
    <xsd:complexType name="orderDetails">
        <xsd:sequence>
            <xsd:element name="customerName" type="xsd:string"/>
            <xsd:element name="customerAddress" type="xsd:string"/>
            <xsd:element name="customerContact" type="xsd:string"/>
            <xsd:element name="orderIDREF" type="xsd:IDREF"/>
            <xsd:element name="orderIDREFS" type="xsd:IDREFS"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="orderLists">
        <xsd:sequence>
            <xsd:element name="orderID" type="xsd:ID" maxOccurs="unbounded"/>
        </xsd:sequence>
    </xsd:complexType>
</xsd:schema>

XML Document

<?xml version="1.0" encoding="UTF-8"?>
<orders>
    <order>
        <customerName>Test</customerName>
        <customerAddress>Test Address</customerAddress>
        <customerContact>12345678</customerContact>
        <orderIDREF>k1</orderIDREF>
        <orderIDREFS>k1 k2</orderIDREFS>
    </order>
    <orderlist>
        <orderID>k1</orderID>
        <orderID>k2</orderID>
    </orderlist>
</orders>

The W3C XML Schema contains many flexible XPath-based features for describing uniqueness constraint. One of these features is declared with the xs:unique element. The xs:unique element defines that an element or an attribute value must be unique within the scope.

The xs:unique element must contain the followings (in order):
  • one and only one selector element which contains an XPath expression that specifies the set of elements across which the values specified by the field must be unique
  • one or more field elements which contains an XPath expression that specifies the values that must be unique for the set of elements specified by the selector element. If there is a set of field elements, the values for a single field element may or may not be unique across the selected elements but the combination of all the fields must be unique
The following example illustrates the uniqueness constraint using xs:unique element. Each product element must have an id child element whose value is unique within products. If any product id is duplicated within the document, the document will be checked as invalid under the uniqueness constraint by the XML Schema.

XML Schema

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="products">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="product" maxOccurs="unbounded">
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element name="id" type="xsd:integer" />
                            <xsd:element name="name" type="xsd:string" />
                            <xsd:element name="price" type="xsd:decimal" />
                        </xsd:sequence>
                    </xsd:complexType>
                </xsd:element>
            </xsd:sequence>
        </xsd:complexType>
        <xsd:unique name="prodIDUnique">
            <xsd:selector xpath="./product"/>
            <xsd:field xpath="id"/>
        </xsd:unique>
    </xsd:element>
</xsd:schema>

XML Document

<?xml version="1.0" encoding="UTF-8"?>
<products>
    <product>
        <id>546</id>
        <name>Nike Soccer Ball</name>
        <price>120</price>
    </product>
    <product>
        <id>547</id>
        <name>Adidas Sports Shoes</name>
        <price>600</price>
    </product>
</products>


References

2010-09-29

Brief Introduction

Hi everyone,

Welcome to my blog! As you may know, my name is Roman and I'm writing this blog for one of my postgraduate course's assignments. This may sound puzzling right as you may wonder what kind of a course that will consider writing blog as a student's assignment and even mark the blog topics and count their marks to the final grading. Yes! This is exactly the course that I'm taking now and there is nothing irrelevant as what this course is teaching about is what makes blogging online become real and allows people to interact and share their ideas and comments almost instantly through a world-wide network. You may already have guessed the answer and it is nothing but "Web Technologies".

In this blog, you will find topics talking about the latest trend of Web technologies as well as the common techniques used to display, format and organize the information on the webpage. Most of these topics are written by me (remember I'm doing this for my assignment =P) and of course there will be some useful articles and information provided by some experts which I will post them separately on the "Articles" and "Presentations" pages to get you familiarize with the topics in my blog. Moreover, to make this blog more interactive, you are most welcome to leave your comments regarding the topics posted and you can also leave a message to me in the "Blog Talk" page.

I hope that this blog is useful to your understanding of the latest trend of Web technologies and don't forget to rate the topics that are written by me so that I can at least have a glimpse of how great a writer I am now =).

Cheers,
Roman