Tutorial introduction and preparation
This tutorial introduces developers to the W3C XML specifications XPointer, XInclude, and XML Base, as well as the independent specification XUpdate, which offers a simple alternative to XSLT and DOM parsing for updating well-defined parts of XML documents. The authors also give details for how to use them with their popular open-source Python tool set, 4Suite.
Though one section of this tutorial addresses Python developers, and especially 4Suite developers, most of the information in this tutorial will help any developer who needs to understand the XML specifications and how they work.
- XPointer, a W3C language to is the basis for a fragment identifier for any URI reference that locates a resource whose Internet media type is one of
- XInclude, a W3C technology for document composition, splits documents into manageable chunks. You can also use it to incorporate documents or parts of documents from external resources. If you are involved in XML processing, consider becoming familiar with XInclude.
- XML Base is especially handy if you use RDF, XLink, and, to some extent, XInclude -- and want to control the resolution of resource and link URLs.
- XUpdate is an informal community standard (by the XML:DB Initiative group) that provides a simple, efficient way to update XML documents by parts. This is especially useful if you deal with large documents and might not want to have to entirely replace them in their file system or database after every little change.
This is an introductory tutorial for a set of XML technologies, but it's not the place to start if you're just starting to learn about XML. It assumes that you already know the basics about what XML is and how it works. It also assumes that you know what XPath is and roughly how it functions. Finally, it assumes you are familiar with uniform resource locators (URLs). If you need to pick up these fundamentals, start with the developerWorks tutorial, "Introduction to XML." XPath receives a thorough introduction in the second tutorial in our series.
Getting to know XML Base gives specific instructions for using the covered XML including and updating technologies in Python with 4Suite's open-source tools. If you want to follow along by trying out the examples, you'll need to know how to run 4Suite. Parts 1 and 2 of this 4Suite tutorial series tell how to get started using the 4Suite tools.
Tutorial resources provides links to those developerWorks tutorials and others.
You don't have to use 4Suite to find this tutorial informative. If you want to follow along with the 4Suite examples in Getting to know XML Base , you will want to install the following packages:
- Python 2.2: Version 2.1 of Python also works, but 2.2 is recommended (http://www.python.org/download).
- 4Suite 0.12.0: The older version, 0.11.1, does not work for this tutorial (http://4Suite.org).