Download presentation
Presentation is loading. Please wait.
Published byPreston Hunt Modified over 9 years ago
1
XML About XML Things to be known Related Technologies XML DOC Structure Exploring XML
2
XML – eXtensible Markup Language is a technology for creating structured documents that can be exchanged b/w systems It allows us to store information in a structured and semi-structured way, and accessing it using a variety of techniques (Websphere, DB2..) XML is a set of rules for defining semantic (meaningful) tags that break a document into parts and identify the different parts of the document. It makes easy many web development tasks that are extremely difficult with HTML About………..
3
Things to be Known W3C’s (World Wide Web Consortium) Mobile Access Activity is working to ensure that the protocols and data formats of the web provide and effective fit for all mobile devices and web based applications. To support those and also multiple disparate (different) types of clients; it provides the standards, proposals of XML. W3C’s (World Wide Web Consortium) Mobile Access Activity is working to ensure that the protocols and data formats of the web provide and effective fit for all mobile devices and web based applications. To support those and also multiple disparate (different) types of clients; it provides the standards, proposals of XML. XSLT – XML Stylesheet Language provides techniques for transforming the structure or content of XML documents into WML or anything else. XSLT – XML Stylesheet Language provides techniques for transforming the structure or content of XML documents into WML or anything else. XHTML – eXtensible Hypertext Markup Language defines a document format that XML(ized) ;will display in a traditional browser. XHTML – eXtensible Hypertext Markup Language defines a document format that XML(ized) ;will display in a traditional browser.
4
HTML SGML Application WML XML Application Txpad. exe Tempest.xml Xerces Editor writes Document is read by Parser sends Browser displays User data to page to XML DOCUMENT LIFE CYCLE
5
Related Technologies Using XML as more than a data format involves several related technologies and standards, including the following: HTML for backward compatibility with browsers. The CSS and XSL style sheet languages to define the appearance of XML documents. URL’s and URI’s (Uniform Resource Identifier) to specify the locations of XML documents. (URI – more on resources, less on location.) Xlinks to connect XML documents to each other. The Unicode character set to encode the text of an XML document. (OS-appln. s/w to understand character set. – scripts.)
6
CSS- Cascading Style Sheets To tell the browser how to format the tags you’ve used. (user-send-style sheet must- browser). To tell the browser how to format the tags you’ve used. (user-send-style sheet must- browser). CSS, initially invented for HTML, define formatting properties such as font size, font family, font weight, paragraph indentation, paragraph alignment and other styles that can be applied to particular elements. CSS, initially invented for HTML, define formatting properties such as font size, font family, font weight, paragraph indentation, paragraph alignment and other styles that can be applied to particular elements. For Ex: specifying all H1 elements in 32 points. For Ex: specifying all H1 elements in 32 points.
7
XSL – Extensible Stylesheet Language It is a more powerful style language designed specifically for XML documents. It is a more powerful style language designed specifically for XML documents. It is actually 2 different XML applications. It is actually 2 different XML applications. i) XSL Transformations (XSLT) i) XSL Transformations (XSLT) ii) XSL Formatting Objects (XSL-FO) ii) XSL Formatting Objects (XSL-FO) XSLT stylesheet contains templates that match particular patterns of XML elements. XSLT stylesheet contains templates that match particular patterns of XML elements. A CSS style sheet can only change the format of a particular element. But XSLT can rearrange, reorder, hide or display elements. A CSS style sheet can only change the format of a particular element. But XSLT can rearrange, reorder, hide or display elements. XSL-FO is an XML application that describes the layout of the page. Specifies where the particular text is placed on the page with other elements (relation) on the page. XSL-FO is an XML application that describes the layout of the page. Specifies where the particular text is placed on the page with other elements (relation) on the page.
8
XLinks&Xpointers, Unicode XLinks use normal URL’s to identify the site to which they’re linking. XLinks use normal URL’s to identify the site to which they’re linking. Xpointers allow liknks to point not just to a particular document but to a particular part of a particular document at a particular location. Xpointers allow liknks to point not just to a particular document but to a particular part of a particular document at a particular location.
9
XML Document Structure Documents should contain the prolog that identifies them as being XML Documents must be well-formed, with no ‘overlapping’ elements. This is some Bold text --- Wrong This is some Bold text --- correct. All element and attribute names should be in lower case with attributes always in single or double quotes – even for numeric All elements must have a closing tag or equivalent shorthand syntax XML documents must follow a set of rules.
10
Use an id or name attributes with unique value for the document. This will allow XPath and XPointer to access elements and content more accurately. Use an id or name attributes with unique value for the document. This will allow XPath and XPointer to access elements and content more accurately. If the device supports stylesheets, use the element to attach the stylesheet, so clients that don’t support styling do not have to download the style sheet information If the device supports stylesheets, use the element to attach the stylesheet, so clients that don’t support styling do not have to download the style sheet information Only comments and doc type definitions can appear outside the root element. Only comments and doc type definitions can appear outside the root element.
11
EXPLORE - XML Markup can indicate three kinds of meaning: structural, semantic, or stylistic. Markup can indicate three kinds of meaning: structural, semantic, or stylistic. Structure specifies the relation b/w the different elements in the document. It merely expresses the form of the document, without regard for differences b/w individual tags & elements. Structure specifies the relation b/w the different elements in the document. It merely expresses the form of the document, without regard for differences b/w individual tags & elements. Semantic relates the individual elements to the real world outside the document itself. Semantic relates the individual elements to the real world outside the document itself. Style specifies how an element is displayed. Style specifies how an element is displayed.
12
Example EX1: EX1: greeting. xml Hello XML ! Hello XML ! EX2: EX2: paragraph. xml Hello XML ! Und’s HTML, not XML Hello XML ! Und’s HTML, not XML EX3: EX3: document. xml Hello XML ! Hello XML !
13
Writing a Style Sheet XML allows you to create any tags that you need. You also need to write a style sheet for the XML document that tells browser how to display particular tags. Example for greeting. xml : GREETING {display: block; font-size: 24pt; font-weight: bold} Save this file as greeting. css
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.