« November 2004 | Main | May 2005 »

March 17, 2005


It seems like there is a cool new way to write Web Applications using old technology. Google is using it to create rich applications like web mail and maps. Check out blog entries here http://www.ajaxian.com/.

Posted by Chris at 04:35 PM | Comments (0)

March 14, 2005

A Framework for Versioning XML at the Java API/XML Processor Level

This is an idea I have had for a while. It basically recognizes that versioning of XML documents should be done at the instance level and not at the schema level.

Developers working in the enterprise are confronted by XML documents (SOAP Payloads, Customer Purchase Orders, Application Data) that each have a different version and are described by various schemas. This article is about an idea I have for a java framework for processing versioned XML documents. Many people think that the eXtensible part of XML means somehow that XML documents are more versionable than other documents. This is not the case. That X simply means that the original DTD/XML spec allowed you to create a fixed new grammar that described a set of documents. Instances of a specific XML grammar are not any more versionable than any other data format. This article focuses on versioning at the XML level.

One of the first principles of a versioning framework is to ignore what you don’t understand.

Requirement 1: The XML Processor must ignore any content it does not understand.

SOAP has a simple mechanism for indicating in the processing model that something must be understood. If you do make non-backward compatible changes you will want to signal to the framework that it should fault if it encounters the new element. This leads to requirement 2, that you must be able to signal required elements. A sub requirement to this is that content which is not understood is preferred.

Requirement 2: The processor must fault if it encounters an element that it must understand.

The last requirement is that it must be possible to create applications that are both forward and backward compatible using the versioning framework.

Requirement 3: Applications must be both backward and forwards compatible.

The following section outlines a proposal for the versioning framework. It has five new attributes mustUnderstand, mayIgnore, version, ref, vref. The above requirements coupled with these attributes lead to a generic processing framework that all XML processors can use and is not coupled to any specific XML vocabulary.

Attribute: mustUnderstand
Definition: All processors must understand any element tagged with this attribute, they also mustUnderstand all children of this element except those elements specifically tagged with mayIgnore
Values: true | false

Attribute: mayIgnore
Definition: All processors may ignore this element
Values: true | false

Attribute: version
Definition: identifies this element as belonging to a specific version of the grammar
Values: integer ( . integer ) *

Attribute: vref
Definition: allows the document to target an element identified by a vid attribute
Values: String

Attribute: vid
Definition: the target of the vref element
Values: String


<doc xmlns:ver=”http://cfry.net/xml_versioning”>

   <element ver:mustUnderstand=”true” version=”1.0”>

        …. Content


    <element2 ver:mayIgnore=”true” version=”2.0”>



All processors must report element but mayIgnore element2. Any processor can choose to ignore and delete element2.

Posted by Chris at 01:40 PM | Comments (0)

Two great waves at lindomar

Caught two great waves at lindomar beach yesterday. One was in my top ten of all time. This is a reminder for me to take my shortboard to the N end of lindomar.

Posted by Chris at 01:25 PM | Comments (0)