W3C home > Mailing lists > Public > xml-dist-app@w3.org > June 2002

Re: Is whitespace significant in SOAP Messages?

From: <noah_mendelsohn@us.ibm.com>
Date: Tue, 18 Jun 2002 23:25:16 -0400
To: Kevin Johnsrude <kevinj@roguewave.com>
Cc: "'xml-dist-app@w3.org'" <xml-dist-app@w3.org>
Message-ID: <OFE71EDB81.688FFBEC-ON85256BDD.00124304@lotus.com>

Kevin Johnsrude asks:

>> One thing that is unclear when reading the SOAP and XML 
>> standards is under what circumstances whitespace is 
>> significant and should be preserved.

I believe the latest editors' draft of SOAP part 1 is clearer on this. 
From [1] 

"Element information items defined by this specification can have zero or 
more character information item children whose character code is amongst 
the whitespace characters as defined by [8]. Unless otherwise indicated, 
such character information items are considered insignificant. A SOAP 
receiver MUST ignore such insignificant character information items."

and [2]

"5.2.1 SOAP header block

Each SOAP header block element information item:

[...]

MAY have any number of character information item children. Child 
character information items whose character code is amongst the whitespace 
characters as defined by [8] are considered significant."

and [3]

"5.3.1 SOAP Body child Element
All child element information items of the SOAP Body element information 
item:

[...]

MAY have any number of character information item children. Child 
character information items whose character code is amongst the whitespace 
characters as defined by [8] are considered significant."


So, XML says that whitespaced is passed to the application.  SOAP is an 
XML application (or part of an application), and I think the SOAP spec is 
now clear.  In general, WS is insignificant when used to bracket envelope 
constructions such as <header>, but is significant within the context of 
individual header blocks or body child elements. 

I don't have time to copy all the text here, but the binding framework and 
other parts of the spec should make clear the responsibility of a 
transport binding when transmitting an envelope infoset, and the 
responsibilities of an intermediate node relaying a message.

Most likely, this text will appear in a formal working draft shortly. Hope 
this helps.


Noah


[1] http://www.w3.org/2000/xp/Group/1/10/11/soap12-part1.html#soapenv
[2] 
http://www.w3.org/2000/xp/Group/1/10/11/soap12-part1.html#soapheadblock
[3] http://www.w3.org/2000/xp/Group/1/10/11/soap12-part1.html#soapbodyel

------------------------------------------------------------------
Noah Mendelsohn                              Voice: 1-617-693-4036
IBM Corporation                                Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142
------------------------------------------------------------------
Received on Tuesday, 18 June 2002 23:43:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:59:10 GMT