Arbortext Command Language > Functions by Alphabetical Listing > entity
  
entity
entity(entity[, doc])
 
This function returns the value of the text or character entity named name. The doc argument specifies the identifier of the document tree to query. If omitted or 0, the current document is used. For a text entity, the function returns the replacement value. For example, if the DTD has the definition <!ENTITY AT “PTC Inc.”> the function entity ("AT") would return "PTC Inc..". If the entity is a character entity, this function searches the file APSPATH/lib/charent.cf for an entry matching name, returning the character given in the Unicode column if found. If it is not found, the return value varies depending on whether the document is an XML or SGML instance. For XML documents, the function returns the resolved single character replacement value, for example, for the declaration <!ENTITY Auml “&#38;#x00C4”> the function entity ("Auml") returns "D" (character 0xc4). For SGML documents, a character entity is normally declared as a SDATA entity, for example, <!ENTITY Auml SDATA “[Auml]”> and the function entity ("Auml") returns "[Auml]".