Re: XML Core WG needs input on xml:lang=""

On Friday 02 August 2002 11:02 am, Al Gilman wrote:
> The intended sense of xml:lang="" is to clear any hereditary value for
> this property and leave the scope in question with "no statement" as to
> language.  That is IIRC the same semantics as 'nil' in XQuery.

Yes, not having the ability to do so for the xml:* attributes (particularly 
xml:base) can cause serious problems in the context of XML fragments.

http://www.w3.org/TR/2002/CR-xmlenc-core-20020802/#sec-Serializing-XML
   ...
   Similar attention between the relationship of a fragment and the
   context into which it is being inserted should be given to the
   xml:base, xml:lang, and xml:space attributes as mentioned in the
   Security Considerations of [XML-exc-C14N]. For example, if the element
   <Bongo href="example.xml"/> is taken from a context and serialized
   with no xml:base [XML-Base] attribute and parsed in the context of the
   element:

   <Baz xml:base="http://example.org/"/>

   the result will be:

   <Baz xml:base="http://example.org/"><Bongo href="example.xml"/></Baz>

   where Bongo's href is subsequently interpreted as
   "http://example.org/example.xml". If this is not the correct URI,
   Bongo should have been serialized with its own xml:base attribute.
   Unfortunately, the recommendation that xmlns="" be emitted to divorce
   the default namespace of the fragment from the context into which it
   is being inserted can not be made for the attributes xml:base,
   xml:lang, and xml:space. The interpretation of an empty value for
   these attributes is undefined or maintains the contextual value.
   Consequently, applications SHOULD ensure (1) fragments that are to be
   encrypted are not dependent on XML attributes, or (2) if they are
   dependent and the resulting document is intended to be valid [XML],
   the fragment's definition permits the presence of the attributes and
   that they have non-empty values.

Received on Friday, 2 August 2002 11:37:35 UTC