Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Develop Python/XML with 4Suite, Part 4: Composition and updates

Use XML pointing, compositing, and updating technologies with the open-source Python toolkit, 4Suite

Uche Ogbuji (uche.ogbuji@fourthought.com), Principal consultant, Fourthought Inc.
Uche Ogbuji is a computer engineer, co-founder, and principal consultant at Fourthought Inc. He has worked with XML for several years, codeveloping 4Suite, a library of open-source tools for XML development in Python, and 4Suite Server, an open-source, cross-platform XML data server providing standards-based XML solutions. He writes articles on XML for IBM developerWorks, LinuxWorld, SunWorld and XML.com. Mr. Ogbuji is a Nigerian immigrant living in Boulder, CO.
Chimezie Ogbuji (chimezie.ogbuji@fourthought.com), Software consultant, Fourthought Inc.
Chimezie Thomas-Ogbuji is a software consultant for Fourthought Inc. He codevelops 4Suite and 4Suite Server. He enjoys writing and developing computer games in his spare time. He also researches artificial intelligence techniques.

Summary:  This intermediate-level tutorial introduces developers to the W3C XML specifications XPointer, XInclude, and XML Base as well as the independent specification XUpdate, which offers an alternative to XSLT and DOM parsing for updating parts of XML documents. The authors also give details for how to use these XML pointing, compositing, and updating technologies with their popular open-source Python toolkit, 4Suite.

View more content in this series

Date:  16 Oct 2002
Level:  Intermediate PDF:  A4 and Letter (93 KB | 27 pages)Get Adobe® Reader®

Activity:  8235 views
Comments:  

Tutorial introduction and preparation

Who should take this tutorial?

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 text/xml, application/xml, text/xml-external-parsed-entity, or application/xml-external-parsed-entity.
  • 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.

Prerequisites

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.


Preparing the tutorial environment

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).


Getting help and finding out more

For technical questions about the content of this tutorial, contact the authors, Uche Ogbuji (uche.ogbuji@fourthought.com) and Chimezie Ogbuji (chimezie.ogbuji@fourthought.com).

1 of 8 | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=XML
ArticleID=138107
TutorialTitle=Develop Python/XML with 4Suite, Part 4: Composition and updates
publish-date=10162002
author1-email=uche.ogbuji@fourthought.com
author1-email-cc=dwxed@us.ibm.com
author2-email=chimezie.ogbuji@fourthought.com
author2-email-cc=dwxed@us.ibm.com