Thursday, April 2, 2009

Study Guide Exercise 11

1. Conduct research on the Internet to find out what tools can be used to parse an XML document and ensure that the document is well formed and valid.

From the research that we conducted we were able to find 2 XML parser tool. The first one is built on C language. It is called the Expat, which is an XML parser library written in C. It is a stream-oriented parser in which an application registers handlers for things the parser might find in the XML document (like start tags). An introductory article on using Expat is available on xml.com. The second one is built on C++, it still does not have an official name yet. It prides itself in the small size which is only 104 Kb.

Reference:
http://www.applied-mathematics.net/tools/xmlParser.html
http://expat.sourceforge.net/


2. XML schema is a forthcoming development of the technology. Visit the
W3C website and search for information on schema. What are the benefits
of adopting a schema standardized for a business sector?

XML Schema
XML Schemas express shared vocabularies and allow machines to carry out rules made by people. They provide a means for defining the structure, content and semantics of XML documents. The benefits of adopting a standarized schema is that when doing integration with other organization, with the same schema all the system that is being integrated can communicate easily even though they all uses a different program.

Reference:
http://www.w3.org/XML/Schema

3. What are DOMs and why were they developed?
The Document Object Model (DOM) is a platform- and language-independent standard object model for representing HTML or XML documents as well as an Application Programming Interface (API) for querying, traversing and manipulating such documents. DOM was developed to enable different system to be able to manage different HTML and/or XML documents which also have diffferent standards.

Reference:
http://en.wikipedia.org/wiki/Document_Object_Model

4. Why are some developers using SAX instead of DOM for document
processing?

Unlike DOM, SAX have no formal specifications. The Java implementation is considered to be normative, and other languages implementations attempt to follow the rules that is being used in that implementation .
SAX parsers have certain benefits over DOM parsers. The memory needed for SAX to perform its functions is much smaller than that of DOM. This is because DOM parsers must have the entire inout data in memory before any processing can begin.By contrast, SAX memory usage is based only on the maximum depth of the XML file (the maximum depth of the XML tree) and the maximum data stored in XML attributes on a single XML element. Because both of these are always smaller than the size of the whole input data itself, SAX memory usage is always smaller.
Another advantage is that SAX document processing time is often faster than that of DOM. Due to the nature of DOM, streamed reading from disk is also impossible. Processing XML documents that could never fit into memory is only possible through the use of a stream XML parser, such as a SAX parser. Or a swap file.

Reference:
http://en.wikipedia.org/wiki/Simple_API_for_XML

5. SMIL is an application of XML. What is the purpose of this technology?
Where does it apply?

SMIL the Synchronized Multimedia Integration Language, is a W3C recommended XML markup language for describing multimedia presentations. It defines markup for timing, layout, animations, visual transitions, and media embedding, among other things. SMIL allows the presentation of media items such as text, images, video, and audio, as well as links to other SMIL presentations, and files from multiple web servers. SMIL markup is written in XML, and has similarities to HTML.
The purpose of SMIL is to handle Multimedia files in a web page better. It is very useful in a heavily loaded multimedia content webpage, because of all its functions, it enables developer to better manage a web page multimedia contents.

Reference:
http://en.wikipedia.org/wiki/Synchronized_Multimedia_Integration_Language

6. The current recommendation of W3C is to use XHTML as an alternative to HTML.

The Extensible Hypertext Markup Language, or XHTML, is a markup language that has the same depth of expression as HTML, but also conforms to XML syntax.
While HTML prior to HTML 5 was the application of Standard Generalized Markup Language (SGML), a very flexible markup language, XHTML is an application of XML, a more restrictive subset of SGML. Because they need to be well-formed, true XHTML documents allow for automated processing to be performed using standard XML tools—unlike HTML, which requires a relatively complex, lenient, and generally custom parser. XHTML can be thought of as the intersection of HTML and XML in many respects, since it is a reformulation of HTML in XML.

Reference:
http://en.wikipedia.org/wiki/XHTML

7. Do you think adopting XHTML is a wise move?

At the current time, we do not think that adopting XHTML is a wise move. The lack of standard and support for XHTML means that they are still not a globally used language. As mention that even IE6 does not support XHTML. So it is clear that the use of XHTML, even though it is a better language than standard HTML, there is no use in adopting it if people still have problems accessing it.

Reference:
http://en.wikipedia.org/wiki/XHTML

No comments:

Post a Comment