// Decimal encoding.
// [0-9]+;
else { // Convert from decimal to char.
$numeric =
$this->scanner->
getNumeric();
if (false ===
$numeric) { $this->
parseError('Expected &#DIGITS;, got &#%s',
$tok);
$this->scanner->
unconsume(2
);
return '&';
} $entity = CharacterReference::
lookupDecimal($numeric);
} } elseif ('=' ===
$tok &&
$inAttribute) { return '&';
} else { // String entity.
// Attempt to consume a string up to a ';'.
// [a-zA-Z0-9]+;
$cname =
$this->scanner->
getAsciiAlphaNum();
$entity = CharacterReference::
lookupName($cname);
// When no entity is found provide the name of the unmatched string
// and continue on as the & is not part of an entity. The & will