Thursday, 29 March 2012

Short Review with XML

Introduction
If you are fairly new to XML, and are not sure where to start, this document will help you navigate the various aspects of a multi-headed topic.  It is a high-level overview of various XML concepts that will provide you with a framework for understanding what XML is all about.  This document is mainly a set of links to various resources, both here and on the web where you can get more detail on the various concepts and topics.

What is XML?

XML is short for eXtensible Markup Language.  It is a W3C standard for marking up documents.

Referencing and Linking

XPath

XPath is a syntax for finding and addressing nodes in an XML document.  It uses path expressions to define nodes in the document and then find and select these nodes.  The path expressions are very similar to standard filesystem path expressions.

It is used by XPointer, XSLT, and XQuery.  Understanding XPath is a basic requirement for any deeper XML usage.

XPath contains a library of over 100 standard functions.  These include functions for string values, numeric values, date and time, boolean values, etc.

XInclude

XInclude is a method by which XML documents can include other XML documents.  The syntax allows you to specify, in XML, which documents to include.  The syntax uses familiar XML constructs such as elements, attributes and URI references.

The XInclude standard allows you to build one large well-formed XML document out of many smaller well formed documents or chunks.  This allows each of the chunks to be treated separately as well-formed XML documents in themselves.  XInclude can also include a fragment of a document, malformed documents or even a non-XML text document.

XLink stands for the XML Linking Language  It is a W3C standard that defines a standard way of creating hyperlinks in XML documents.  XLink is somewhat similar to HTML links - but there is a lot more to XLink than plain HTML links.  Any element in an XML document can behave as an XLink.

XLink supports simple links (like HTML) and extended links (for linking multiple resources together)  With XLink, the links can be within the files or outside of the linked files.

XPointers

XPointer stands for the XML Pointer Language.  It is another W3C standard.  It enables hyperlinks to point to specific fragments in an XML document. XPointer uses XPath expressions to navigate within an XML document.

Rendering and Transformations

XSL

XSL stands for the XML Stylesheet Language.  It is a family of W3C specifications for transforming (XSLT) and presenting (XSL-FO) XML documents.

XSLT

XSLT stands for eXtensible Stylesheet Language Transformations.  It enables you to transform an XML document into another structure, which can be another XML dialect or a non-XML text document.  XSLT is commonly used to transform XML into HTML Web pages, or XSL-FO for rendering to PDF.

  • The Five XSLT Basics by Michael Fitzgerald.  This is a quick start that covers just the basics of what you need to know about XSLT to start.
  • The W3C XSLT page. This document contains the text of the XSLT 2.0 specification.

XSL-FO

XSL-FO stands for Extensible Stylesheet Language Formatting Objects.  It is an XML-based language for formatting XML data for output to different media, most commonly PDF or Postscript.

CSS

XML can also be styled with Cascading Style Sheets, or CSS, another W3C standard.  CSS is much simpler than XSL, which makes it easier to learn but also less powerful.  The W3C recommends that you "use CSS when you can, use XSL when you must".

Searching and Retrieval

XQuery

XQuery is a query language for XML - the SQL of XML.  XQuery is designed to query XML data using XPath expressions.  With XQuery, you can find and extract elements and attributes from XML documents.

XQuery can be used to search for relevant information in XML documents, to transform XML data, to generate reports and even update XML documents.


XQFT

XQFT is an extension to XQuery and XPath to provide full-text capabilities.  This allows creation of queries that can operate not just on the structure but also on the content.  Therefore, you can use XQuery and XQuery Full Text to seamlessly query over both the structure and content of XML documents.


XML Base

XML Base is a W3C specification that allows you to specify a base URI for XML documents.  This allows you to override the document's own URI and use the specified base URI to resolve any relative links.

XML Base is sometimes referred to as XBase.

Application Building

Document Object Model

The XML Document Object Model (DOM) is a W3C standard that defines a standard way for accessing and manipulating XML documents.

The DOM represents an XML document as a tree structure, with elements, attributes, and text as nodes.  It also provides a standard interface to access these nodes.  Essentially, the DOM provides a standard object model and programming interface for XML.  It is a platform and language independent way of accessing, deleting, adding and changing XML nodes.

XForms

XForms is a unified method to describe and handle forms.  It is a platform independent way to create forms on the web using XML.

Forms are an important part of many web applications today. An HTML form makes it possible for web applications to accept input from a user.
XForms provides a richer, more secure, and device independent way of handling web input. XForms uses XML for data definition and HTML or XHTML for data display.

XForms separates the data logic of a form from its presentation. This way the XForms data can be defined independent of how the end-user will interact with the application.

XProc

XProc is an XML based scripting language used to pipeline process XML files.  It is a W3C standard.