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