system-identifier of

operator

Return type:
String
Returns:
The system identifier for the currently-active external entity.
Syntax
system-identifier of entity
    


Purpose

system-identifier of entity retrieves the system identifier of the currently-active external entity, if any. It can be used in an external-data-entity rule or a external-text-entity rule, or in the dynamic scope created by the execution of these rules. So, in a function called from the body of an external-text-entity rule, system-identifier of entity will evaluate to the system identifier of the entity that fired the rule. If the currently-active entity is a defaulted entity, system-identifier of entity will evaluate to the system identifier of the default entity as it was declared in the input DTD.

In an external-data-entity rule or an external-text-entity rule, the format item %eq is a shorthand for system-identifier of entity.

If the currently-active external entity does not have a system identifier, system-identifier of entity uses the entity's public identifier to look up a system identifier on the current module's #library shelf, effectively as if

  #library{public-identifier of}
          

It is an error to invoke system-identifier of entity for an entity that was not declared with a system identifier, or whose public identifier cannot be used in tandem with #library to resolve to a system identifier. When in doubt, system-identifier of entity should be preceded by the entity is system test:

  do when entity is system
     output system-identifier of entity