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 18, 2009
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
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.
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 & 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)
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
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)>
]>
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.
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
CDATA
CDATA means character data.
Subscribe to:
Posts (Atom)