What do I do with an SGMLS_Entity?

Links: Next Previous Up Top

# What do I do with an `SGMLS_Entity`?

An `SGMLS_Entity` object can come in an `'entity'` event (in which case it is always external), in a `'start_subdoc'` or `'end_subdoc'` event (in which case it always has the type `'SUBDOC'`), or as the value of an attribute (in which case it may be internal or external). An object belonging to the `SGMLS_Entity` class may use the methods listed in table 5.

### Table 5: The `SGMLS_Entity` class

Method
  `name`
Return Type
  string
Description
  The entity name.

Method
  `type`
Return Type
  string
Description
  The entity type: `'CDATA'`, `'SDATA'`, `'NDATA'`, or `'SUBDOC'`.

Method
  `value`
Return Type
  string
Description
  The entity replacement text (internal entities only).

Method
  `sysid`
Return Type
  string
Description
  The system identifier (external entities only).

Method
  `pubid`
Return Type
  string
Description
  The public identifier (external entities only).

Method
  `filenames`
Return Type
  ARRAY
Description
  A list of file names generated from the sysid and pubid (external entities only).

Method
  `notation`
Return Type
  `SGMLS_Notation`
Description
  The associated notation (external data entities only).

An entity of type `'SUBDOC'` will have a sysid and pubid, and external data entity will have a sysid, pubid, filenames, and a notation, and an internal data entity will have a value.

Links: Next Previous Up Top