Reputation: 2503
What is the terminology for an element like <Something />
?
I called it self terminating element, but then it only seemed natural (lly wrong maybe).
Also is there a term to distinguish a simple element
<Something>abc</Something>
from
<ns3:Something>yxz</ns3:Something>
Upvotes: 0
Views: 40
Reputation: 163587
The syntactic form <something/>
is correctly called an empty-element tag.
Note that this is really a property of the tag, not of the element; the element represented by <something/>
is indistinguishable from the element represented by <something></something>
, so by the time you move from the world of tags to the world of elements, the distinction is lost.
The element <x>aaa</x>
(as opposed to <p:x>aaa</p:x>
) is probably best referred to as a no-namespace element -- provided that there's no default namespace in scope on some containing element. But you won't find that term in the Namespaces specification; the closest it gets is "an element with an expanded name whose namespace name has no value", which is hopelessly unwieldy.
Upvotes: 1