cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Is this a Xalan issue? (was Fwd: [C2 patch] Incorrect serialization to XML)
Date Tue, 21 Aug 2001 02:29:31 GMT

Yes, it is a general Xalan issue, for both serializers and for input SAX
events for the source tree.

There has been some discussion about reworking the namespace handling in
the serializers (see  And note the long
outstanding bug in bugzilla
(, which I am not
sure is the same bug as Joerg reported (I think that bug has to do with the
TransformerHandler, though he doesn't say... however it's a general issue).
I think if the qname is not empty, we should be able to rely on it being
correct.  I can't tell if Joerg wants us to just ignore the qname argument
even if it is not empty.

In any case, having to do prefix lookup in the serializer will come at some
expense, though maybe less expense on our side of the fence than on yours,
if it has to be done.  On the other hand, it may mean that we have to fully
track namespaces in the serializer which may be redundent to what also has
to be done in our ResultTreeHandler (see, but I have
to research this issue more...).

>From the standpoint of the SAX spec:

     * <p>Any or all of these may be provided, depending on the
     * values of the <var></var>
     * and the <var></var>
     * properties:</p>
     * <ul>
     * <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>
     * <li>the qualified name is required when the namespace-prefixes
     * is <var>true</var>, and is optional when the namespace-prefixes
     * is <var>false</var> (the default).</li>
     * </ul>
     * @param uri The Namespace URI, or the empty string if the
     *        element has no Namespace URI or if Namespace
     *        processing is not being performed.
     * @param localName The local name (without prefix), or the
     *        empty string if Namespace processing is not being
     *        performed.
     * @param qName The qualified name (with prefix), or the
     *        empty string if qualified names are not available.

As I read it, the qname parameter should be correct if it is not null.  I
could be wrong about this, and Joerg should point me to a reference for his
quote that "the way I read the SAX specification, the qName (or raw name)
of elements that is passed to the callback methods is of purely informal
character and does not necessarily contain the full (raw) element name."

Note that one should assume that the namespaces property is always true for
Xalan.  I see we have a bug in that, if you get Xalan as a XMLFilter via
SAXTransformerFactory#newXMLFilter(...), we should return true for
filter.getProperty (  "" );.

Anyway, I suspect it will be three or four more weeks until we resolve this
in the code, so you may want to incorporate Joerg's patch as a temporary
work-around.  I think Gary Peskin is planning to do the work on this...
Gary, if not you should let me know.


To unsubscribe, e-mail:
For additional commands, email:

View raw message