axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam Ruby" <ru...@us.ibm.com>
Subject Re: Looking to remove dependency on xalan...
Date Wed, 06 Jun 2001 17:57:41 GMT
James M Snell wrote:
>
> SAX2 fires off the startPrefixMapping event in the ContentHandler...

Which in this case is SOAPSAXHandler, which does not choose to

> Which means, when we want to serialize the namespaces/prefixes, we gotta
> buffer the prefix mappings and hold on to 'em until the startElement
event
> occurs.
>
> Now, I do not recall having this problem when using the
> org.apache.xml.serialize package that ships with Xerces.  I do not recall
> whether or not that package prereqs any Xerces specific code.
> Theoretically, we could slice out that code from Xerces and drop it into
> Axis without changing a thing.

Agreed.  The problem isn't in SAX, it is in SOAPSAXHandler.  It consumes
the events, noting them transiently, but does not otherwise retain or share
this information.

> Which means, when we want to serialize the namespaces/prefixes, we gotta
> buffer the prefix mappings and hold on to 'em until the startElement
event
> occurs.

I can see this working when there is a content handler registered (e.g.,
the ElementRecorder), and by putting the logic in DeserializerBase, the
default implemenation can be inherited by all content handlers.

The problem is the element types which are "hard wired" into
SOAPSAXHandler.  In particular, bodies and headers.  My preference would be
that this logic be factored out into content handlers, and everything be
implemented as a pushdown stack instead of a state machine, but in prior
discussions with Glen I gathered that he was not enthusiastic about this
idea.

I normally don't give up this easily when pursuing bugs, but I do respect
Glen's opinion and would like to give him an opportunity to comment before
proceeding.  So for now, I am going to modify the syntax by which beans are
deployed to avoid this issue.  This code is all temporary until WSDD is
ready anyway...

- Sam Ruby


Mime
View raw message