|
|||||
Entities: matching based on replacement text | |||||
Prerequisite Concepts | Related Syntax |
When processing SGML input, some patterns distinguish data characters occurring in parsed character data (or occurring in the content of CDATA and RCDATA elements) from characters in referenced data entities. These patterns do not apply to external data entities, which are processed by external-data-entity
rules. Thus, they pertain only to CDATA and SDATA entities whose replacement text appears in their declarations. Since these patterns apply only to SGML documents, they can only be used in translate
rules.
Any pattern with an occurrence indicator, or any pattern that could have an occurrence indicator, can be restricted within or outside replacement text for such entities. To match the expansion of a CDATA or SDATA entity, use one of the following keywords:
cdata
. Prefixes a pattern that matches only the replacement text of a CDATA entity.
sdata
. Prefixes a pattern that matches only the replacement text of an SDATA entity.
entity
. Prefixes a pattern that matches the replacement text of either a CDATA or SDATA entity.
A pattern prefixed by any of the above keywords must match the complete replacement text of a single referenced entity.
To prevent a pattern from matching with all or part of an entity expansion, use one of the following keywords:
pcdata
. Prefixes a pattern that only matches data characters that do not include replacement text for such entities.
text
. Prefixes a pattern that is unrestricted in this regard. Matched text can overlap the replacement text of one or more such entities.
non-cdata
. Prefixes a pattern that connot include replacement text of a referenced CDATA entity. The matched text can include all or part of the replacement text for one or more SDATA entities.
non-sdata
. Prefixes a pattern that cannot include replacement text of a referenced SDATA entity. The matched text can include all or part of the replacement text for one or more CDATA entities.
Prerequisite Concepts Entities Pattern matching |
Related Syntax cdata non-cdata non-sdata pcdata sdata translate |
---- |