Is xmlns=“” a valid xml namespace?

后端 未结 2 1952
无人共我
无人共我 2020-12-18 18:29

Is \"empty\" a valid value for XML namespace? If yes what does it mean?

I have the following XML code but I\'m not sure to which namespace Field1 and

2条回答
  •  忘掉有多难
    2020-12-18 18:45

    Yes, it is valid. Section 6.2 in the Namespaces in XML 1.0 Recommendation specifically says:

    The attribute value in a default namespace declaration MAY be empty. This has the same effect, within the scope of the declaration, of there being no default namespace.

    Quoted from comment:

    It is legal, and this is the way to bring an element into the global namespace.

提交回复
热议问题