Internal vs. external entity

R

Razvan

Hi





What is the difference between an internal and an external entity ?
The first one is defined in the internal subset (not in a separate DTD
file, but in the XML file itself - in DOCTYPE) while the second one is
defined in the external subset (in a separate DTD file) ? Or an
internal entity is defined in the file itself while an external entity
points to some other file (the external entity will be replaced by the
content of the file) ? Please clarify this issue.
Regards,
Razvan
 
R

Richard Tobin

Razvan said:
What is the difference between an internal and an external entity ?

An internal entity is defined by a string giving the text of the
entity, e.g.

<!ENTITY foo "hello world">

An external entity is defined by a URL giving the location of the
entity text, e.g.

<!ENTITY foo SYSTEM "http://example.org/myent.ent">

where that URL refers to a file containing the text.

An entity whose declaration appears in the internal subset is called
"internally declared" and one whose declaration appears in the
external subset is called "externally declared". This is quite
independent of whether it is an internal or external entity.

-- 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

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,739
Latest member
Clint8040

Latest Threads

Top