> I'm not 100% sure, but it looks like the current
> SAX2DTM code expects to be passed both, and I can imagine that Cocoon
might
> be trying to take the shortcut...

The code should work fine if passed only startPrefixMapping and
endPrefixMapping events.  I just wrote a small test for this, and
everything seems pretty happy (though it gets confused for local-name() if
you pass null instead of "" for startPrefixMapping...).

My suspicion is that whoever is generating SAX events within the body
statement, i.e. the form, input, etc., is not generating the namespaceURI
argument for startElement. The SAX2DTM will not try and resolve the
namespace itself, as per:

     * <li>the Namespace URI and local name are required when
     * the namespaces property is <var>true</var> (the default), and are
     * optional when the namespaces property is <var>false</var> (if one is
     * specified, both must be);</li>

Since a ContentHandler doesn't have a way to set the namespace property by
itself, SAX2DTM assumes this property is always true.  (It is still in
error in that it requires the qName argument).  (This optionality on SAX2,
in my opinion, is really awful.)

Donald, is this making any sense?

-scott




                                                                                       
                               
                    Joseph_Kesselman                                                   
                               
                    @lotus.com              To:     [EMAIL PROTECTED]           
                               
                                            cc:     (bcc: Scott Boag/CAM/Lotus)        
                               
                    06/29/2001 02:27        Subject:     Re: something funny with 
namespaces and xalan2.2dev (fwd)    
                    PM                                                                 
                               
                    Please respond                                                     
                               
                    to xalan-dev                                                       
                               
                                                                                       
                               
                                                                                       
                               





>i'm practically certain that the only namespace events that are being
>passed in to xalan are the startPrefixMapping at the document root that
>establishes the default namespace end the endPrefixMapping at the end that
>removes it...

One guess on what might be different between the command-line and cocoon2
version: Check whether the namespaces are being presented _only_ as
prefixMapping events rather than also appearing as attributes on the
appropriate element(s). I'm not 100% sure, but it looks like the current
SAX2DTM code expects to be passed both, and I can imagine that Cocoon might
be trying to take the shortcut...






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to