Sunday 31 October 2010

Week 2 Exercise


What is Ajax?

Asynchronous JavaScript and XML or Ajax for short is new web development technique used for the development of most interactive website. Ajax helps you in making your web application more interactive by retrieving small amount of data from web server and then showing it on your application. Thus you can do all these things without refreshing your webpage. 

In other meaning  Ajax is:
Asynchronous :This means that when you send a request, you wait for the response to come back, but are free to do other things while you wait. The response probably won’t come back immediately, so you set up a function that will wait for the response to be sent back by the server, and react to it once that happens.

Tuesday 26 October 2010

Week 2 Exercise

 How to Measure and Define a Well-formed XML

To define a well-formed XML document is that it matches the basic or minimum specifications for any XML. in other meaning tags starting with a  greater than bracket  and a lesser than bracket < > must have a matching once typed. furthermore any attributes within the opening tag element must be quoted either with "or'.Because XML is case sensitive program, the opening and closing elements must match. So open and close tags must be in the same case when a close tags is identified it must hold the same text value as the most recent start tag. in accordance, note that a well-formed XML and valid XML documents are two different meanings

Week 2 Exercise

 How to Check the Validity of  a XML Document


Valid XML Document

What is a Valid XML document to be exact, it is well informed and also matches criteria as laid out in DTD or Document Type Definition.Because it is typically specified in a DTD file which is reference at the top of the XML file. 

Furthermore if the XML does not contain Document Type Definition  information then there is no difference between a check for well-formed and a check for validity of a XML document.on my knowledgeable research that i have done It's important that XML files are syntactically correct. This is rather different from HTML, where by and large web browsers would tolerate a measure of badly formed code.

The checks of validity on an XML file work at two levels: check is well-formed  and check is valid. in additional you can use an xml parser which is a processor that reads an XML document and determines the structure and properties of the data in short description it's a (validity checker) to make sure that they are not violating the rules.

Saturday 23 October 2010

ADVANCED WEB TECHNOLOGIES AND XML: LEARNING BY DOING

First Task Coursework 1

ADVANCED WEB TECHNOLOGIES AND XML: LEARNING BY DOING

INSTRUCTIONS:

For each question, select one response for each question and write its letter into the brackets provided.
Then add the required comments to each question.
Do not guess, if you do not know the correct answers.

1)       What is the “X” in XML and what is its significance? Select one response and write the letter
here [ B  ]
a) Extended
b) Extensible
c) Extreme
d) Extendable
The “X” is significant because _it makes it much easier to share and search resources that are different formats. thus The significance of XML to companies like Microsoft is only now becoming clear, with the company describing its .Net initiative as “a platform for XML web services”. Through XML, Microsoft’s applications can communicate with those running on other platforms.


 What is a markup language? Select one response and write the letter
here [   C  ]
a)       A system of symbols to support the transmission of morse code.
b)       A system to display website standards to which a website conforms,
c)       A system of embedded codes to make an electronic document
                display on a web page as required
d)       A system to only prepare documents for publication

Describe in your own words ­­­­­­­­: A markup language is a combination of words and symbols which give instructions on how a document should appear. For example, a tag may indicate that words are written in italics or bold type. Although the most common and most widely used markup languages are written for computers, the concept of a markup language is not limited to computer programming.


2)       What does SGML stand for? Select one response and write the letter
here [   ]
a)         Standard Generalized Markup Language
b)         Structured Generalized Markup Language
c)         School of Global Management and Learning
d)         Simplified Generic Machine Language

What is the significance of SGML ­­­­­­­– SGML provides a standardised method to assign attributes to a text and define the structure of the text, so SGML is descriptive i. E it explains the contextual significance of a language  ranther than being procedural.


3)       What is the relationship between SGML and XML? Select one response and write the letter
here [   D  ]
a)       SGML is based on XML
b)       SGML and XML are the basis for HTML
c)       SGML is a slimmed-down, streamlined version of XML
d)       XML is a slimmed-down, streamlined version of SGML

Why is this so? ­­­­­­­­SGML or Standard Generalized Mark-up Language is the international standard for defining descriptions of the structure and content in electronic documents. XML is a simplified version of SGML: XML was designed to maintain the most useful parts of SGML. Whereas SGML requires that structured documents reference a Document Type Definition to be “valid” XML allows for well formed data and can be delivered without a DTD, XML on the other hand was also designed so that SGML can be delivered as, XML over the web.

