name of (stream-shelf-item | element-qualifier | element-declaration | entity-declaration)
name of operator retrieves the name associated with the specified item.
When the specified item is a stream and it is attached to a file or referent,
name of retrieves the name of that file or referent. If the specified stream is input to the SGML or XML parser,
name of will retrieve the name of the markup parser.
While parsing SGML or XML,
name of can be applied to an element qualifier in order to identify the name of the element, parent element, preparent element, ancestor element, open element, or doctype.
For example, code based on the following can be used when processing a document instance with the SGML or XML parser:
set parents-name to name of parent do when name of preparent is "chapter" ... done
When the specified item is an element or entity declaration,
name of retrieves the name of that element or entity declaration.
It is an error to invoke
name of on a stream that has no name, such as one
attached to a buffer. Streams attached to a file, referent, external output, or markup parser do have names.
When in doubt,
name of should be preceded by the
has name test.