Wednesday, October 28, 2009

Week 05

Qucik Questions

1. Yes. tthe prolog is missing.

Eg: <b>bold><b>


2. Different between well-formed and Valid XML

well-formed
well-formed XML is syntactically correct.
Not missing any closing tags and having your closing tags in the right order.
Generally Well-formed document cannot break any of the syntax rules.

Valid XML

Valid XML is XML that succeeds validation against a DTD. valid xml is always well-formed but well-formed xml is not always valid.
valid XML is semantically correct

3. Yes.
A comment allows people editing your XML to understand the different parts of the document. The comments are ignored by the browser or parser. So we can write any comment wht we want. It is really easy to unsderstand the code. So it wont give any confuse about coding.

<!DOCTYPE collegetextbook [
<!ELEMENT collegetextbook (titlepage,author,publisher,isbn,chapters )>
<!ELEMENT titlepage (#PCDATA)>
<!ELEMENT author (#PCDATA)>
<!ELEMENT publisher (#PCDATA)>
<!ELEMENT isbn (#PCDATA)>
<!ELEMENT chapters (#PCDATA)>
<!ATTLIST chapters chapterNo CDATA #REQUIRED>
]>

2. XML

Wednesday, October 21, 2009

Laboratory -04 Questions XML,

1. What is XML stand for? and CSS
XML -> Extensible Markup Language
CSS -> Cascading Style Sheet

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

No. Becuase the tags are not nested properly. it shold be like this,
<b> <i>This text is bold and italic<i></b>

3. Is this xml dovument well formed?

<?xml version="1.0" ?>
<greeting>
Hellow,world!
<greeting>
<greeting>
Hellow Mars too!
</greeting>

Yes. Becuase all the tags are properly closed and in the nested order and also it is not case sensitive.

Longer Question

1. XML document with the following information.
Name of the class, room name, start time and end time.

<?xml version="1.0"?>
<myinfo>
<course>Internet Application Development</course>
<building>hatchcraft</building>
<roomName>H104</roomName>
<startTime HH="09" MM="30">09:30</startTime>
<endTime HH="12" MM="30">12:30</endTime>
</myinfo>

2. Wrong syntax
i) <1stEdition>2005</1stEdition> //cannot start with number
ii) <2ndEdition>2005</2ndEdition> //cannot start with number
iii) <price>19.99</price> //wrong attributes placement
iv) <!--est selling -->
v) </Price> //case sensitive
vi) <1stEdition>2005</1stEdition> //cannot start with number
vii) <1stEdition>2003</1stEdition> //cannot start with number
viii)<2ndEdition>2008</2ndEdition> //cannot start with number
ix) <discount>29.95</discount > //wrong closing tag
x) <author><!--other authors not listed -->></author> // commenting tag
xi) <1stEdition>1994</1stEdition> //cannot start with number
xii) ix) <discount>29.95</discount > //wrong closing tag
xiii) ix) <bookstore></bookstore > //no closing tag for bookstore

03. Creating a DTD for a XML

<!DOCTYPE memo
[
<!ELEMENT memo (to,from,heading,body,date,securityClass?)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDATA)>
<!ELEMENT date (#PCDATA)>
<!ELEMENT sn (#PCDATA)>

<!ATTLIST memo sn (#PCDATA requirment)>

]>

Wednesday, October 14, 2009

XML - Lab Seesion 3

Lab Session 3
Today we learnt following things in XML.
XML (Extensible Markup Language)
XML Declations & Comments
Tags and Naming Convention in XML with an example of tute
XML Attributes
XSL


We created a Simple xml file in class.

DTD (Document Type Defination)
Internal DTD Declaration


External DTD Declaration


CDATA
CDATA means character data.

Friday, October 2, 2009

Initial Questions

What is HTML

HTML, which stands for Hyper Text Markup Language, is the predominant markup language for web pages. It provides a means to create structured documents by denoting structural semantics for text such as headings, paragraphs, lists etc as well as for links, quotes, and other items. It allows images and objects to be embedded and can be used to create interactive forms. It is written in the form of HTML elements consisting of "tags" surrounded by angle brackets within the web page content.

  • HTML stands for Hyper Text Markup Language
  • HTML is not a programming language, it is a markup language
  • A markup language is a set of markup tags
  • HTML uses markup tags to describe web pages
What is XHTML?

Extensible Hypertext Markup Language, or XHTML, is a family of XML markup languages that mirror or extend versions of the widely used Hypertext Markup Language (HTML), the language in which web pages are written.

Versions of XHTML

XHTML 1.0

December 1998 saw the publication of a W3C Working Draft entitled Reformulating HTML in XML. This introduced Voyager, the codename for a new markup language based on HTML 4 but adhering to the stricter syntax rules of XML. By February 1999 the specification had changed name to XHTML 1.0: The Extensible HyperText Markup Language, and in January 2000 it was officially adopted as a W3C Recommendation.

XHTML 1.0 Strict is the XML equivalent to strict HTML 4.01, and includes elements and attributes that have not been marked deprecated in the HTML 4.01 specification.

XHTML 1.0 Transitional is the XML equivalent of HTML 4.01 Transitional, and includes the
presentational elements (such as center, font and strike) excluded from the strict version.

XHTML 1.0 Frameset is the XML equivalent of HTML 4.01 Frameset, and allows for the definition of frameset documents—a common Web feature in the late 1990s.

The second edition of XHTML 1.0 became a W3C Recommendation in August 2002.

What is XML

XML (Extensible Markup Language) is a set of rules for encoding documents electronically. It is defined in the XML 1.0 Specification produced by the W3C and several other related specifications; all are fee-free open standards.

XML’s design goals emphasize simplicity, generality, and usability over the Internet. It is a textual data format, with strong support via Unicode for the languages of the world. Although XML’s design focuses on documents, it is widely used for the representation of arbitrary data structures, for example in web services.

There are a variety of programming interfaces which software developers may use to access XML data, and several schema systems designed to aid in the definition of XML-based languages.

As of 2009, hundreds of XML-based languages have been developed, including RSS, Atom, SOAP, and XHTML. XML-based formats have become the default for most office-productivity tools, including Microsoft Office, OpenOffice.org, and Apple's iWork.