Beyond HTML: Extensible Markup Language (XML) http://dli.grainger.uiuc.edu/Publications/XMLTutorial - PowerPoint PPT Presentation

About This Presentation
Title:

Beyond HTML: Extensible Markup Language (XML) http://dli.grainger.uiuc.edu/Publications/XMLTutorial

Description:

Open File in MS Internet Explorer. Attach a CSS style sheet. Re-Open in MS Internet Explorer ... Extensible Style Sheet Language Transformations. Transforms ... – PowerPoint PPT presentation

Number of Views:74
Avg rating:3.0/5.0
Slides: 15
Provided by: dliGrain
Category:

less

Transcript and Presenter's Notes

Title: Beyond HTML: Extensible Markup Language (XML) http://dli.grainger.uiuc.edu/Publications/XMLTutorial


1
Beyond HTML Extensible Markup Language
(XML)http//dli.grainger.uiuc.edu/Publications/X
MLTutorial
  • Tim Cole
  • Tom Habing
  • Grainger Engineering Library Information Center
  • University of Illinois at UC
  • t-cole3_at_uiuc.edu
  • 2 June 2000

2
Text as Ordered Hierarchy of Content Objects
  • E.g. A book contains chapters, which contain
    paragraphs, which contain sentences, ...
  • This model (DOM) underlies SGML, HTML, XML
  • Content Objects can be Presentational (e.g., as
    in HTML) or Descriptive (e.g., as in SGML, XML)
  • Allowed Object Names can be Finite (as in HTML)
    or Extensible (as in SGML, XML)
  • Thus SGML XML are often described as meta
    markup languages

3
ML Basics - Markup Content
  • Markup (Tags) ltauthorgtlt/authorgt ltempty_tag /gt
  • Content ltauthorgtJ. L. Penalt/authorgt ltauthorgtltfnam
    egtJ. L.lt/fnamegtltlnamegtPenalt/lnamegtlt/authorgt
  • Attributes ltauthor sequencefirstgtJ. L.
    Penalt/authorgt
  • Entities ltauthor ida1gtJ. L. Pe241alt/authorgt
    ltauthor ida1gtJ. L. Pentildealt/authorgt
  • Others lt!--comments--gt lt?processing
    instructions?gt

4
Markup Language Differences
  • XML Stricter Than HTML or SGML
  • Must Close ALL Tags
  • Attributes MUST BE Enclosed in Quotes
  • All Mark-Up is CASE-SENSITIVE
  • XML/SGML no fixed tags, no predefined style
  • XML/SGML Are Extensible
  • Fixed Elements (HTML) vs. Rules (XML, SGML)
  • XML Tags Can Describe the Content
  • XML Simpler Than SGML, Optimized for Web

5
Well-formed XML vs. Valid XML
  • If a Document Follows the Syntactic Rules for
    XML, it is WELL-FORMED.
  • Matching open and close tags
  • No overlapping content objects (regions)
  • Correct use of markup delimiters, entities, etc.
  • Only Entities Allowed in Well-Formed are Unicode,
    gt lt quot and amp
  • If it Also Adheres to the Content Models as
    Defined in a Document Type Definition, it is Also
    VALID.

6
Document Type Definition DTD
  • Defines Allowable Content Models, Attributes,
    Entities for a Class of XML Documents.
  • lt!ELEMENT book_collection (book) gt
  • lt!ELEMENT book (isbn, author, title) gt
  • lt!ATTLIST book id ID IMPLIED edition CDATA
    REQUIREDgt
  • lt!ELEMENT isbn (PCDATA) gt
  • lt!ENTITY ntilde ñ gt

7
First Demonstration
  • Create a Simple, Well-Formed XML Document, using
    MS Notepad
  • Book, Author, Title, ISBN, Link
  • Open File in MS Internet Explorer
  • Attach a CSS style sheet
  • Re-Open in MS Internet Explorer

8
Typical XML File
  • lt?xml version1.0 encodingutf-8 ?gt
  • lt?xml-stylesheet href typetext/css ?gt
  • lt!-- My First XML --gt
  • lt!DOCTYPE root SYSTEM gt
  • ltroot xmlnsdli gt
  • document content ...
  • lt/rootgt

9
Style Sheets CSS XSLT
  • Cascading Style Sheets
  • On-Screen Formatting Presentation
  • Work with Both HTML XML
  • Extensible Style Sheet Language Transformations
  • Transforms Between XML DTDs or XML to HTML
  • Allows Re-Ordering of Content, Selective Display
    of Content, Insertion of Generated Content
  • Extensions Allow Dynamic Modification of Content
  • Available as Application Programming Interface

10
XML Namespaces
  • Allows Mixing of Multiple XML Schemas
  • XML Documents that Also Contain Fragments of HTML
  • Simultaneous Support of Multiple Metadata Schemas
    (e.g., Resource Description Framework, Dublin
    Core, UIUC DLI Metadata Schema)
  • Rules for Namespaces Other Schema Extension
    Models Still Under Development

11
Advanced Demo
  • Add Doctype Declaration (for Valid XML)
  • Open DTD in XML Authority
  • Open File in XML Notepad, XML Pro, XMetaL
  • Attach an XSL Stylesheet
  • Open in MS Internet Explorer
  • Server Side Implementation of an XSL Stylesheet
  • MS SQL Server 2000 -- Data to XML
  • Script to load XML into database

12
Examples from DLI
  • Full-text Article Examples
  • A Large-Scale XML Testbed
  • RDF / DC / IDLI Metadata
  • Interoperability Using XML Namespaces
  • Browsing the ASM Metals Handbook in XML
  • Selective Display of Content Using XSLT
  • ACES Agronomy Handbook in XML
  • Dynamic Table of Contents Using XML DOM

13
Future Directions
  • XML and Databases
  • XHTML -- Next Generation HTML
  • Schemas -- Next Generation DTDs
  • Xlink/XPointer -- Advanced Linking
  • Xforms -- Advanced HTML Forms
  • MathML -- Mathematics markup
  • SVG -- Scalable Vector Graphics markup

14
Tools for Authoring XML
  • Notepad
  • XML Notepad
  • XML Pro
  • XML Authority
  • XMetaL
  • ArborText
Write a Comment
User Comments (0)
About PowerShow.com