First Task Coursework 1

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 clearly derived from SGML. It is as well accurate to the fact that XML sets rules for electronic credentials by encoding. In addition, XML enclose all the functional uniqueness of SGML. SGML is the worldwide typical for markup language. In other words it is the Top Brand of all the markup languages in the world . The variety of  languages are called SGML applications.

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. The XIML language is constructive for boundary design because it can be used across any platform that has a parser for the XIML syntax.
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. XSL is not the only way to display XML data. However, it provides you with a simple declarative solution. Also, because XSL syntax is XML itself, you don't have to learn a whole new syntax to begin writing XSL stylesheets. With respect to CSS1, XSL supports all available functions, so that an accurate mechanical translation from CSS to XSL is possible. The difference between CSS and XSL is that while CSS is declarative and not user-extensible, XSL is primarily declarative, but is user-extensible using the ECMAScript language. XSL uses a XML notation, and CSS uses it's own.


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>