4)       What is the relationship between SGML and HTML? Select one response and write the letter
here [ B    ]
a)       HTML is a mark-up language derived from SGML
b)       SGML is a mark-up language derived from HTML
c)       Both are derived from XML
d)       Both are derived from AJAX

Why is this so?  SGML can truly be called the parent of HTML, SGML was developed and standardized by the International Organization for Standards (ISO) in 1986. SGML itself does not specify any particular formatting; rather, it specifies the rules for tagging elements. These tags can then be interpreted to format elements in different ways.thus it describes the relationship between a document and  its structure.


5)       Which of the following statements are true? Select one response and write the letter
here [   D  ]
a)       Special-purpose packages have been derived from HTML
b)       HTML is an application derived from XML
c)       Special-purpose markup languages have been derived from XML
d)       XML supports HTML

Give examples ­­­­­­­­ - ­­­­­­­­ as in the code of XML, you can embed HTML codes, for illustration:  
<p element><p>This is a paragraph of text…</p>HTMl code embedded within XML <p element>…and this is another paragraph.</p>

Which of the following statements DOES NOT apply to XML?  Select one response and write the letter
here [  B   ]
a)       XML is a set of rules for encoding documents electronically
b)       XML is an predecessor of SGML
c)       XML explicitly identifies the knowledge structure in the encoded document, so that software packages can use this structure
d)       XML approach allow you to specify the presentation of the document, and the hypertext links

Explain your choice - XML is the simplified version of SGML and cleary derived from SGML.

6)       Which of the following statements DOES NOT apply to XML?  Select one response and write the letter
here [ A    ]
a)       XML underpins the www
b)       XML underpins office apps
c)       XML supports the creation new markup languages
d)       XML is written in Java

Give examples ­­­­­­­­ XML underpins the most up-to-date version of HTML which is called XHTML and is the strength of character of web services. Because web services will enable machine to machine communication using XML languages  

7)       What is XIML? Select one response and write the letter
here [   C  ]
a)                                           Extensible Intelligent Markup Language
b)                                           Extended Invisible Markup Language
c)                                            Extensible Interface Markup Language
d)                                           Extraterrestrial Interactive Markup Language

Explain your answer ­­­­­­­­- XIML is an XML-based language that represents the critical elements of a user interface, along with their attributes and their relationships. In sum, it captures the structure and design of a user interface.

8)       What is XUL? Select one response and write the letter
here [  B   ]
a)                                           Extensible Unseen Markup Language
b)                                           XML User Interface Language
c)                                            Extensible Universal Language
d)                                           Extreme UML

Explain your answer - Pronounced "zool. by the Americans " Short for Extensible User-Interface Language, a series of XML tags that allow different operating platforms to exchange data that describe a program's  user interface. XUL is designed to ease cross-platform (e.g., Windows, Mac and Linux) interface of applications, which traditionally would have been difficult to customize from one to another.  thus XUL supports cascading style sheets, JavaSpcript, RDF, DOM and HTML. Since it is an XML language, all features available to XML are also available to XUL. Some of the interface elements that are easily set up using XUL include the list below
  1. Toolbars and Buttons
  2. Menu bars and Pop-up Menus
  3. Tabbed Dialogs
  4. Keyboard Shortcuts
  5. Scroll bars
What is XSL? Select one response and write the letter
here [   D  ]
a)                                           As a standards language
b)                                           An alternative to XML
c)                                           Extensible Universal Language
d)                                           As a stylesheet language



Explain your answer ­­­­­­­­- XSL is a language for expressing style sheets. An XSL style sheet is, like with CSS, a file that describes how to display an XML document of a given type.

9)       Below is some XML.  What is the last line? Select one response and write the letter
here [  B   ]
a)                                           <end>
b)                                           </note>
c)                                           <note>
d)                                           <note/>

 <?xml version="1.0"?>
<note>
    <to>Class</to>
    <from>Ray</from>
    <heading>Reminder</heading>
    <body>Don't forget to complete your Blog!</body>

10)   Below is some XML.  What is the missing line? Select one response and write the letter
here [   D  ]


a) <Header>
b) <Body>
c) <painting>
d) </caption>

<?xml version="1.0" encoding='UTF-8'?>
<painting>
  <img src="madonna.jpg" alt='Foligno Madonna, by Raphael'/>
  <caption>This is Raphael's "Foligno" Madonna, painted in
  <date>1511</date>-<date>1512</date>
</painting>

15)  Write an XML document that contains the following information: your name. Your email address. Your student number. Your home town. Your date of birth. Choose appropriate tags. Use Attributes for the date of birth.

