Presentation is loading. Please wait.

Presentation is loading. Please wait.

 XML derives its strength from a variety of supporting technologies.  Structure and data types: When using XML to exchange data among clients, partners,

Similar presentations


Presentation on theme: " XML derives its strength from a variety of supporting technologies.  Structure and data types: When using XML to exchange data among clients, partners,"— Presentation transcript:

1

2  XML derives its strength from a variety of supporting technologies.  Structure and data types: When using XML to exchange data among clients, partners, and suppliers, it’s important to be able to define how XML documents should be structured.  DTDs and XML Schema provide this capability.  DTDs come out of the world of Standard Generalized Markup Language (SGML), focusing primarily on structure by specifying what elements and attributes are considered valid for a particular XML instance document.

3  DTDs have limited capability to specify data types.  XML Schema is a more recent initiative of the World Wide Web Consortium (W3C) that puts a more conventional data processing spin on describing XML data with more precision than with DTDs.

4  XML intentionally separates data content from presentation through the introduction of supporting technologies that focus on delivering content to users via a variety of devices and presentation media.  Among the technologies for presentation are XHTML- a modular XML conformant replacement for HTML  CSS for controlling the display properties of HTML or XML in Web browsers

5  XSL and XSL Formatting Objects (XSL-FO) for formatting XML for various output media;  XForms for collecting data from Web forms and returning XML;  VoiceXML, for delivering content to voice enabled devices  Wireless Markup Language (WML) for delivery to wireless devices enabled for Wireless Application Protocol (WAP).

6  Manipulation technologies provide the capability to extract and transform XML in different ways.  These technologies play an important role in server based XML processing for business- to-business (B2B) data manipulation and exchange.  XSLT is widely used to transform XML from one format to another

7  XPath is a technology used by other XML technologies to navigate through an XML tree structure  Xlink is a technology for creating and describing links between resources and for enabling links that go beyond the simple unidirectional links of the current Web  XQuery is an evolving technology for extracting and querying XML repositories.

8  The XML family of technologies also includes initiatives for working with meta information, which is literally information about the information contained in an XML document.  Technologies in this space include RDF and InfoSet.

9

10  XML namespaces is a simple technology solution that allows element and attribute names to be distinguished from the similarly named elements and attributes of other XML users.  In XML, a namespace is used to prevent any conflicts with element names.

11 This XML carries HTML table information Apples Bananas This XML carries information about a table (a piece of furniture) African Coffee Table 80 120

12  If these XML fragments were added together, there would be a name conflict.  Both contain a element, but the elements have different content and meaning.  An XML parser will not know how to handle these differences.

13  Name conflicts in XML can easily be avoided using a name prefix.  This XML carries information about an HTML table, and a piece of furniture  Apples Bananas African Coffee Table 80 120

14  XML namespaces solves the problem of clashing names by providing a unique prefix to be attached to the beginning of element and attribute names.  When using prefixes in XML, a so-called namespace for the prefix must be defined.  The namespace is defined by the xmlns attribute in the start tag of an element.  The namespace declaration has the following syntax. xmlns:prefix="URI".

15

16  There are several ways to add a namespace to an XML document  when software is processing XML data from ZwiftBooks, it will see ZwiftBooks elements as http://www.zwiftbooks.com:title instead of just title. http://www.zwiftbooks.com:title  The simplest approach is to declare a namespace in a top-level element and let all the elements and attributes under the top element come under the scope of the namespace.

17 0-596-00058-8 XML in a Nutshell Harold, Elliotte Rusty  But what happens if the namespace declaration appears at some element other than the root element of the document?  The namespace applies only to the element where it is declared and all its child elements.

18  This ability to specify namespaces based on element hierarchies allows multiple namespaces to be used in the same document  Namespaces may span a range of elements or target just one element.

19

20  The namespaces specification also makes it possible to use abbreviations for namespaces in order to make XML documents more readable.  we can define a shortcut name, zbooks, so that anywhere that zbooks appears in a document, a software program processing the document will replace it with the actual namespace, http://www.zwiftbooks.com.

21

22  you may use whatever shortcut name you like within an XML document, and an XML processor reading the document will replace whatever shortcut you use with the URI namespace.  If you declare you will use a shortcut by including xmlns:shortcut ="some URI", then everywhere the shortcut is not used in an element name, the element is not part of the namespace.

23  To process XML file using various applications requires it to follow certain rules regarding its structure.  This structuring of XML files becomes very much important when it get shared across multitude of parties.  When using XML to exchange data among clients, partners, and suppliers, it’s important to be able to define how XML documents should be structured  What’s needed is a schema.

24  “Schema” is a general term that describes the form of data.  Originally the term was used to define the structure of databases.  A schema is a formal specification of the grammar for a specific XML vocabulary.  Schemas are useful in validating XML document content, determining whether the XML document conforms to the grammar expressed by the XML Schema

25  The structuring of XML can be done through various techniques ◦ Document Type Definitions ◦ XML Schemas  Document Type Definition is the earliest method of validating XML file.  This method has been derived directly from the ancestor of XML i.e. SGML (Standard Generalized Markup Language).

26

27  DTDs focus primarily on structure, allowing an XML vocabulary designer to specify the elements and attributes that are appropriate for a set of XML instance documents.  DTDs have limited capability to describe data types within an XML document.  There exist two ways in which Document Type Definitions can be used in an XML file. ◦ Internal DTD ◦ External DTD

28  In the case of internal DTD, the definitions are located in the same file itself.  The rules that the XML file has to follow is given in the XML file itself.  Generally they are given immediately following the declaration.

29 <!DOCTYPE note [ ]>

30 Bob Marilyn Reminder Don’t forget to bring the cheese

31


Download ppt " XML derives its strength from a variety of supporting technologies.  Structure and data types: When using XML to exchange data among clients, partners,"

Similar presentations


Ads by Google