Value of xml:space

Hello,

     I was just looking at the description of xml:space in section 2.10 of 
XML 1.0 [1].  It says that if the xml:space attribute is declared, it must 
be declared "as an enumerated type whose values are one or both of 
"default" and "preserve"."  However, it doesn't indicate that other values 
for the attribute are not permitted if the attribute is not declared, nor 
does it assign a meaning to such values.

     In the following document the "declared intent" for the content of 
the root element is that the default white-space processing mode of the 
application is acceptable.  Section 2.10 further says that the "declared 
intent is considered to apply to all elements in the content of the 
element where it is specified, unless overridden with another instance of 
the xml:space attribute."

<root xml:space='preserve'>
  <child xml:space='xyzzy'>
  </child>
  <child xml:space='default'>
  </child>
</root>

     Clearly the xml:space attribute on the second child element overrides 
the declared intent of root, but what about the first child element?  Does 
that value (xyzzy) signal no intention for application space handling in 
the first child, meaning that neither default nor preserve is in effect 
for the first child element, or does it fail to override the intent of 
root?

     Does anybody know whether it was intended that xml:space could have 
arbitrary values if it's not declared?


     A second question:  the penultimate paragraph of section 2.10 states, 
in part, that "The value "default" signals that applications' default 
white-space processing modes are acceptable for this element; the value 
"preserve" indicates the intent that applications preserve all the white 
space," while the last paragraph of section 2.10, indicates that "The root 
element of any document is considered to have signaled no intentions as 
regards application space handling, unless it provides a value for this 
attribute or the attribute is declared with a default value."

     Is signaling no intention the same as signaling the default 
white-space processing mode is acceptable?  In other words, are there 
three signals or only two?  If there are three, why is signaling 'default' 
not the default?  If there are only two, why is one of the signals 
described in two different ways, i.e., as signaling the default is 
acceptable and as signaling no intention?

Thanks,

Henry
[1] http://www.w3.org/TR/2000/REC-xml-20001006#sec-white-space
------------------------------------------------------------------
Henry Zongaro      Xalan development
IBM SWS Toronto Lab   Tie Line 969-6044;  Phone (905) 413-6044
mailto:zongaro@ca.ibm.com

Received on Friday, 31 May 2002 12:42:56 UTC