Waqas Anwar Next SlidePrevious Slide
Waqas Anwar Next SlidePrevious Slide XML XML stands for EXtensible Markup Language
Waqas Anwar Next SlidePrevious Slide XML XML stands for EXtensible Markup Language XML is a markup language much like HTML
Waqas Anwar Next SlidePrevious Slide XML XML stands for EXtensible Markup Language XML is a markup language much like HTML XML was designed to describe data
Waqas Anwar Next SlidePrevious Slide XML XML stands for EXtensible Markup Language XML is a markup language much like HTML XML was designed to describe data XML tags are not predefined. You must define your own tags
Waqas Anwar Next SlidePrevious Slide XML XML stands for EXtensible Markup Language XML is a markup language much like HTML XML was designed to describe data XML tags are not predefined. You must define your own tags XML uses a Document Type Definition (DTD) or an XML Schema to describe the data
Waqas Anwar Next SlidePrevious Slide XML XML stands for EXtensible Markup Language XML is a markup language much like HTML XML was designed to describe data XML tags are not predefined. You must define your own tags XML uses a Document Type Definition (DTD) or an XML Schema to describe the data XML with a DTD or XML Schema is designed to be self- descriptive
Waqas Anwar Next SlidePrevious Slide XML XML stands for EXtensible Markup Language XML is a markup language much like HTML XML was designed to describe data XML tags are not predefined. You must define your own tags XML uses a Document Type Definition (DTD) or an XML Schema to describe the data XML with a DTD or XML Schema is designed to be self- descriptive XML is a W3C Recommendation
Waqas Anwar Next SlidePrevious Slide XML XML does not DO anything
Waqas Anwar Next SlidePrevious Slide XML XML does not DO anything XML is free and extensible
Waqas Anwar Next SlidePrevious Slide XML XML does not DO anything XML is free and extensible XML is a complement to HTML
Waqas Anwar Next SlidePrevious Slide XML XML does not DO anything XML is free and extensible XML is a complement to HTML XML is future Web development
Waqas Anwar Next SlidePrevious Slide XML XML does not DO anything XML is free and extensible XML is a complement to HTML XML is future Web development XML is going to be everywhere.
Waqas Anwar Next SlidePrevious Slide XML vs. HTML HTML is about displaying information XML is about describing information. HTML was designed to display data and to focus on how data looks. XML was designed to describe data and to focus on what data is.
Waqas Anwar Next SlidePrevious Slide How can XML be Used XML can Separate Data from HTML
Waqas Anwar Next SlidePrevious Slide How can XML be Used XML can Separate Data from HTML XML is used to Exchange Data
Waqas Anwar Next SlidePrevious Slide How can XML be Used XML can Separate Data from HTML XML is used to Exchange Data XML can be used to Share Data
Waqas Anwar Next SlidePrevious Slide How can XML be Used XML can Separate Data from HTML XML is used to Exchange Data XML can be used to Share Data XML can be used to Store Data
Waqas Anwar Next SlidePrevious Slide How can XML be Used XML can Separate Data from HTML XML is used to Exchange Data XML can be used to Share Data XML can be used to Store Data XML can make your Data more Useful
Waqas Anwar Next SlidePrevious Slide How can XML be Used XML can Separate Data from HTML XML is used to Exchange Data XML can be used to Share Data XML can be used to Store Data XML can make your Data more Useful XML can be used to Create new Languages
Waqas Anwar Next SlidePrevious Slide XML Components Comment Declaration Root Element Element Nested Element (child element) Template Data Empty Element Attribute
Waqas Anwar Next SlidePrevious Slide Comment …
Waqas Anwar Next SlidePrevious Slide Declaration encoding=" UTF-7” encoding=" UTF-8”
Waqas Anwar Next SlidePrevious Slide Root Element
Waqas Anwar Next SlidePrevious Slide Nested Elements
Waqas Anwar Next SlidePrevious Slide Template Data Waqas Nadeem Meeting Reminder Don’t forget me this weekend
Waqas Anwar Next SlidePrevious Slide Empty Element Waqas Nadeem Meeting Reminder Don't forget me this weekend! or both are valid
Waqas Anwar Next SlidePrevious Slide Attribute Waqas Nadeem Meeting Reminder Don't forget me this weekend!
Waqas Anwar Next SlidePrevious Slide All XML Components Waqas Nadeem Meeting Reminder Don't forget me this weekend!
Waqas Anwar Next SlidePrevious Slide Well Formed XML Documents
Waqas Anwar Next SlidePrevious Slide All XML elements must have a closing tag. Well-Formed Document Rules
Waqas Anwar Next SlidePrevious Slide All XML elements must have a closing tag XML tags are case sensitive Well-Formed Document Rules
Waqas Anwar Next SlidePrevious Slide All XML elements must have a closing tag XML tags are case sensitive All XML elements must be properly nested Well-Formed Document Rules
Waqas Anwar Next SlidePrevious Slide All XML elements must have a closing tag XML tags are case sensitive All XML elements must be properly nested All XML documents must have a root element Well-Formed Document Rules
Waqas Anwar Next SlidePrevious Slide Well-Formed Document Rules All XML elements must have a closing tag XML tags are case sensitive All XML elements must be properly nested All XML documents must have a root element Attribute values must always be quoted
Waqas Anwar Next SlidePrevious Slide All XML elements must have a closing tag XML tags are case sensitive All XML elements must be properly nested All XML documents must have a root element Attribute values must always be quoted Attributes can not be duplicated in one element. Well-Formed Document Rules
Waqas Anwar Next SlidePrevious Slide Exercise Create a well-formed XML document describing the mobile phone specification which is send by one mobile phone manufacture to different phone dealers. You need to describe the following information with every mobile. mobile-code brand-name model color price
Waqas Anwar Next SlidePrevious Slide Solution Nokia 6630 silver Samsung D500 black
Waqas Anwar Next SlidePrevious Slide XML Transformation
Waqas Anwar Next SlidePrevious Slide XML Transformation XML does not use predefined tags and the meaning of these tags are not well understood.
Waqas Anwar Next SlidePrevious Slide XML Transformation XML does not use predefined tags and the meaning of these tags are not well understood. A element could mean an HTML table, a piece of furniture, or something else - and a browser does not know how to display it.
Waqas Anwar Next SlidePrevious Slide XML Transformation XML does not use predefined tags and the meaning of these tags are not well understood. A element could mean an HTML table, a piece of furniture, or something else - and a browser does not know how to display it. We can transform XML files into other formats like HTML, Text, XML, DOC, PDF
Waqas Anwar Next SlidePrevious Slide XML Transformation XML does not use predefined tags and the meaning of these tags are not well understood. A element could mean an HTML table, a piece of furniture, or something else - and a browser does not know how to display it. We can transform XML files into other formats like HTML, Text, XML, DOC, PDF We use following technologies for transformation CSS XSL / XSLT XSLT-FO
Waqas Anwar Next SlidePrevious Slide CSS Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation of a document written in a markup languages. Its most common application is to style web pages written in HTML, XHTML or XML
Waqas Anwar Next SlidePrevious Slide CSS Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation of a document written in a markup languages. Its most common application is to style web pages written in HTML, XHTML or XML CSS define how to display HTML elements
Waqas Anwar Next SlidePrevious Slide CSS Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation of a document written in a markup languages. Its most common application is to style web pages written in HTML, XHTML or XML CSS define how to display HTML elements Styles are normally stored in Style Sheets
Waqas Anwar Next SlidePrevious Slide CSS Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation of a document written in a markup languages. Its most common application is to style web pages written in HTML, XHTML or XML CSS define how to display HTML elements Styles are normally stored in Style Sheets Styles were added to HTML 4.0
Waqas Anwar Next SlidePrevious Slide CSS Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation of a document written in a markup languages. Its most common application is to style web pages written in HTML, XHTML or XML CSS define how to display HTML elements Styles are normally stored in Style Sheets Styles were added to HTML 4.0 External Style Sheets are stored in CSS files
Waqas Anwar Next SlidePrevious Slide CSS Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation of a document written in a markup languages. Its most common application is to style web pages written in HTML, XHTML or XML CSS define how to display HTML elements Styles are normally stored in Style Sheets Styles were added to HTML 4.0 External Style Sheets are stored in CSS files External Style Sheets can save you a lot of work
Waqas Anwar Next SlidePrevious Slide catalog.xml Titanic Pakistan Columbia Pictures Jurassic Park United Kingdom Paramount Pictures
Waqas Anwar Next SlidePrevious Slide style.css catalog { background-color: #336699; width: 50%; font-size:12ptt; font-family:Arial; border-size:1; border-style:solid; border-color:#336699; }
Waqas Anwar Next SlidePrevious Slide style.css catalog { background-color: #336699; width: 50%; font-size:12ptt; font-family:Arial; border-size:1; border-style:solid; border-color:#336699; } cd { display: block; background-color: #ffffff; }
Waqas Anwar Next SlidePrevious Slide style.css catalog { background-color: #336699; width: 50%; font-size:12ptt; font-family:Arial; border-size:1; border-style:solid; border-color:#336699; } cd { display: block; background-color: #ffffff; } title { width:100%; background-color: #336699; color:white; padding: 5px; }
Waqas Anwar Next SlidePrevious Slide style.css catalog { background-color: #336699; width: 50%; font-size:12ptt; font-family:Arial; border-size:1; border-style:solid; border-color:#336699; } cd { display: block; background-color: #ffffff; } title { width:100%; background-color: #336699; color:white; padding: 5px; } country,price,year,company { background-color: #ffffff; display: block; font-size:10pt; font-family:Arial; color: #000000; margin-left: 5pt; }
Waqas Anwar Next SlidePrevious Slide Link CSS with XML Titanic Pakistan Columbia Pictures Jurassic Park United Kingdom Paramount Pictures
Waqas Anwar Next SlidePrevious Slide XSL 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 documents
Waqas Anwar Next SlidePrevious Slide XSLT Transformation XSLT stands for XSL Transformations XSLT is the most important part of XSL XSLT transforms an XML document into another document XSLT uses XPath to navigate in XML documents XSLT is a W3C Recommendation
Waqas Anwar Next SlidePrevious Slide XML with XSLT Titanic Pakistan Columbia Pictures Jurassic Park United Kingdom Paramount Pictures
Waqas Anwar Next SlidePrevious Slide Link XML with XSLT We link the external style sheet with XML using the following line.
Waqas Anwar Next SlidePrevious Slide XSLT Declaration The correct way to declare an XSL style sheet according to the W3C XSLT Recommendation is: or
Waqas Anwar Next SlidePrevious Slide XSLT Templates An XSL style sheet consists of one or more set of rules that are called templates. The element is used to build templates. The match attribute is used to associate a template with an XML element. The match attribute can also be used to define a template for the entire XML document. The value of the match attribute is an XPath expression.
Waqas Anwar Next SlidePrevious Slide The element can be used to extract the value of an XML element and add it to the output stream of the transformation. The value of the select attribute is an XPath expression. An XPath expression works like navigating a file system.
Waqas Anwar Next SlidePrevious Slide The element allows you to do looping in XSLT. The XSL element can be used to select every XML element of a specified node-set:
Waqas Anwar Next SlidePrevious Slide The element is used to sort the output. To sort the output, simply add an element inside the element in the XSL file
Waqas Anwar Next SlidePrevious Slide Complete XSLT File DVD Title Country Company Price Year
Waqas Anwar Next SlidePrevious Slide XML Validation
Waqas Anwar Next SlidePrevious Slide XML Validation We can use following two technologies two validate XML files. DTD Schema
Waqas Anwar Next SlidePrevious Slide Document Type Definition The purpose of a DTD (Document Type Definition) is to define the legal building blocks of an XML document.
Waqas Anwar Next SlidePrevious Slide Document Type Definition The purpose of a DTD (Document Type Definition) is to define the legal building blocks of an XML document. It defines the document structure with a list of legal elements.
Waqas Anwar Next SlidePrevious Slide Document Type Definition The purpose of a DTD (Document Type Definition) is to define the legal building blocks of an XML document. It defines the document structure with a list of legal elements. A DTD can be declared inline in your XML document, or as an external reference.
Waqas Anwar Next SlidePrevious Slide Benefits of DTD With DTD, each of your XML files can carry a description of its own format with it.
Waqas Anwar Next SlidePrevious Slide Benefits of DTD With DTD, each of your XML files can carry a description of its own format with it. With a DTD, independent groups of people can agree to use a common DTD for interchanging data.
Waqas Anwar Next SlidePrevious Slide Benefits of DTD With DTD, each of your XML files can carry a description of its own format with it. With a DTD, independent groups of people can agree to use a common DTD for interchanging data. Your application can use a standard DTD to verify that the data you receive from the outside world is valid.
Waqas Anwar Next SlidePrevious Slide Benefits of DTD With DTD, each of your XML files can carry a description of its own format with it. With a DTD, independent groups of people can agree to use a common DTD for interchanging data. Your application can use a standard DTD to verify that the data you receive from the outside world is valid. You can also use a DTD to verify your own data. DTD is old technology and replaced more powerful and latest technology XML Schema.
Waqas Anwar Next SlidePrevious Slide XML Schema An XML Schema: 1. defines elements that can appear in a document
Waqas Anwar Next SlidePrevious Slide XML Schema An XML Schema: 1. defines elements that can appear in a document 2. defines attributes that can appear in a document
Waqas Anwar Next SlidePrevious Slide XML Schema An XML Schema: 1. defines elements that can appear in a document 2. defines attributes that can appear in a document 3. defines which elements are child elements
Waqas Anwar Next SlidePrevious Slide XML Schema An XML Schema: 1. defines elements that can appear in a document 2. defines attributes that can appear in a document 3. defines which elements are child elements 4. defines the order of child elements
Waqas Anwar Next SlidePrevious Slide XML Schema An XML Schema: 1. defines elements that can appear in a document 2. defines attributes that can appear in a document 3. defines which elements are child elements 4. defines the order of child elements 5. defines the number of child elements
Waqas Anwar Next SlidePrevious Slide XML Schema An XML Schema: 1. defines elements that can appear in a document 2. defines attributes that can appear in a document 3. defines which elements are child elements 4. defines the order of child elements 5. defines the number of child elements 6. defines whether an element is empty or can include text
Waqas Anwar Next SlidePrevious Slide XML Schema An XML Schema: 1. defines elements that can appear in a document 2. defines attributes that can appear in a document 3. defines which elements are child elements 4. defines the order of child elements 5. defines the number of child elements 6. defines whether an element is empty or can include text 7. defines data types for elements and attributes
Waqas Anwar Next SlidePrevious Slide XML Schema An XML Schema: 1. defines elements that can appear in a document 2. defines attributes that can appear in a document 3. defines which elements are child elements 4. defines the order of child elements 5. defines the number of child elements 6. defines whether an element is empty or can include text 7. defines data types for elements and attributes 8. defines default and fixed values for elements and attributes
Waqas Anwar Next SlidePrevious Slide XML Validation with XML Schema Waqas Nadeem Meeting Reminder Don't forget me this weekend!
Waqas Anwar Next SlidePrevious Slide XML Validation with XML Schema Waqas Nadeem Meeting Reminder Don't forget me this weekend!
Waqas Anwar Next SlidePrevious Slide Root Element
Waqas Anwar Next SlidePrevious Slide Simple Element A simple element is an element that only contains template date. Waqas
Waqas Anwar Next SlidePrevious Slide Complex Element A complex element is an XML element that contains other elements and/or attributes. There are four kinds of complex elements: empty elements elements that contain only other elements elements that contain only text elements that contain both other elements and text Note: Each of these elements may contain attributes as well!
Waqas Anwar Next SlidePrevious Slide Complex Element John Smith Ice cream It happened on
Waqas Anwar Next SlidePrevious Slide Declare Simple Element A simple element is an XML element that can contain only text. It cannot contain any other elements or attributes.
Waqas Anwar Next SlidePrevious Slide Declare Simple Element Ali
Waqas Anwar Next SlidePrevious Slide Declare Simple Element Ali
Waqas Anwar Next SlidePrevious Slide Declare Simple Element Ali
Waqas Anwar Next SlidePrevious Slide Declare Simple Element Ali
Waqas Anwar Next SlidePrevious Slide Common Schema Data types xs:string xs:decimal xs:integer xs:boolean xs:date xs:time
Waqas Anwar Next SlidePrevious Slide Declare default and fixed value for simple elements
Waqas Anwar Next SlidePrevious Slide Declare Attributes
Waqas Anwar Next SlidePrevious Slide Declare Attributes Waqas
Waqas Anwar Next SlidePrevious Slide Declare Attributes Waqas
Waqas Anwar Next SlidePrevious Slide Declare default and fixed value for attributes
Waqas Anwar Next SlidePrevious Slide Declare optional and required attributes
Waqas Anwar Next SlidePrevious Slide XSD Restrictions Restrictions are used to control acceptable values for XML elements or attributes. Restriction on Values
Waqas Anwar Next SlidePrevious Slide Restriction on Set of Values
Waqas Anwar Next SlidePrevious Slide Restriction on Series of Values
Waqas Anwar Next SlidePrevious Slide Restriction on Series of Values
Waqas Anwar Next SlidePrevious Slide Restriction on Series of Values
Waqas Anwar Next SlidePrevious Slide Restriction on length