Scientific Markup Languages Birds of a Feather A 10-Minute Introduction to XML Timothy W. Cole Mathematics Librarian & Professor of Library Administration University of Illinois at NSDL All Projects Meeting Washington, D.C. 14 October
2 NSDL – Scientific Markup Languages 14 October 2003 University of Illinois at UC XML – First Principles Underlying Model (as with GML, SGML, HTML, …) is that Resources are Ordered Hierarchies of Content Objects Structure chosen should reflect anticipated use(s) OHCO is a useful, albeit imperfect, model Exposes a view of an object’s intellectual structure Supports reuse & abstraction of content objects Does not allow overlapping content objects Incomplete; requires supporting infrastructure
3 NSDL – Scientific Markup Languages 14 October 2003 University of Illinois at UC An XML Representation of ∫ 1 t ⅆ x x Element Names Content Character Entity Attribute Name-Value Pair
4 NSDL – Scientific Markup Languages 14 October 2003 University of Illinois at UC XML comes from SGML Standard Generalized Markup Language Based on IBM’s GML (Goldfarb, et al.) SGML was approved as an ISO standard in 1989 HTML — display-oriented, SGML-based scheme for making Web pages Syntax & allowed elements (semantics) are fixed XML — a set of rules for defining markup schemes Syntax is fixed Element set (semantics) is fully extensible
5 NSDL – Scientific Markup Languages 14 October 2003 University of Illinois at UC Markup languages compared XML syntax is stricter than HTML Must explicitly close all elements Attributes must be enclosed in quotes All markup is case-sensitive XML encoding is UTF-8 by default w/ Unicode entities XML more Web-friendly than SGML Introduces concept of “well-formed” XML Introduces alternative to SGML DTD Introduces concept of “Namespaces”
6 NSDL – Scientific Markup Languages 14 October 2003 University of Illinois at UC XML DTDs & Schemas Describe structures & rules for class of XML document instances Declare elements, content models, attributes, data typing DTDs – hold over from SGML Not themselves XML document instances DTDs were simplified (functionality reduced) for XML XML Schema – New with XML Schemas are valid XML document instances Support data typing & more complex content models W3C XML Schema Language Schematron Relax NG
7 NSDL – Scientific Markup Languages 14 October 2003 University of Illinois at UC XML 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 Uses URIs to uniquely identify namespace …
8 NSDL – Scientific Markup Languages 14 October 2003 University of Illinois at UC XSL — Extensible Stylesheet Language XSLT - Language for transforming XML documents Into HTML, Text, or other XML document instances Supported in new browsers (IE5+, Mozilla / Netscape 7+) Often applied on the server or in batch mode Valuable for interoperability and reusability XSL-FO (Formatting Objects) - presentation styling language Similar to CSS, but includes the power of XSLT to rearrange Syntax is entirely XML Use to convert XML document instance into PDF, etc. Not currently supported in standard browsers
9 NSDL – Scientific Markup Languages 14 October 2003 University of Illinois at UC XPath, XPointer, XLink, SAX, DOM, … XPath (e.g., ) Allows addressing of parts of an XML document Used in XSLT, XPointer, and XQuery XPointer (e.g., Used as a fragment id in an XML URI reference XLink Creates and describes extended or simple links between resources Used for HTML-style hrefs or imgs, tables of contents, etc. Programming with XML – SAX, DOM, IDL Simple API for XML (SAX) event-driven processing vs. Document Object Model (DOM) Tree Processing Interface Description Language (IDL) to define DOM objects, methods,... More – XQuery, XBase, XForms, XML Encryption, XML Signature…
10 NSDL – Scientific Markup Languages 14 October 2003 University of Illinois at UC XML Tools XML Authoring Tools Generic – e.g., XMetaL, Epic Editor, TurboXML, MS Word 2003, …XMetaLEpic EditorTurboXMLMS Word 2003 Authoring Tools specific to XML Applications – e.g. MathematicaMathematica Validating parsers & transformation tools MSXML (Microsoft); Xerces, Xalan (Apache Software Foundation); XSV (U. of Edinburgh) MSXMLXerces, Xalan XSV Document management & database tools Tamino (Software AG); XMLCanon/Developer (Tibco/Extensibility); DLXS/XPAT (U. of Michigan/OpenText), Xindice (Apache) TaminoXMLCanon/Developer DLXS/XPATXindice XML-aware browsers & plug-ins, generic & application specific E.g., for rendering MathML, SVG, CML, …
11 NSDL – Scientific Markup Languages 14 October 2003 University of Illinois at UC XML resources on the Web World Wide Web Consortium Robin Cover’s XML Pages Apache XML Project Sun Microsystems Microsoft Developer Network XML.COM (O’Reilly) XML.COM XML.ORG (OASIS) XML.ORG ZVON.ORG