internal/external general entities

steadyspirit

Usenet Archive
Joined
Dec 14, 2007
Messages
2
Reaction score
0
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.
 

Pavel Lepin

Usenet Archive
Joined
Apr 20, 2007
Messages
263
Reaction score
0
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

No members online now.

Forum statistics

Threads
548,049
Messages
3,104,246
Members
248,133
Latest member
DujonT

Latest Threads

Top