Wednesday, 28 October 2009

rethink


Today lesson was very interesting it was all about character how they came about and why. One of the interesting thing was ASIIC have used 7 bit to create 128 characters because in 1960 computer power where not as powerful as today. But as computers increase processing power so does the creation of more characters. For example Unicode have used, even maybe pushed the limit beyond necessary in creating a system which can hold over 4 billion character, In my understanding on this planet you would not find so many character unless we start interacting with other (A.I).
Unicode, they are very good in keeping historical information and making new character available from different culture for computation but I can’t see any programming advantage in digitalising dead language.
Q1 This is not a well-formed XML document becasue it does not follow the syntax.which is...


  • XML documents must have a root element

  • XML elements must have a closing tag

  • XML tags are case sensitive

  • XML elements must be properly nested

  • XML attribute values must be quoted




  • Q2
    XML with correct syntax is "Well Formed" XML.
    XML validated against a DTD is "Valid" XML.

    Q3
    It is always a good idea to write a comment not only in XML but in all other programming language. comment help other users to understand the document with out going through the entiry document line by line. one of the great benfite of comment it saves time for the next programmer, which is trying to you XML docuement created by other programmers.

    SECOND PART





    < !DOCTYPE BOOK [
    < !ELEMENT DOCUMENT(BOOK*) >
    < !ELEMENT BOOK(Title,Author,Publisher,PageVerso,Copyright,ISBN,Chapter,Dedication*) >
    < !ELEMENT Title (#PCDATA) >
    < !ELEMENTAuthor (FName,LName) >
    < !ELEMENT FName (#PCDATA) >
    < !ELEMENT LNAME(#PCDATA) >
    < !ELEMENT Publisher (Pname,Paddress) >
    < !ELEMENT Pname (#PCDATA) >
    < !ELEMENT Paddress (#PCDATA) >
    < !ELEMENT PageVerso (#PCDATA) >
    < !ELEMENT Copyright (#PCDATA) >
    < !ELEMENT ISBN (#PCDATA) >
    < !ELEMENT Chapter (Cno,Ctitle,Section) >
    < !ELEMENT Cno (#PCDATA) >
    < !ELEMENT Title (#PCDATA) >
    < !ELEMENT Section (Sno,Stitle,Bodytext) >
    < !ELEMENT Sno (#PCDATA) >
    < !ELEMENT Stitle (#PCDATA) >
    < !ELEMENT Bodytext (#PCDATA) >
    ] >

    Wednesday, 21 October 2009

    TEST

    Week 4

    1.What does XML and CSS stand for?
    Xml stand for Extensible Markup Language.
    css stand for Cascading Style Sheets.

    2.Is this XML line well-formed? say why?
    <b><i>This text is bold and italic</b></i>

    This is not well formed XML because the start and the end tags are not the same if you in see the above code the (b) is the outside tag,it should have also been the outer tag too at the end of the code.

    3.Is the XML document well-formed?say why.
    <?xml> version ="1.0"?>
    <greeting>
    hello world
    </greeting>
    <greeting>
    hello mars too!
    </greeting>

    Yes this is well-formed XML the outer and inner tag are in the correct order. but is missing root tagoth tag are the same this might have other implication down the line why you try to implement the css to this code.unless you want both greeting to have the same style.

    Part 2

    <?xml version="1.0";>
    <class_info;>
    <course;> Advanced Web Technologies <course>
    <Building;> Hatchcroft </Building>
    <Room;>H104 <Room;>
    <Start Time;> 9:30 </Start Time>
    <End Time ;>12:30 < /End Time>
    < Time Start="9:30" end="11:30" >
    </class_info>

    This code is desing using XML but blog will not allow me to show the code.

    2

    The bookstore tag do not close

    <book category= "children'>
    has two different end quotation mark
    number between TAG
    comment inside TAG

    3
    <! DOCTYPE memo
    [
    <!ELEMENT memo(to,from,heading,body,securityclass?)>
    <!ELEMENT Securityclass (#PCDATA)>
    <!ELEMENT memo serialnumber CDDATA REQUIRED>
    ]>