On 18/12/2011 20:54, Norman Walsh wrote:
Hi Mike,

I started looking at the task of upgrading XML Calabash to Saxon 9.4.

I expect there are other issues, but the first few that I've come
across are:

* On StructuredQName, getNamespaceURI() and getLocalName() seem to
  have been renamed getURI() and getLocalPart(), is that right?
Yes, that's correct. I forget the detail, but I think it was to make StructuredQName consistent with NodeInfo, and somewhere along the line using consistent names enabled two classes to implement the same interface.
* NamePool no longer has getPrefixFromNamespaceCode(),
  getURIFromNamespaceCode(), getNamespaceCode(), or
  allocateNamespaceCode(). It appears that getNamespaceBinding()
  would give me access to the first three. What replaces
Namespace codes no longer exist, so allocateNamespaceCode() is obsolete. Information about namespace bindings is now always passed in a NamespaceBinding object. (There have been other changes designed to reduce the dependency on the NamePool, which was a significant source of contention for high-throughput sites. Hopefully this is much reduced in 9.4. In particular, on the Receiver interface names of elements and attributes are now passed as a NodeName object, and type annotations as a SchemaType object. This means that there is no longer any need to allocate name codes for names that are used only in output documents.)
* net.sf.saxon.tree.iter.NamespaceIterator no longer exists. I use
  it for walking over the in-scope namespaces of a node. Pointer to
  an alternative, please?

                                        Be seeing you,

The class has moved to net.sf.saxon.tree.util.NamespaceIterator and now returns NamespaceBinding objects.

Another way to get the in-scope namespaces of a node is

new InscopeNamespaceResolver(NodeInfo)

The NamespaceResolver supports methods iteratePrefixes() and getURIForPrefix().

Michael Kay

Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure

saxon-help mailing list archived at http://saxon.markmail.org/