|
|||||
Related Syntax | ||
operator |
name of
|
Syntax
name of stream? stream-name indexer? OR name of element-qualifier
name of
retrieves the name associated with the specified stream. If the specified stream 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, the name of
operator will retrieve the name of the markup parser. It is an error to invoke the name of
operator on a stream that is not attached to a file, referent, or markup parser.
If your program is parsing SGML or XML, you can also use the name of
operator followed by one of the element qualifiers to identify the name of the element, parent element, preparent element, ancestor element, doctype, or open element.
For example, you can use code based on the following 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
It is an error to use the name of
test on a stream that does not have a name. When in doubt, the test should be preceded by a has name
test.
Related Syntax has name |