ECommerce LectureEcommerce, Web Services and XML July, 2002 A Web Robot - service available since 1994. A series of lectures presented in July 2002 for the subject - Comp3410 Information Technology in Electronic Commerce at the Department of Computer Science, Australian National University. The lecture series provides an introduction to XML, DTD's, schemas and XSL transformations presented in the context of web services. Two web services featured are an online robot and infrastructure for supporting Supervisory Control and Data Acquisition (SCADA) with thin clients utilising the GSM phone network for communication. Also discussed are SMS messaging on mobile phones and some
aspects of human behaviour important to the commercial success of web
services, in particular the significance of Zipfs distribution. Links to other eCommerce Lectures pages
XMLXML - eXtensible Markup Language Ken Taylor - incorporating course notes by Ramesh Sankaranarayana July 2001 A language for creating other markup
languages...
XML vs HTMLKen Taylor based on course notes by Ramesh Sankaranarayana July 2001
HTML defines format... Look at the following HTML example.
This will display as: John Doe 2 Backroads LaneTimbuctoo 045935435 John.Doe@Timbuctoo.com What we are specifying here is how the document is to be rendered, and not what information is contained in the document. While a human could read this and gather information about the embedded data, a machine could not. Humans can assist machines to obtain information from such pages by a technique known as page scraping. An example is Betman which interacts with the NSW TAB site. Decoupled contentKen Taylor based on course notes by Ramesh Sankaranarayana July 2001 XML defines content... What is being marked here is the structure of the data, not the way in which it is presented. The content has been decoupled from the presentation, which can now be done in several ways based on the same data. This form is readable by both humans and machines.
Interacting ApplicationsKen Taylor based on course notes by Ramesh Sankaranarayana July 2001 A programmable web...
Marking up data to define content allows easy exchange of information
between programs. Of course, both programs must have the same
understanding of the meaning and order of the tags. XML syntax rules and
the fact that the grammar of such tags can be specified, ensures that
this is possible. A non XML solution. Telerobot operators could design their own interface. ![]()
Web Services and ZipfsWeb Services and Zipfs Distribution Ken Taylor based on course notes by Ramesh Sankaranarayana July 2001 Be the best...
![]() As seen above, the Perth telerobot did show an approximate Zipf distribution of referrers but the discrepancy between the sample and the Zipf distribution is not due to sampling error. This is shown by the chi squared statistic of 5707 with 774 degrees of freedom which indicates that the probability of the difference being due to random sampling error is almost zero. Apart from the problem of classifying referrers, it was also observed that referral numbers changed over time. The telerobot was used by some school groups and was mentioned in the press from time to time. This causes short-term changes in the number of referrals from a particular address. This effect was strongest when the telerobot featured in radio shows Net Talk Live (1995) in the United States and Safari (Heldal 1998) in Norway. The largest number of requests to the ABB1400 telerobot recorded in a day (1782) occurred on the day the telerobot was featured on Net Talk Live. Referring sites also gain and fade in popularity over time which will affect the number of referrals they generate. The uncertainty of categorising referrers and the change in referrer numbers over time suggests that Zipf's law does not provide an adequate explanation for referral data however, it does seem to provide a useful approximation. Web Services and XMLKen Taylor based on course notes by Ramesh Sankaranarayana July 2001 Atomise...
History of XMLA bit of history... Ramesh Sankaranarayana July 2001 Where did the idea come from... In 1969, Charles Goldfarb was leading an IBM research project on integrated law office information systems. Together with Ed Losher and Ray Lorie, he invented the Generalized Mark-up Language (GML). It was used as a means of allowing the text editing, formatting and information retrieval subsystems to share documents. IBM now produces over 90% of its documents with it. Goldfarb carried on the work on GML and invented Standard Generalized Mark-up Language (SGML) in 1974. This was later adapted for use as an all-purpose information standard. It was established as an ISO standard in 1986. It is extremely powerful, but complex. Used quite a lot in the domain of electronic publishing. Then came Hyper Text Mark-up Language (HTML). Tim Berners-Lee and Anders Berglund invented a tag-based language for marking up technical documents that a group of scientists in Europe shared over the Internet. This was later expanded to a simplified application of SGML and called HTML, the mark-up language that we know and love. HTML is the language of the web for rendering of documents. It has a fixed set of tags and is used primarily for defining how content is to be displayed. It is a particular instance of a mark-up language and can't be used to define new mark-up languages. The World Wide Web Consortium (W3C) combined the power of SGML with the simplicity of HTML and came up with XML. It is a subset of SGML. The latest specification standard is XML 1.0, released in February 1998. The specification for XML is less than a tenth of the size of the SGML specification. It has many of the features of SGML including:
It is meant to be interoperable with both SGML and HTML. XML BasicsKen Taylor based on course notes by Ramesh Sankaranarayana July 2001 What you need to know...is a processing instruction. Conveys useful information to an application. The above says that this is an XML document and uses XML specification version 1.0. is a comment. You can't use a double hyphen inside a comment. is an element whose type name is contact. Every element has a start
tag and end tag. You can have nested elements.
Here; type, rating and year are attributes. The combination of elements and attributes, as shown in the examples above, can be used to define the structure of various types of data. In effect, each such definition represents a mark-up language for a specific type of data. Look at namespaces. Parsers and the DOMKen Taylor based on course notes by Ramesh Sankaranarayana July 2001 Makes it easy to manipulate... XML parsers or processors are used to check if an XML document obeys the XML syntax rules, conforms to the data model where one is specified and to provide access to the Document Object Model (DOM) interface. A document that obeys the rules is called a well-formed document. Parsers typically build tree structures from XML documents. There are many different XML parsers available. Examples are:
An alternative to manipulating an XML document with the DOM is SAX.
Many markup languages have been defined for different applications. Some
examples are:
When using such a language it is important to check that the resulting XML document obeys the rules of the underlying data model. For example, every movie element has to have the attributes type, rating and year. The data model can be specified Using Document Type Definitions (DTD)'s or Schemas. An XML parser can also check if the given XML document adheres to the specified data model. Such a parser is called a validating XML parser and an XML document that it successfully parses is called a valid document. It is not required that every XML document have an accompanying data model specification.
Validating XMLKen Taylor based on course notes by Ramesh Sankaranarayana July 2001 Describing Information... It is a well formed document, since it obeys all the rules of XML. But there is a required element that is empty. The only way that an XML processor, or some other application, can figure out that this element is not allowed to be empty is if it is provided with a specification of the underlying data model. There are two techniques for specifying document content. They are document type definitions and XML Schemas. DTDs are older and stable. Schemas are new and dynamic (a bad thing). DTD's require learning another new language. Schemas are defined with XML. DTD's are limited in what can be specified. DTD's define some important standards e.g. SVG. The DTD method of defining the data structure is something that is inherited from SGML. Specifying the rules that structure a document. is done using EBNF (Extended Backus-Naur Form). For example, the book document structure could be defined as follows: Every DTD must have a root element, which in this case is catalogue. says that the root element catalogue consists of one or more book
elements. says that the book element consists of the stated five sub-elements,
which have to appear in the same order, of which year may or may not
occur. The rest have to appear exactly once. indicates that the element title consists of parsed character data.
The above states that the root element of the XML document is
catalogue and the DTD is contained in an external file catalogue.dtd.
In contrast an internal DTD is contained within the document itself. This is done as follows: You can use both external and internal DTD's in the same docuemnt. If there are elements with the same name, then the internal one overrides the external one. Internal DTD's are used when:
SMS FormattingKen Taylor July 2001 How does SMS messaging work...
Transforming XMLKen Taylor July 2001 Turning XML into another form of XML...
Methods of transforming XML are:
Processing XSLT can be done with the Microsoft parser, there are other XSLT processors, Xalan recomended by a colleague, W3C XSLT standard is stable. Microsoft XSLT reference easier to interpret.
Soap in 1 minuteMike Kearney July 2001 Getting into a lather... Soap is yet another implementation of remote procedure calls, this time using XML over HTTP. Essentially soap is a standardised way of interacting with a web server using XML encoded requests and XML encoded reponses. These two diagrams for the client and the server illustrate this. For an overview of soap see this. Class ExerciseMike Kearney July 2001 Best way to provide web services...The lectures have discussed a variety of ways to interact with a web server. The following table enumerates most of the combinations. Examples discussed in the lectures are marked. ![]() There are three IT applications:
For each application discuss and be able to report on:
Organization and timing
Tutorial ExercisesKen Taylor based on course notes by Ramesh Sankaranarayana July 2001 Try these exercises...
|
Collaborations >