axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James M Snell" <jasn...@us.ibm.com>
Subject Re: Looking to remove dependency on xalan...
Date Wed, 06 Jun 2001 16:47:19 GMT
SAX2 fires off the startPrefixMapping event in the ContentHandler... these 
provide the prefix+namespace information... the only thing is that the 
startPrefixMapping events for a given element are fired before the 
startElement event for that element.  In other words: given the element 
<bob xmlns:t="leroy" /> the order of events is: 

     startPrefixMapping("t", "leroy")
     startElement("", "bob", "bob", attrs)

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.

- James Snell
     Software Engineer, Emerging Technologies, IBM
     James M Snell/Fresno/IBM - jasnell@us.ibm.com
    "God placed me on the earth to do a certain number of things. Right 
now, I am so far behind, I will never die." - Anon.

Please respond to axis-dev@xml.apache.org 
To:     axis-dev@xml.apache.org
cc: 
Subject:        Re: Looking to remove dependency on xalan...



Update:

> This was always a low prioritity item for me, but it's priority has
jumped
> for me.  The problem is that prefix/namespace information seems to be
> dropped.  This poses a potential problem for the Admin service.  In the
> short term, the problem I'm facing is that <bean> registry entries
> currently end up with QNames with null namespaces, and therefore are not
> found downstream...
>
> I'm looking to reuse DOM2Writer from xml-soap.

Good news: the dependency is gone.
Bad news: the problem is still there.

It appears that SAX, by default, consumes the prefixes for you.  I'm
investigating http://xml.org/sax/features/namespace-prefixes.  This may be
important for Soap Messages (as opposed to RPC) processing.

- Sam Ruby




Mime
View raw message