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