Thursday

CSS and XML

Using CSS in XML Document.

Following is the example of using CSS in XML document

This is an CSS file


xsmp

{
width:3in;
height:2in;
clear:none;
overflow:scroll;
font:14pt 'Century Gothic',serif;
color:blue;
margin:0.5in;
padding:0.25in;
border:solid blue;
display:block;
}

greeting

{

display:block;
font-family: Century Gothic, Book Antiqua; font-size: 26pt;
width: 30em;
color:red;

}

question

{
display:block;
font-size:x-large;
color:brown;
}

answer.ans

{
display:block;
font-size: 16pt;
color:green;
}


The following is the XML file with Style sheet link with it

<?xml version='1.0'?>

<?xml-stylesheet type="text/css" href="hello.css"?> //hello.css is the name of css file

<xsmp>

<greeting> Hello <extension> there ! </extension> </greeting>

<answer class = "ans">

<extension> Good Morning! </extension>


<question> How are you? </question>

</answer>

</xsmp>


The above picture shows the result on the browser

DTD Example

DTD stands for Document Type Definition. The DTD specifies the grammatical structure of an XML document, thereby allowing XML parser to understand and interpret the document's content. The DTD contains the list of tags that are within XML document, their types and attributes. More specifically, the DTD defines the way elements relate to one another within the document's tree structure and specifies the attributes, which may be used within certain elements. The DTD provides parser with clear instructions on what to check for when they determine the validity of an XML document.

Following is the XML file example using DTD

<?xml version="1.0"?>

<!DOCTYPE SHOWROOM

[
<!ELEMENT SHOWROOM (TV|LAPTOP)+>

<!ELEMENT TV (#PCDATA)>

<!ATTLIST TV count CDATA #REQUIRED>

<!ELEMENT LAPTOP (#PCDATA)>

<!ATTLIST LAPTOP count CDATA #REQUIRED>
]
>
<SHOWROOM> ELECTRONIC GOODS

<TV count="10"> SONY </TV>

<TV count="15"> PANASONIC </TV>

<TV count="5"> PHILIPS </TV>

<TV count="9"> LG </TV>

<TV count="20"> NIKSON </TV>

<LAPTOP count="8"> TOSHIBA </LAPTOP>

<LAPTOP count="12"> HP </LAPTOP>

<LAPTOP count="7"> COMPAC </LAPTOP>

<LAPTOP count="18"> IBM </LAPTOP>

<LAPTOP count="2"> DELL </LAPTOP>

</SHOWROOM>


The picture blow show the result on the browser.

XML first example

I am demonstrating the first example of xml document to show you how we will create it and how it looks like.


the above picture shows how the file be written in any text editor



the above picture illustrate the output of the file on browser

this is the first example and first program i have written in xml and hope that you will also do this example

Wednesday

VPN Topic One - Answers

VPN

VPN stands for Virtual Private Network. VPN is a communication network which is bridge through another network more securely and in encrypted way. The combination of these terms produces VPN – a private network , where the privacy is introduced by some method of virtualization. A VPN could be built between two end-systems or between two organizations, between several end-systems within a single organization or between multiple organizations across the global Internet, between individual applications, or any combination of the above.
Attractions of VPNs to enterprises include:

  • Due to shared facilities, may be cheaper, especially in capital expenditure (CAPEX) than traditional routed networks over dedicated facilities.
  • Can rapidly link enterprise offices, as well as small-and-home-office and mobile workers.
  • Allow customization of security and quality of service as needed for specific applications
  • Especially when provider-provisioned on shared infrastructure, can scale to meet sudden demands
  • Reduce operational expenditure (OPEX) by outsourcing support and facilities
Ref :

http://en.wikipedia.org/wiki/Virtual_Private_Network
www.potaroo.net/papers/1998-3-vpn/vpn.pdf

E-Business Topic One - Answers

BUILDING E-BUSINESS APPLICATION

Now a days e-business applications are very common, as all the business is done on the internet. We can build e-business application by using some of the languages and databases such as ASP, JSP, ORACLE, MYSQL n etc. There are lot of examples of e-business websites we see in our daily life. One of the most and popular is Ebay and Amazon.

HTTP Topic One - Answers

HTTP ELEMENTS

HTTP stands for Hyper Text Transfer Protocol used for showing the Hyper Text on the Browser. It is a stateless protocol. The key elements of HTTP are
Connection : It creates the connection between two nodes.
Request : The sending of the request to the server.
Response : The response of the server to the client request
Close : The closing of the connection

Ref: Ince, D 2004, Developing distributed and e-commerce applications, 3rd edn, Addison-Wesley, Harlow, Essex, UK.

Differentiate Topic One - Answers

INTRANET AND EXTRANET : Differentiate

An Intranet is the portal/network specifically designed for internal communication of small or large business, government institutes/sectors, industries or financial institute. It is custom build to meet the requirements of that particular business no matter where they situated.
"Extranet is somewhat very similar to Intranet. Extranets are designed specifically to give external, limited access to certain files of your computer systems to."
Intranets and extranets all have three things in common
"They both use secured Internet access to the outside world; Both can drastically save your company or organization a lot of money; Both need a user ID & password to control access to the whole system."

TCP Topic One - Answers

TCP PROTOCOL

Transport protocols assist communication between application programs. They are used to pass messages from one port to another. The message is passed through a connection, or connection-less method of communication. TCP(Transfer Control Protocol) is an example of the connection method of communication. TCP establishes a link between the IP addresses of the sourced and the destination ports. These ports are bound via this link till the connection is terminated or broken. A simple example is that of a telephone conversation - a connection is established, the conversation takes place, and then, the connection is terminated. TCP implements the connection as a stream of bytes from the source to the destination.

DNS Topic One - Answers

DNS

"On the Internet, the Domain Name System (DNS) associates various sorts of information with so-called domain names; most importantly, it serves as the "phone book" for the Internet: it translates human-readable computer hostnames, e.g. en.wikipedia.org, into the IP addresses that networking equipment needs for delivering information. It also stores other information such as the list of mail exchange servers that accept email for a given domain. In providing a worldwide keyword-based redirection service, the Domain Name System is an essential component of contemporary Internet use."

Ref: www.en.wikipedia.org

IP Protocol Topic One - Answers

IP PROTOCOL

Protocols help in passing information from one computer to another. Computers exchange packets of data known as IP (Internet Protocol) to communicate with each other. IP is the network protocol used to send information from one computer to an other over the Internet. The IP has to identify the source and the destination computers. It uses IP Addresses to do this i.e.(202.196.9.0).
IP provides several services:
Addressing. IP headers contain 32-bit addresses which identify the sending and receiving hosts. These addresses are used by intermediate routers to select a path through the network for the packet.
Fragmentation. IP packets may be split, or fragmented, into smaller packets. This permits a large packet to travel across a network which can only handle smaller packets. IP fragments and reassembles packets transparently.
Packet timeouts. Each IP packet contains a Time To Live (TTL) field, which is decremented every time a router handles the packet. If TTL reaches zero, the packet is discarded, preventing packets from running in circles forever and flooding a network.
Type of Service. IP supports traffic prioritization by allowing packets to be labeled with an abstract type of service.
Options. IP provides several optional features, allowing a packet's sender to set requirements on the path it takes through the network (source routing), trace the route a packet takes (record route), and label packets with security features.