<?xml version="1.0" encoding="iso-8859-1"?>
<student>
<name>Pa Modou</name>
<email>pa@hotmail.com</email>
<HomeTown>Wembley</HomeTown>
<date-of-birth>
<day>10</day>
<month>09</month>
<year>1989</year>
</date-of-birth>
</student>





16)  Have a look at the XML document below. Identify all the syntax errors. The corrections indentified by myself are highlighted in colour purple any comments would be appraised  thank you.


Note :  Most of the syntax errors were from incorrectly used tags by Mixing lower case words with upper case, in other word the tags should be opened and closed using the same case. Furthermore  from what i have identified the syntax errors seemed to be cause by not closing a tag, this simple errors would have been a major fault for the browser to read the document.


<?xml version= “1.0” ?>
<!DOCTYPE countryCollection SYSTEM "countryList.dtd">
<CountryList>
<Nations TotalNations =”3”/>
<!--Data from CIA --Year Book -->
            <Country CountryCode=”1”>
                        <OfficialName>United States of America</officialName>
        1. <officialName> United States of America</officialName>
                      2.    <Label>Common Names:</label>
                        <label>Common Names:</label>  
                     3.    <CommonName>United States</commonName>
         <commonName>United States</commonName>


                    4.    <CommonName>U.S.</commonName>
                       <commonName>U.S.</commonName>

                   5.      <Label>Capital:</capital>      
                          <label>Capital:</capital>     

                   6.     <Capital cityNum=”1”>Washington, D.C. </label>
                          <capital cityNum=”1”><label>Washington, D.C. </label></capital>

                    7.      <2ndCity cityNum=”2”>New York </2ndCity>
                         <secondCity cityNum=”2”>New York </ secondCity>  

                    8.    <Label>Major Cities:</label> 
                         <label>Major Cities:</label>  

                    9.   <MajorCity cityNum=”3”>Los Angeles </majorCity>
                          <majorCity cityNum=”3”>Los Angeles </majorCity>

                   10.   <MajorCity cityNum=”4”>Chicago </majorCity>
                          <majorCity cityNum=”4”>Chicago </majorCity>
                       
                   11.  <MajorCity cityNum=”5’>Dallas </majorCity>
                          <majorCity cityNum=”5’>Dallas </majorCity>
                       
                   12.   <Label>Bordering Bodies of Water:</label> 
                           <label>Bordering Bodies of Water:</label> 

                    13.    <BorderingBodyOfWater> Atlantic Ocean </borderingBodyOfWater>
                             <BorderingBodyOfWater> Atlantic Ocean </BorderingBodyOfWater>

                   14.   <BorderingBodyOfWater> Pacific Ocean </borderingBodyOfWater>
                           <BorderingBodyOfWater> Pacific Ocean </BorderingBodyOfWater>         

                   15.   <BorderingBodyOfWater> Gulf of Mexico </borderingBodyOfWater>       
                           <BorderingBodyOfWater> Gulf of Mexico </BorderingBodyOfWater>

                   16.   <Label>Bordering Countries:</label>
                          <Label>Bordering Countries:</Label>   

                   17.   <BorderingCountry CountryCode=”1”> Canada </borderingCountry>
                          <BorderingCountry CountryCode=”1”> Canada </BorderingCountry>      

                 18.   <BorderingCountry CountryCode =”52”> Mexico </borderingCountry>
                          <BorderingCountry CountryCode =”52”> Mexico </BorderingCountry>

