internal/external general entities

S

steadyspirit

I'm a beginner in XML and got a problem here.

In DTD, below entities were declared and all corresponding xml files
were made accordingly.
<!ENTITY addwok SYSTEM "add_work.xml">
<!ENTITY addhom SYSTEM "add_home.xml">
<!ENTITY data SYSTEM "data.xml">
<!ENTITY greet SYSTEM "greet.xml">
<!ENTITY today SYSTEM "date.xml">
<!ENTITY name "Alfred Hitchcock">
<!ENTITY signature "&name; &addwok;">

But, within XML document, only the name entity can be called (by
&name;). All other entities that relate to "external entities" are not
valid for work.

Why?

Any feedback are appreciated.
 
P

Pavel Lepin

In DTD, below entities were declared and all corresponding
xml files were made accordingly.
<!ENTITY addwok SYSTEM "add_work.xml">
<!ENTITY name "Alfred Hitchcock">

But, within XML document, only the name entity can be
called (by &name;). All other entities that relate to
"external entities" are not valid for work.

Why?

Probably because the parser you're using (which you forgot
to mention, by the way) is non-validating and doesn't parse
external parsed entities. See 4.4 in XML 1.0 4E and XML 1.1
2E. Specifically, the table of required treatment for
entities says for external parsed entities referenced in
content: 'Included if validating' (see 4.4.3),
and 'Forbidden' or 'Bypassed' for all other references.
 

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,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top