axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryo Neyama" <ney...@trl.ibm.co.jp>
Subject Re: Axis breaks XML infoset
Date Wed, 21 Nov 2001 07:33:36 GMT
Sam,

> > I think setPretty(true) is not allowed in any cases. So, we should just
> > remove it.
>
> That's a pretty strong statement.
Maybe my statement was a little confusing. I didn't say we should remove
setPretty() method itself.
Rather, I was saying we should remove the portion AxisEngine is calling that
method.
See below for the detail (I want to remove only THIS
"context.setPretty(true)"):
xml-axis/java/src/org/apache/axis/message/SOAPEnvelope.java:297.
------------
    /** Should make SOAPSerializationException?
     */
    public void outputImpl(SerializationContext context)
        throws Exception
    {
        boolean oldPretty = context.getPretty();
        context.setPretty(true);
------------

>  Generally what setPretty does is add what is known as "Ignorable
Whitespace".

Generally speaking, whether a series of white spaces is "ignorable" or not
depends on a DTD or an XML schema.
In other words, we cannot say a series of white spaces is ignorable without
DTD(or schema).
So the Axis engine shouldn't add or remove any whitespace because it's
application-dependent.

> We interop with a large number of implementations with it present.  See
the
> Axis entries in http://www.whitemesa.com/interop.htm - both Axis as a
> client to other servers, and other clients against Axis servers.  In fact,
> you if you look at the wiredumps, you will see that various
implementations
> take vastly different approaches to whitespace, and all are valid and
> conform to the SOAP specifications.

The SOAP specification does not say anything about handling whitespaces. On
the other hand, it does not mean we can do anything that the SOAP
specification does not prohibit. SOAP is an application of XML. So, we must
follow other XML-related specifications like XML namespaces, XML schema,
and, of course, XML infoset.

> You apparently know of some situations where the application does not
> consider the whitespace added as being ignorable.  Fair enough.  Lets see
> if we can categorize when such whitespace is not allowed. If necessary, we
> can even add a member to the MessageContext which controls the whitespace.

I agree. Calling the setPretty() method by an application is up to the
application.
I was not meaning we should remove the setPretty() method itself as I
mentioned in the response to Glen.
Sorry for the confusion.

So, can we remove only the "context.setPretty(true)" above?

Thanks,
    Ryo Neyama @ IBM Research, Tokyo Research Laboratory
    Internet Technology
    neyama@trl.ibm.co.jp



Mime
View raw message