Академический Документы
Профессиональный Документы
Культура Документы
Submitted By: Mukesh Madnani (IT 27) Nishit Agrawal (CS56) Ronak Neema (CS 68) Sanket Nayak (CS 73)
What is XML ?
XML stands for EXtensible Markup Language XML is a markup language much like HTML XML was designed to carry data, not to display data XML tags are not predefined. You must define your own tags XML is designed to be self-descriptive self-
NOTE : XML was designed to transport and store data, with focus on what data is Whereas HTML was designed to display data, with focus on how data looks
RESULT :
This text is bold This text is strong This text is big This text is emphasized This text is italic This text is small This is subscript and superscript
Why xml ?
XML was created to structure, store, and transport information. With XML You Invent Your Own Tags XML is Not a Replacement for HTML XML Separates Data from HTML XML Simplifies Data Sharing XML Simplifies Data Transport XML Simplifies Platform Changes XML Makes Your Data More Available XML is Used to Create New Internet Languages
XML Attributes
Attributes provide additional information about elements. Example : <person age=21"> <firstname>Ana</firstname> <lastname>Smith</lastname> </person>
<?xml version="1.0"?> <!DOCTYPE note [ <!ELEMENT note (to,from,heading,body)> <!ELEMENT to (#PCDATA)> <!ELEMENT from (#PCDATA)> <!ELEMENT heading (#PCDATA)> <!ELEMENT body (#PCDATA)> ]> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend</body> </note>
<?xml version="1.0"?> <!DOCTYPE note SYSTEM "note.dtd"> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>
And this is the file "note.dtd" which contains the DTD:
<!ELEMENT note (to,from,heading,body)> <!ELEMENT to (#PCDATA)> <!ELEMENT from (#PCDATA)> <!ELEMENT heading (#PCDATA)> <!ELEMENT body (#PCDATA)>
Using XML,Benifits can be achieved in Microsoft SQL Server 2000 Meta Data Services, they are like::: 1) You can export and import meta data between two repository databases. The diagram shows that you can exchange meta data between Repository A and Repository B through XML documents. 2) In the diagram, you can provide data from Repository A to Application A through an XML document. 3) You can import meta data from a tool or run-time runobject to a repository database. In the diagram, you can import meta data from Application A to Repository A through an XML document.
Diagram shows the relationship and flow of XML from one repository to another, and subsequently to other applications.
XMLHttpRequest Object
The The XMLHttpRequest object is used to exchange data with a server behind the scenes. The XMLHttpRequest object is a developer's dream, dream, because you can: Update a web page without reloading the page Request data from a server after the page has loaded Receive data from a server after the page has loaded Send data to a server in the background
XML to HTML
In the following example, we loop through an XML file ("cd_catalog.xml"), and ("cd_catalog.xml"), display the contents of each CD element as an HTML table row:
<html> <body> <script type="text/javascript"> if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET","cd_catalog.xml",false); xmlhttp.send(); xmlDoc=xmlhttp.responseXML; document.write("<table border='1'>"); var x=xmlDoc.getElementsByTagName("CD"); for (i=0;i<x.length;i++) { document.write("<tr><td>"); document.write(x[i].getElementsByTagName("ARTIST")[0].childNodes[0].nodeValue); document.write("</td><td>"); document.write(x[i].getElementsByTagName("TITLE")[0].childNodes[0].nodeValue); document.write("</td></tr>"); } document.write("</table>"); </script> </body> </html>
Output :
What is CSS?
CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to solve a problem External Style Sheets can save a lot of work External Style Sheets are stored in CSS files CSS defines HOW HTML elements are to be displayed.
HTML was intended to define the content of a document, like: <h1>This is a heading</h1> <p>This is a paragraph.</p> When tags like <font>, and color attributes were added to the HTML 3.2 specification, it started a nightmare for web developers. Development of large web sites, where fonts and color information were added to every single page, became a long and expensive process. To solve this problem, the World Wide Web Consortium (W3C) created CSS. In HTML 4.0, all formatting could be removed from the HTML document, and stored in a separate CSS file. All browsers support CSS today.
CSS Syntax: A CSS rule has two main parts: a selector, and one or more declarations:
CSS Example
p {color:red;text-align:center;} {color:red;text<html> <head> <style type="text/css"> p{color:red;textp{color:red;text-align:center;} </style></head> <body> <p>Hello World!</p> <p>This paragraph is styled with CSS.</p></body></html> Output: Hello World!This paragraph is styled with CSS.
Css file
CATALOG { backgroundbackground-color: #ffffff; width: 100%; } CD { display: block; marginmargin-bottom: 30pt; marginmargin-left: 0; } TITLE { color: #FF0000; fontfont-size: 20pt; } ARTIST { color: #0000FF; fontfont-size: 20pt; } COUNTRY,PRICE,YEAR,COMPANY { display: block;color: #000000; marginmargin-left: 20pt; }
Output
What is XSLT
XSL stands for EXtensible Stylesheet Language, and is a style sheet language for XML documents. XSLT stands for XSL Transformations CSS = Style Sheets for HTML While XSL = Style Sheets for XML
XSL describes how the XML document should be displayed! XSL consists of three parts: XSLT - a language for transforming XML documents XPath - a language for navigating in XML documents XSL-FO - a language for formatting XML XSLdocuments
How Does it Work? In the transformation process, XSLT uses XPath to define parts of the source document that should match one or more predefined templates. When a match is found, XSLT will transform the matching part of the source document into the result document.
XSLT code
<?xml version="1.0" encoding="ISO-8859-1"?> encoding="ISO-8859<!-<!-- Edited by XMLSpy --> --> <html xsl:version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"> <body style="font-family:Arial;font-size:12pt;background-color:#EEEEEE"> style="font-family:Arial;font-size:12pt;background<xsl:for<xsl:for-each select="breakfast_menu/food"> <div style="background-color:teal;color:white;padding:4px"> style="background<span style="font-weight:bold"><xsl:value-of select="name"/></span> style="font-weight:bold"><xsl:value- <xsl:value-of select="price"/> <xsl:value</div> <div style="margin-left:20px;margin-bottom:1em;font-size:10pt"> style="margin-left:20px;margin-bottom:1em;font<xsl:value<xsl:value-of select="description"/> <span style="font-style:italic"> style="font<xsl:value<xsl:value-of select="calories"/> (calories per serving) </span> </div> </xsl:for</xsl:for-each> </body> </html>
SGML
In this family of markup languages, Standard Generalized Markup Language (SGML) is the parent. SGML provides a way to define markup languages and form. sets the standard for their form. In other words, SGML states what some languages can or cannot do, what elements must be included, such as tags, and the basic structure of the language. As a parent passes on genetic traits to a child, SGML passes structure and format rules to markup languages
HTML
HyperText Markup Language (HTML) is a child, or application, of SGML. It is HTML that usually designs the page for an Internet browser. Using HTML, you can embed images, create page sections, establish fonts and direct the flow of the page. HTML is the markup language that creates the form and appearance of the web page. Additionally, using HTML, you can add page. languages, other functions to a website via scripting languages, JavaScript. such as JavaScript. HTML is the predominant language design. used for website design.
XML
Extensible Markup Language (XML) is a cousin to HTML and a nephew to SGML. Although XML is a markup language and therefore part of the family, it has different functions than HTML. XML is a subset of SGML, this give it rights that an application, such as HTML, doe not have. XML can define applications of its own. Resource Description Format (RDF) is an application of XML. HTML is limited to design and does not have subsets or applications. XML is a pared down, or light, version of SGML, bandwidth. designed to work with limited bandwidth. XML inherited genetic traits from SGML, but is created to make its own family. Subsets of XML include XSL and XSLT. XSLT.
Web Personalization
Web pages are personalized based on the characteristics (interests, social category, context, ...) of an individual. Personalization implies that the changes are based on implicit data, such as items purchased or pages viewed. The term customization is used instead when the site only uses explicit data such as ratings or preferences.
Personalization Categories
Profile / Group based Behaviour based (also known as Wisdom of the Crowds) Collaboration based
Methods of Personalization
Implicit Explicit Hybrid
Semantic Web
The Semantic Web is a "web of data" that enables machines to understand the semantics, or meaning, of semantics, information on the World Wide Web It extends the network of hyperlinked human-readable web humanpages by inserting machine-readable metadata about machinepages and how they are related to each other, enabling automated agents to access the Web more intelligently and perform tasks on behalf of users. The main purpose of the Semantic Web is driving the evolution of the current Web by allowing users to use it to its full potential, thus allowing them to find, share, and combine information more easily.
Ontology
ontology is a formal representation of knowledge as a set of concepts within a domain, and the relationships domain, between those concepts. It is used to reason about the entities within that domain, and may be used to describe the domain. Ontologies are the structural frameworks for organizing intelligence, information and are used in artificial intelligence, the Semantic Web, systems engineering, software Web, engineering, engineering, engineering, biomedical informatics, library informatics, science, science, enterprise bookmarking, and information bookmarking, architecture as a form of knowledge representation about the world or some part of it.