XML processor treatement of entities

S

sylvain.loiseau

It's not so clear for me, in the xml spec, which is the required
behaviour of an XML processor for entities :

- The characters entities (predefined, decimal and hexadecimal) must
be expended and treated as characters content ("Numeric character
references MAY also be used; they are expanded immediately when
recognized and MUST be treated as character data")
- but what for the other entities (excluding parameters and unparsed
entities ?): is there a case where they are not expended and provided
in the text node content, if they are declared externaly or if the
processor is not validating ?

Thanks,
Sylvain
 
R

Richard Tobin

- but what for the other entities (excluding parameters and unparsed
entities ?): is there a case where they are not expended and provided
in the text node content, if they are declared externaly or if the
processor is not validating ?

Internal entities must be expanded. External entities must be
expanded by validating processors, but need not be by non-validating
processors.

There is also the possibility of externally-defined internal entities,
that is, internal entities defined in the external subset.
Non-validating parsers need not have read the external subset, and if
they haven't seen the declaration they can't even tell whether a
reference is to an internal or external entity, let alone expand it.

-- Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top