19. </country>
      </Country>

            <Country CountryCode=”81”>

          20.         <OfficialName> Japan </officialName>
                       <OfficialName> Japan </OfficialName>


          21.          <Label>Common Names:</label>    
                        <Label>Common Names:</Label>   

          22.         <CommonName> Japan </commonName>
                         <CommonName> Japan </CommonName>

         23.          <Label>Capital:</label>
                        <Label>Capital:</Label>

         24.          <Capital>Tokyo</capital cityNum=”1”>
                         <Capital cityNum=”1”>Tokyo</Capital>

        25.           <2ndCity cityNum=”2”>Osaka </2ndCity>
                        <SecondCity cityNum=”2”>Osaka </ SecondCity >

        26.            <Label>Major Cities:</label>
                        <Label>Major Cities:</Label>
                       
        27.             MajorCity cityNum=”3”>Nagoya </majorCity>
                         <MajorCity cityNum=”3”>Nagoya </MajorCity>

       28.               <MajorCity cityNum=”4”>Osaka </majorCity>
                        <MajorCity cityNum=”4”>Osaka </MajorCity>
                       
       29.                 <MajorCity cityNum=”5’>Kobe </majorCity>           
                          <MajorCity cityNum=”5’>Kobe </MajorCity> 
           
      30.                <Label>Bordering Bodies of Water:</label>
                             <Label>Bordering Bodies of Water:</Label>

     31.                 <BorderingBodyOfWater>Sea of Japan </borderingBodyOfWater>

                          <BorderingBodyOfWater>Sea of Japan </BorderingBodyOfWater>

    32.                 <BorderingBodyOfWater>Pacific Ocean </borderingBodyOfWater>
                          <BorderingBodyOfWater>Pacific Ocean </BorderingBodyOfWater>
   33.       </country>
              </Country>

            <Country CountryCode=”254”>
   34.                   <OfficialName> Republic of Kenya </officialName>
                           <OfficialName> Republic of Kenya </OfficialName>

  35.                      <Label>Common Names:</label>
                        <Label>Common Names:</Label>   
           
  36.                      <CommonName> Kenya </commonName>
                            <CommonName> Kenya </CommonName>

  37.                   <Label>Capital:</label>
                        <Label>Capital:</Label>

  38.                     <Capital cityNum=’1’>Nairobi </capital>
                           <Capital cityNum=’1’>Nairobi </Capital>

  39.                      <2ndCity cityNum=’2’>Mombasa</2ndCity>
                           <SecondCity cityNum=’2’>Mombasa</ SecondCity >
  40.                      <Label>Major Cities:</label> 
                        <Label>Major Cities:</Label>          

  41.                     <MajorCity cityNum=’3’>Mombasa </majorCity>
                            <MajorCity cityNum=’3’>Mombasa </MajorCity>

  42.                      <MajorCity cityNum=’4’>Lamu </majorCity>
                           <MajorCity cityNum=’4’>Lamu </MajorCity>

 43.                     <MajorCity cityNum=’5’>Malindi </majorCity>
                        <MajorCity cityNum=’5’>Malindi </MajorCity>

 44.                      <MajorCity cityNum=’6’ cityNum=’7’>Kisumu-Kericho </majorCity>          
                           <MajorCity cityNum=’6’ cityNum=’7’>Kisumu-Kericho </MajorCity>

 45.                    <Label>Bordering Bodies of Water:</label>
                          <Label>Bordering Bodies of Water:</Label>

 46. <BorderingBodyOfWater <!--Also Lake Victoria --> > Indian Ocean            </borderingBodyOfWater>

<BorderingBodyOfWater <!--Also Lake Victoria --> > Indian Ocean </BorderingBodyOfWater>




Sunday 17 October 2010

Week 1 Introduction to XML, History

During the First week of Lecture CMT3315 we were given questions to research in the history of XML.  For the duration of the lecture we talked about what is XML what it is about, etc.


1. What was the first Browser to read XML????  

Microsoft Internet Explorer 4 was the first browser to support XML.  To accomplish this, IE4 uses the external MSXML parser that can break a document's XML tags into an object tree.  Values contained in structured tag sets are exposed as objects that can be manipulated within the browser by JavaScript.  The next generation of browsers, however, will natively recognize and parse XML documents. 

Use of DOM (Document Object Model) XML Object Model

Short for Document Object Model, the specification for how objects in a Web page (text, images, headers, links, etc.) are represented. The DOM defines what attributes are associated with each object, and how the objects and attributes can be manipulated.

Unfortunately, the two leading browsers -- Netscape Navigator and Microsoft Internet Explorer -- use different DOMs. This is one reason why their respective implementations of DHTML are so different. Both companies have submitted their DOMs to the World Wide Web Consortium (W3C) for standardization, which now has the daunting task of specifying a standard DOM without alienating either of the browser giants. The W3C's DOM specification will support both HTML and XML. In Addition the Development of xml Parsers xml parser is used to read files and passes them to processing application software. they are different varieties that Microsoft parsers that an application developers can use.


  

Tuesday 12 October 2010

Lord Browne To Walk The Plank

How tantanlising will this atrocity of coalition  government pact affect students all around the United Kingdom, including myself as i may have to fork out a £6,000 a year or more to pay for my future, which looks overshadowed by the Global recession and even greater problems to graduate and not find work. "Lord Browne anticipates the average student would leave university having borrowed around £30,000 to cover the fees and living expenses, Under his plans, students would not have to pay their fees immediately. Instead, the Government would pay the university's charges up to £6,000." this would clearly leave Britain with the next generation not having ambition to aim for better a future ahead, plus undermining their possibilities of achieving the greatest benefit the country can offer which is Education.