Introduction to XML

Introduction to XML
OliviaCutts Profile Pic
Published Date:01-08-2017
Your Website URL(Optional)
Intro to XML Slide 0 July 11, 2001 Introduction to XML Frank Tompa and Airi Salminen University of Waterloo fwtompa, July 11, 2001 Intro to XML Slide 1 Outline July 11, 2001 1. Why XML evolved 2. What is XML? 3. XML 1.0 fundamentals 4. XML family of languages 5. How to use XML 6. Naming conventions: Namespaces 7. Hypertext facilities: XPath, XPointer, XLink 8. Querying and transforming: XQuery and XSLT 9. Applications 10. Challenges Intro to XML Slide 2 1. Why XML evolved July 11, 2001 1960-1980 Infrastructure for the Internet 1986 SGML (Standard Generalized Markup Language) for defining and representing structured documents 1991 WWW and HTML introduced for the Internet 1991 Business adopts the WWW technology; huge expansion in the use of the Internet 1995 New kinds of businesses evolve, based on the connectivity of people all over the world and connectivity of applications built by various software providers (B2C, B2B) Urgent need for a new, common data format for the Internet Intro to XML Slide 3 1. Why XML evolved July 11, 2001  Needs: • Simple, common rules that are easy to understand by people with different backgrounds (like HTML) • Capability to describe Internet resources and their relationships (like HTML) • Capability to define information structures for different kinds of business sectors (unlike HTML, like SGML) Intro to XML Slide 4 1. Why XML evolved July 11, 2001  Needs (cont’d): • Format formal enough for computers and clear enough to be human-legible (like SGML) • Rules simple enough to allow easy building of software (unlike SGML) • Strong support for diverse natural languages (unlike SGML) Intro to XML Slide 5 2. What is XML? July 11, 2001 XML = Extensible Markup Language A set of rules for defining and representing information as structured documents for applications on the Internet; a restricted form of SGML T. Bray, J. Paoli, and C. M. Sperberg-McQueen (Eds.), Extensible Markup Language (XML) 1.0, W3C Recommendation 10- February-1998, T. Bray, J. Paoli, C. M. Sperberg-McQueen, and E. Maler (Eds.), Extensible Markup Language (XML) 1.0 (Second Edition), W3C Recommendation 6 October 2000, Intro to XML Slide 6 2. What is XML? July 11, 2001  Rule 1: Information is represented in units called XML documents.  Rule 2: An XML document contains one or more elements.  Rule 3: An element has a name, it is denoted in the document by explicit markup, it can contain other elements, and it can be associated with attributes. and lots of other rules ... Intro to XML Slide 7 2. What is XML? July 11, 2001 Example of an XML document ?xml version="1.0"? catalog product category = "mobile phone" mfgNokia/mfgmodel8890/model description Intended for EGSM 900 and GSM 1900 networks … /description clock setting= "nist" alarm = "yes"/ /product product category = "mobile phone" mfgEricsson/mfgmodelA3618/model description.../description /product ... /catalog Intro to XML Slide 8 2. What is XML? July 11, 2001 Classes of text markup descriptive (the previous example) presentational Mobile phones: Nokia 8890 Ericsson A3618 procedural document newPage style="box"/ boldMobile phones:/bold list newItem/italicNokia 8890/italic newItem/italicEricsson A3618/italic /list /document XML is primarily for descriptive markup. Intro to XML Slide 9 2. What is XML? July 11, 2001 XML is a metalanguage, not a specific language.  Defines the rules how to mark up a document — does not define the names used in markup  Includes capability to prescribe a Document Type Definition (DTD) to constrain the markup permitted in a class of documents  Intended for all natural languages, regardless of character set, orientation of script, etc. Intro to XML Slide 10 3. XML 1.0 fundamentals July 11, 2001 Physical (storage) units  XML document comprises one or more entities • A “document entity” serves as the root • Other entities may include – external portion of DTD – parsed character data, which replaces any references to the entity – unparsed data  Entities located by URIs Intro to XML Slide 11 3. XML 1.0 fundamentals July 11, 2001  XML declaration: ?xml version=”1.0”?  Logical data components: • Markup vocabulary: elements, attributes product category = "mobile phone" mfgNokia/mfgmodel8890/model ... clock setting = "nitz" alarm = "yes"/ ... /product • White space • Parsed and unparsed character data • Entity references &diagram; • Comments how interesting… • Processing instructions ?xml-stylesheet href="catalog-style.css" type="text/css"? Intro to XML Slide 12 3. XML 1.0 fundamentals July 11, 2001  Markup declarations (the DTD): • Internal vs. external declarations • Root document type • Element types: EMPTY, children, mixed, ANY ELEMENT category (mfg, model, description , clock?) ELEMENT description (PCDATA feature) ELEMENT clock EMPTY • Attribute types: CDATA, ID, IDREF(-S), ENTITY(-TIES), NMTOKEN(-S) ATTLIST clock setting CDATA IMPLIED alarm (yes, no, dual) "yes" • Notations • Entities Intro to XML Slide 13 3. XML 1.0 fundamentals July 11, 2001  Conformance: • Well-formed: – syntactically correct tags – matching tags – nested elements – all entities declared before they are used • Valid: – well-formed – DTD + doctype matches DTD – unique IDs – no dangling IDREFs Intro to XML Slide 14 3. XML 1.0 fundamentals July 11, 2001 XML document may or may not XML be “validating” processor “XML Information Set” application Intro to XML Slide 15 3. XML 1.0 fundamentals July 11, 2001  Example: eXtensible Customer Information Language (xCIL) • OASIS Customer Information Quality Committee “… reliable and accurate customer information is now more than ever essential in establishing effective customer relationships ... need to develop a standard way of describing Customers (e.g., Identity, Name, Address, etc.).” • Built on – eXtensible Name and Address Language (XNAL) – two sub DTDs  eXtensible Name Language (xNL)  eXtensible Address Language (xAL)  See details in next section of notes Intro to XML Slide 16 4. XML family of languages July 11, 2001  Specification of XML 1.0 was just the first step in the development of languages for the management of data on the Web. (W3C Technical Publications)  XML-related languages fall into the following classes: • XML accessories • XML transducers • XML applications (See third sectin of notes for details) Intro to XML Slide 17 4. XML family of languages July 11, 2001 XML Accessory Extends the capabilities specified in XML Intended for wide, general use Examples: • XML Names: to allow qualified names • XML Schema: extends the definition capabilities • XPath: for addressing parts in XML documents • XLink: to create hyperlinks between resources Intro to XML Slide 18 4. XML family of languages July 11, 2001 XML Transducer Converts XML input data into output Associated with a processing model Examples: • XSLT: for document transformations • CSS: for rendering • XQuery: for querying Intro to XML Slide 19 4. XML family of languages July 11, 2001 XML Application Defines constraints for a class of XML data Intended for a specific application area Examples (developed at W3C): • XHTML: reformulation of HTML 4.0 • RDF: to describe metadata for resources • XML-Signature: for digital signatures • XForms: for Web forms

Advise: Why You Wasting Money in Costly SEO Tools, Use World's Best Free SEO Tool Ubersuggest.