[DAS2] Re: Working with xml:base in Java?

Thomas Down td2 at sanger.ac.uk
Wed Feb 8 08:44:38 UTC 2006

On 7 Feb 2006, at 19:00, Helt,Gregg wrote:

> 	Thomas, I'm wondering what toolkits you're using for binding XML
> to Java objects?  And particularly how you are dealing with resolving
> URIs when xml:base is used.  So far I've mostly used various
> implementations of SAX and DOM -- I've found some reports of builtin
> xml:base support in Xerces SAX/DOM, but it's still unclear.
> 	I've been avoiding the issue up till now.  It won't be too hard
> to implement URI resolution relative to xml:base, but I thought I'd
> check around first and see if there's automated support of this in  
> some
> toolkit.

Hi Greg,

I'm actually using Stax (the streaming API for XML).  The  
implementation I use is called Woodstox:


(but there are a few others out there).  No builtin xml:base support  
but it's easy to write a little wrapper around XMLStreamReader to  
spot xml:base attributes and maintain a stack of base URIs.

I'm using java.net.URI to do the URI handling/resolution/ 
relativization.  Seems to be working okay... so far...


More information about the DAS2 mailing list