built-in shelf


#xmlns-names is a built in read-only string shelf displaying the currently active set of XML namespace/prefix mappings. The keys on the shelf are the element prefixes, and the values are the corresponding namespace names (URIs).


While parsing the content of the following element

  <a xmlns:omdoc="http://www.omnimark.com/docs/"
the shelf will contain
  • an item with key omdoc and value http://www.omnimark.com/docs/, and
  • an item with key omtbl and value http://www.omnimark.com/table.dtd/.

A namespace name consisting of a zero length string indicates the absence of a namespace. Encountering this explicitly causes the prefix to be removed from the shelf if it already exists, or otherwise simply not added.


When parsing the instance

  <a xmlns:foo="bar">
    <b xmlns:foo="">
Immediately following the start tag for a, the #xmlns-names shelf has an entry with key foo and value bar. Inside element b, this shelf item is removed. After the end of element b (but still within element a) the shelf item will be restored.


The default namespace is represented by a shelf item with the empty string as the key.

  <a xmlns="foo">

The #xmlns-names shelf is saved before each start tag, and restored after each end tag. The shelf is saved and cleared at the start of each markup-parse.