if one were to intern the names into packages as they are read, then no
lexical analysis is needed at the point where the document is written.
each package gets a unique name when it is introduced (at the first uri-prefix
binding). prefix bindings for all packages present within a document are
output "somewhere" at the document beginning. if the document has been
constructed, then, depending on ones element storage, although a tree walk may
be necessary, lexical analysis is not. the prefix bindings use the unique
names, as do the qualified names in the document body.
this is the power of packages and interned symbols. it's a better
representation of the "namespace problem" than individual name/uri pairs.