XML Tutorial Timothy W. Cole Thomas G. Habing University of Illinois at UC CDP / Colorado Alliance of Research Libraries 23/24 October 2002.

Slides:



Advertisements
Similar presentations
CG0119 Web Database Systems Parsing XML: using SimpleXML & XSLT.
Advertisements

XML: Extensible Markup Language
Standards and Increasing Maintainability on Web- based Systems James Eaton SE4112/16/2006.
History Leading to XHTML
XML Unit 6 October 31. XML, review XML is used to markup data Used to describe information Uses tags like HTML –But all tags are user-defined –Must be.
3 November 2008CIS 340 # 1 Topics To define XML as a technology To place XML in the context of system architectures.
Tutorial 9 Working with XHTML
Tutorial 9 Working with XHTML. XP Objectives Describe the history and theory of XHTML Understand the rules for creating valid XHTML documents Apply a.
Creating a Well-Formed Valid Document. 2 Objectives Introducing XHTML Creating a Well-Formed Document Creating a Valid Document Creating an XHTML Document.
September 15, 2003Houssam Haitof1 XSL Transformation Houssam Haitof.
Fundamentals of Web DevelopmentRandy Connolly and Ricardo HoarFundamentals of Web DevelopmentRandy Connolly and Ricardo Hoar Fundamentals of Web DevelopmentRandy.
Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.
Introduction to XSLT & its use in Grainger Library full-text & metadata projects Thomas G. Habing Grainger Engineering Library Presentation to ASIS&T,
Topics The "bigger picture" –The "XML sales pitch" –XML/XHTML vs. SGML/HTML –XML in electronic publishing –XML and the future, web 2.0 XML basics: –Building.
Metadata Standards and Applications 4. Metadata Syntaxes and Containers.
Creating a Basic Web Page
XP Tutorial 9New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with XHTML Creating a Well-Formed Valid Document Tutorial 9.
XP The University of Akron Summit College Business Technology Department Computer Information Systems 2440: 140 Internet Tools Instructor: Enoch E. Damson.
XML Anisha K J Jerrin Thomas. Outline  Introduction  Structure of an XML Page  Well-formed & Valid XML Documents  DTD – Elements, Attributes, Entities.
University of Illinois at Urbana-Champaign OAI Alpha Experiences Timothy W. Cole Thomas G. Habing Grainger Engineering.
Scientific Markup Languages Birds of a Feather A 10-Minute Introduction to XML Timothy W. Cole Mathematics Librarian & Professor of.
CREATED BY ChanoknanChinnanon PanissaraUsanachote
XP 1 CREATING AN XML DOCUMENT. XP 2 INTRODUCING XML XML stands for Extensible Markup Language. A markup language specifies the structure and content of.
An Introduction to XML Presented by Scott Nemec at the UniForum Chicago meeting on 7/25/2006.
XML Overview. Chapter 8 © 2011 Pearson Education 2 Extensible Markup Language (XML) A text-based markup language (like HTML) A text-based markup language.
Week 1 Understanding the Web Design Environment. 1-2 HTML: Then and Now HTML is an application of the Standard Generalized Markup Language Intended to.
1 herbert van de sompel CS 502 Computing Methods for Digital Libraries Cornell University – Computer Science Herbert Van de Sompel
1 © Netskills Quality Internet Training, University of Newcastle Introducing XML © Netskills, Quality Internet Training University.
XML 1 Enterprise Applications CE00465-M XML. 2 Enterprise Applications CE00465-M XML Overview Extensible Mark-up Language (XML) is a meta-language that.
 XML is designed to describe data and to focus on what data is. HTML is designed to display data and to focus on how data looks.  XML is created to structure,
Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL.
Chapter 27 The World Wide Web and XML. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.27-2 Topics in this Chapter The Web and the Internet.
XML About XML Things to be known Related Technologies XML DOC Structure Exploring XML.
XML TUTORIAL Portions from w3 schools By Dr. John Abraham.
XML A web enabled data description language 4/22/2001 By Mark Lawson & Edward Ryan L’Herault.
1 Chapter 10: XML What is XML What is XML Basic Components of XML Basic Components of XML XPath XPath XQuery XQuery.
CITA 330 Section 6 XSLT. Transforming XML Documents to XHTML Documents XSLT is an XML dialect which is declared under namespace "
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter X IXXXXXXXXXX XXXXXX.
Presentation Topic: XML and ASP Presented by Yanzhi Zhang.
Introduction to XML Timothy W. Cole Thomas G. Habing University of Illinois at UC CDP / Colorado Alliance of Research Libraries 23 October 2002.
XML 2nd EDITION Tutorial 1 Creating An Xml Document.
1 Introduction  Extensible Markup Language (XML) –Uses tags to describe the structure of a document –Simplifies the process of sharing information –Extensible.
Introduction to XML This presentation covers introductory features of XML. What XML is and what it is not? What does it do? Put different related technologies.
XP 1 Creating an XML Document Developing an XML Document for the Jazz Warehouse XML Tutorial.
1 Introduction to XML XML stands for Extensible Markup Language. Because it is extensible, XML has been used to create a wide variety of different markup.
1 Overview of XSL. 2 Outline We will use Roger Costello’s tutorial The purpose of this presentation is  To give a quick overview of XSL  To describe.
Chapter 27 The World Wide Web and XML. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.27-2 Topics in this Chapter The Web and the Internet.
XML Design Goals 1.XML must be easily usable over the Internet 2.XML must support a wide variety of applications 3.XML must be compatible with SGML 4.It.
XML Introduction. Markup Language A markup language must specify What markup is allowed What markup is required How markup is to be distinguished from.
1 Tutorial 11 Creating an XML Document Developing a Document for a Cooking Web Site.
1 herbert van de sompel CS 502 Computing Methods for Digital Libraries Cornell University – Computer Science Herbert Van de Sompel
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
XML A Language Presentation. Outline 1. Introduction 2. XML 2.1 Background 2.2 Structure 2.3 Advantages 3. Related Technologies 3.1 DTD 3.2 Schemas and.
Introduction to XML Thomas G. Habing Timothy W. Cole Grainger Engineering Library Information Center UIUC - GSLIS
SCHOOL OF LIBRARY, ARCHIVE AND INFORMATION STUDIES Andy Dawson LIS1510 Library and Archives Automation Issues XML and extensible systems Andy Dawson School.
Tutorial 9 Working with XHTML. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Describe the history and theory of XHTML.
C Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Introduction to XML Standards.
CIS 228 The Internet 9/20/11 XHTML 1.0. “Quirks” Mode Today, all browsers support standards Compliant pages are displayed similarly There are multiple.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
Tutorial 9 Working with XHTML. XP Objectives Describe the history and theory of XHTML Understand the rules for creating valid XHTML documents Apply a.
XP 1Creating Web Pages with XML Tutorial 1 New Perspectives on XML Tutorial 1 – Creating an XML Document.
XML Introduction to XML Extensible Markup Language.
1 Extensible Stylesheet Language (XSL) Extensible Stylesheet Language (XSL)
21 October 2000 MathML & Math on the Web Illinois D-Lib Testbed: Technologies for Converting Legacy Mathematics for Display on the Web Timothy W. Cole.
Beyond HTML: Extensible Markup Language (XML)
Extensible Markup Language (XML) Pat Morin COMP 2405.
CIS 228 The Internet 9/20/11 XHTML 1.0.
XML in Web Technologies
7 September 1999 The Basics of XSLT Assuming a basic knowledge of XML and XML Namespaces Thomas G. Habing Grainger Engineering Library Information Center.
Unit 6 - XML Transformations
Presentation transcript:

