Wednesday, December 2, 2009

Week -10

Quck question

01)
the most specific form of the rule will take effect, and the other rule will be ignored.

Longer Questions

02) Only if the item 10000 was in an elemetn of its own. something like this.

The grandoldduke

Longer Questions

01)

chemElements
{
width:90%;
background-color:#aabbaa;
font-family:arial;

}

tableHead
{
color:#001100;
font-weight:bold;
font-size:17px;

}

anumHead,nameHead,symbolHead,mptHead,bptHead
{
float: left;
width: 20%;
background-color:#aaaa;


}

element
{
display:block;
}

anum,name,symbol,mp,bt
{
float: left;
width: 20%;


}



02)
a)

/*

b)

tracks[@total="5"]

c)
title[contains(name),"Penderecki"]

d)
title[string-length(name))>11]

Week - 09

We did a exam on this week about we learnt so far from the first week of the lecture.
We preapared for the multiple questions and wrriten the answers for it.

Wednesday, November 18, 2009

Week - 08

01) a) No. CSS cannot rearrange the order.


b) It is possible.


c) <?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/css" href="legalWrit.css"?>

02) Different between URI and URL

URI - Uniform Resources identifier is a string of charector used to identify the internet Locator.

URL - Uniform Resources locator is a part of URI and it specifies the global address of documents and other resources on the World Wide Web.

Eg: ftp://www.krishlk.com/stuff.exe
http://www.krishlk.com/index.html

03) XML langauge Namespaces.

The purpose of an XML namespace is to allow the deployment of XML vocabularies (Elements and attrubutes) in a public environment and to reduce the risk of name collisions in a given document when vocabularies are combined.XML namespaces are used for providing uniquely named elements and attributes in an XML document.

Longer Questions

01)

meme.xml

<?xml version="1.0"?>

<?xml-stylesheet href="stylesheet01.css" type="text/css"?>

<!DOCTYPE memo>
<!--
Document : memo1.xml
Created on : 2009/11/18
Author :
Description:
Purpose of the document follows.
-->

<memo>
<id>message>/id>
<date>18 November 09>/date>
<time>09.30>/time>
<from>from: the Managing Director>/from>
<to>To: heads of all Departments>/to>
<message>We must increase production. And increasing sales would be no bad thing either.>/message>
>/memo>

Stylesheet01.css

memo{
display:block;
margin:1em;
}
id{
display:block;
margin:1em;
color:"dark blue"; text-align:left;
}

date{
display:block;
margin:1em;
color:"dark blue"; text-align:left;
}

time{
display:block;
margin:1em;
color:aqua; text-align:left;
}

from,to{
display:block;
margin:1em;
color:green; text-align:left;
}

message{
display:block;
margin:1em;
color:aqua; text-align:left;
}

Answer: The purpose to use the Display: block is to insert the new line brek between the tags.

Wednesday, November 11, 2009

Week - 07

Qick Questions

1) CDATA Sections
cdata-section-elements takes a whitespace-separated list of element names, e.g.

pre class="programlisting">cdata-section-elements="a b c d e"
(for use the number of charectors such as <

c) yes. < for <>

2) XML Parser The parser converts XML into a JavaScript accessible object (XML DOM) and validating the xml dovument. parser reads XML, and converts it into an XML DOM. 3) Yes. We can specify this in dtd file by using like this. jhk

Questions - Week 07

Qick Questions

1) CDATA Sections
cdata-section-elements takes a whitespace-separated list of element names, e.g.
cdata-section-elements="a b c d e"
(for use the number of charectors such as < c) yes. < for < and &amp for &.

2) XML Parser The parser converts XML into a JavaScript accessible object (XML DOM) and validating the xml dovument. parser reads XML, and converts it into an XML DOM. 3) Yes. We can specify this in dtd file by using like this. jhk

Wednesday, November 4, 2009

Week-06 Questions

01) what exacltly does a DTD do in XML?
An DTD document describes an XML document such as elements, attributes and entities.

02) Nothing. We can use it same as it is.

03) can you use a binary graphics file in an XML document?
Yes. we can use the binary file and parse it into parser.

Longer Questions:

01) Root Elemetn
a) i will use it as >? russianLang?<

b)
<? xml version="1.0" encoding="UTF-8"/?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >




c)write a dtd file
<!DOCTYPE phraseBook [
<!ELEMENT section(sectiontitle,phraseGroup)>
<!ELEMENT phraseGroup(engPhrase,translitPhrase,targLangPharse,gloss)>
<!ELEMENT sectiontitle(#PCDATA)>
<!ELEMENT engPhrase(#PCDATA)>
<!ELEMENT translitPhrase(#PCDATA)>
<!ELEMENT targLangPharse(#PCDATA)>
<!ELEMENT gloss(#PCDATA)>
<!ATTLIST phraseBook targLang CDATA #REQUIRED>
]>

d)
<? xml version="1.0" encoding="UTF-8"/?>

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.



Monday, January 26, 2009

CTL+ALT+DEL / POWER SAVING A Speech By Dr. A.P.J. Abdul Kalam
Jan 27, 2009 by krishnan

Be the Change You Want to See!

To All Those Who do not TRUN OFF Their PC's, AC's Lights Before Leving Office......-Speech By Dr. A.P.J. Abdul Kalam (Former President of India & Renowned Indian Scientist)Most of us in the IT field do one thing before leving for the day from office Press CTRL + ALT + DEL and leave happily that means your pc is still on.

one normal PC in sleep Mode (Hibernation) will consume 35 Watts/Hour. Based on this let's do a small calculation.For one week, 24 * 7 = 168 hours. Of this if we consider that we are working for 68 hours, than the pc is in Sleep mode for 100 hopurs a week. For one month, 4 * 100 = 400 hours. in a normal IT office, if we assume approximately 250 PCs are there 250 * 400 = 1,00,000 hours (Sleep Mode). So, the power wasted in an office in a month is 1,00,000 * 35 = 3500 KWH or units. if the charge per unit is indian rs. 6, then totally the wastage value is approximately indian Rs. 21,000Here the sad thing is not the money loss to the company but the power loss to the country. (Hope no company is bothered about this procedure of keeping the system in sleep mode.)apart from the loss to the country, we need to think of the efforts people are putting for producing the power in the mines, Thermal Stations, Hydro Electric Stations, etc. If this is to continue, the cost of unit power will go up and, at one stage, we will not get power even if were ready to pay any cost.So, before leaving office, take some time to shut down the PC and do some favour to the country and the organisation.Who is Dr. A.P.J. Abdul