Dan, I started to implement the fragids many moons ago, but reality intervened and I was unable to make much progress. Thx for picking up this work. I wrote the fragid portion of the WSDL 2.0 spec, so I can answer questions.
I suggest you do the toString() work first since it is much easier to generate a fragid from a component than it is to find a component given a fragid. That will be immediately useful for debugging. You will need an XPointer parser to do the fragid validation and lookup so if you can reuse the Cocoon code, great. There may be another implementation. I thought Xerces2-J had one. -- Arthur On 8/1/07, Dan Harvey <[EMAIL PROTECTED]> wrote: > I'd like to bring the topic of fragids back up from this discussion, > http://mail-archives.apache.org/mod_mbox/ws-woden-dev/200603.mbox/browser > , back in March last year. > > I stared work on Woden-32 to implement the toString() method for the WSDL > 2.0 Component model and found, to do this properly using fragids as Arthur > suggested, that I would need to implement fragid support in Woden. I've > started to do this and I'll explain below how I'm doing this so we can check > that this model will allow us to do everything we need with fragment > identifiers. I will try and add the code to the jira tomorrow once Johns > committed a change I need for it to work. > > There are three main parts an XPointer model, an WSDL pointer part model, > and a WSDL fragment id class to allow the models to be used in woden easily. > > The XPointer model is loosely based upon code I found at the Apache cocoon > project, but I think their code was for a parser only so its slightly > different but their code may still be useful if we can share the common > XPointer code. > > The WSDL Pointer Part model is just a representation of each components > pointer part as a class extending the XPointer PointerPart class, storing > the data for it and providing the serialising/deserialising methods. > Extensions will have to provide their own classes for this as they will have > their own defined pointer parts too. > > the WSDL fragid class extends the XPointer class and adds a few methods and > constructors to easily create the fragment id's and look up component > objects from a fragment id. > > My implementation doesn't support any other pointer parts ,mainly xpointer() > and element(), yet if we have support for embedding WSDL inside other xml > documents but that can easily be added. Also it deals with namespaces > directly in the XPointer class to make sure the prefixes are consistent and > in the right order! > > Finally this is used inside Woden by adding a getFragmentIdentifier() method > to each wdsl component object which constructs then returns a wsdl > FragmentIdentifier. The toString() method of each object then simply calls > the toString method on its own fragment identifier, so Woden-32 is actually > a few line... > > I think we will need to create another jira for adding the fragment > identifier framework which is separate to the toString() method > implementation. > > Any comments on this would be great, I've learnt a lot about XPointers in > the past few days and hope this is along the right lines! > > Thanks, > Dan > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