XML Tutorial Timothy W. Cole Thomas G. Habing University of Illinois at UC CDP / Colorado Alliance of Research Libraries 23/24 October 2002

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing2 Presenters Tim Cole Mathematics Librarian & Assoc. Prof. of Library Admin. PI, Univ. of Illinois OAI Metadata Harvesting Projects Tom Habing Research Programmer, Grainger Engineering Library Information Center

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing3 Agenda – XML Tutorial 1. Well-formed XML (basic markup) 2. DTDs and schemas 3. Stylesheets 4. XML and databases Topics include illustrations, demos, and exercises.

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing4 1.Well-formed XML XML 1.0 Specification Markup Prolog & Document Type Declaration Elements Attributes Content Entities Encoded (Unicode) characters

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing5 Prolog & Document Type Definition XML documents should begin with an XML Declaration which specifies version Optionally may also include: Encoding (recommended) Stand-alone declaration Document Type Definition is typically next

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing6 Elements Elements are markup that enclose content … or Content models Parsed Character Data Only Child Elements Only Mixed Empty Cole, T

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing7 Attributes Associate a name-value pair with an element … Can be used to embellish content… or to associate added content to an element Attributes beginning XML are reserved Cole, T

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing8 Entities Placeholders for internal or external content Placeholder for a single character… or string of text… or external content (images, audio, etc.) Implementation specifics may vary &copyright; is replaced by © &pic; is replaced by graphic image

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing9 Character Encoding Issues XML Parsers must accept UTF-8 & UTF-16 Also must accept &#nnnn; or &#xhhhh; MARC-8 encodings must be converted to Unicode for use in XML Special rules for EOL and control characters Changes will be effective version 1.1

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing10 Namespaces Qualify element and attribute names Allows modularization of schemas Mix and match elements from multiple schemas in document instances Import or include from one XML Schema into another …

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing11 ZVON Tutorial

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing12 Simple Illustrations A POEM Unqualified Dublin Core

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing13 Simple Authoring Tools MS Notepad (Plain Text Editor) MS XML Notepad Beta 1.5

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing14 XML Markup Exercise Markup one or more of the sample Bib records Use for your root element Use Dublin Core element names where applicable: titlecreatorsubject descriptionpublishercontributor typeformatdate coveragerelationidentifier rightslanguagesource

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing15 Advanced Examples MARC MODS OAI (version 2.0) OAI DLI/DLIB Test Suite Journal Article RDF Qualified Dublin Core Guidelines for DC & RDF DC in XMLDCRDF DC SOAP (Primer) SOAPPrimer

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing16 Advanced Authoring Tool Demos YAWC - Microsoft Word Extensibility TurboXML

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing17 2.DTDs and Schemas Formal descriptions of document structure Set expectations Maximize reusability Enforce business rules Validation ensures that documents conform Could be multiple schemas for different purposes or different points in a documents lifecycle Primary: DTD or XML Schema Language Others: Schematron or Relax NG

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing18 Document Type Definitions (DTD) Legacy from SGML; part of XML standard

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing19 ZVON DTD Tutorial

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing20 Sample DTDs A simple DTD for poems XHTML 1.0 Strict How to validate In Internet Explorer Using XML Notepad

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing21 DTD Exercise Create a DTD for the previous XML Bib Files Name your DTD file BibClass.dtd Insert at the top of each of your XML Bib Files Validate using XML Notepad or Internet Explorer

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing22 More Examples of DTDs OASIS DocBook TEI Gutenberg

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing23 XML schema language New in XML Uses XML syntax Supports datatyping Richer and more complex …

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing24 XML Schemas BibClass.xsd Simple Dublin Core Datatypes and Facets Unions Enumerations Lists

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing25 More examples of XML Schemas Qualified Dublin Core OAI-PMH

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing26 Alternatives: Schematron & RelaxNG Schematron based on XPath (XSLT) Doesn’t support datatyping as well Supports additional content models May become an ISO standard RelaxNG Returns some of the power of SGML DTDs back to XML (mixed and unordered content) Uses datatyping from the XML Schema spec Does not support inheritance Developed by an OASIS Technical Committee chaired by James Clark

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing27 DTD and Schema Tools Extensibility TurboXML Corel/SoftQuad XMetaL XSV for validating

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing28 XML & Cascading Style Sheets Attach styling instructions directly to XML files Supported by newest browsers: IE5+, Mozilla, Opera Can style but not rearrange elements Block or inline style Bold, italic, underline, font, color, etc. Margins, positioning Generated content (browser support not good) front author {color:red; font-weight:bold; font- family:serif;}

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing29 XSLT — Transforming Stylesheets Language for transforming XML documents Into HTML, Text, or other XML documents Supported in new browsers (IE5+, Mozilla; not Opera) Usually applied on the server or in batch mode Valuable for interoperability or reusability,

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing30 CSS & XSLT Examples A CSS for poems in XML XSLT for Dublin Core XML to XHTML XSLT for MARC21 XML to HTML XSLT for MARC21 XML to DC XML

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing31 ZVON Tutorial

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing32 XSLT Exercise Create a simple XSLT to transform your previous Bib XML files into HTML Name the file simple.xsl Either attach the XSLT to your files using And display it in IE Or use MSXSL from the command line to create the HTML file to display msxsl.exe source.xml simple.xsl –o source.htm

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing33 XSL Tools TIBCO XMLTransform MSXSL EXSLT XSL Formatter

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing34 XML & databases Discussion Points Suitability of XML for databases XML Query Language XML & relational databases Demonstrations XML and MS SQL Server A simple XML search using XSLT

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing35 Suitability for databases Documents are well-structured (well- formed syntax requirement) Content is well-labeled (markup semantics) Ubiquitous, cross-application, cross- community Open, non-proprietary standard Validated XML potentially “machine- understandable”

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing36 XML Query Language Intended to facilitate “interaction between the web world and the database world.” Follow-on to Quilt (Don Chamberlin, et al.) Another special-purpose programming language for processing XML (& XML-like database structures) Expressions, data types, functions, etc. Access (search) functionality – e.g., not for update Like XSLT, it relies on XPath Borrows data types from XML schema language Template Processor (like XSLT, PHP, JSP, ASP)

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing37 E.g., List books published by Addison-Wesley after 1991: XQuery: { for $b in document(" where $b/publisher = "Addison-Wesley" and > 1991 return { $b/title } } Result: TCP/IP Illustrated Advanced Programming in the Unix environment

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing38 XML Query Implementations W3C Grammar Test Page SoftwareAG Tamino / QuiPTamino / QuiP Queries XML files directly or XML in Tamino Microsoft’s XQuery DemoXQuery Demo Online demo queries W3C use cases documentsW3C use cases documents Oracle prototype XQuery implementation Queries XML files Same site has Oracle SQL/XML implementation Xindice (apache.org) Uses XPath instead of XQuery

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing39 XML & Relational DBMS SQLX Mapping data types, character sets, … from SQL to XML Searching XML using XPath-based SQL style queries Import / Export of XML from relational database management systems now common Specifics vary by implementation Microsoft implementation allows: Microsoft implementation Query relational DB using XPath Query with SQL, return XML Load XML directly into Microsoft SQL OLEDB provider for XML files

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing40 Demonstrations Using XSLT to query multiple XML docs XSLT to search multiple DC XML files Fetching XML from Microsoft SQL

23/24 October 2002 XML Tutorial Tim Cole & Tom Habing41 Contact information Presentation Presenters