W3C home > Mailing lists > Public > xml-editor@w3.org > January to March 2002

Unparsed entity referenced in EntityValue: Forbidden?

From: kengo koseki <kengo@tt.rim.or.jp>
Date: Thu, 31 Jan 2002 10:54:23 -0500 (EST)
To: xml-editor@w3.org
Message-Id: <20020201000822.5ABE.KENGO@tt.rim.or.jp>
Dear Editors,

In "4.4 XML Processor Treatment of Entities and References",

http://www.w3.org/TR/REC-xml#entproc

the table says that XML processor must detect fatal error when 
an Unparsed entity is referenced in an EntityValue. 
(column "Unparsed", row "Reference in EntityValue", "Forbidden")

But I think it should be "Bypassed" rather than "Forbidden".


Reasons:

----------------------------------------------------------------
<!NOTATION jpg SYSTEM "jpg">
<!ENTITY ent SYSTEM "ent" NDATA jpg>
<!ENTITY foo "&ent;">
<!ENTITY bar "&#x26;ent;">
----------------------------------------------------------------

The last two entity declaration ("foo" and "bar") may have 
same replacement text, but 

- The declaration of "foo" causes fatal error. 
- The declaration of "bar" is OK.
- The reference to the entity named "bar" causes fatal error.


And also, the order of declarations may cause problem.
For example,

----------------------------------------------------------------
<!ENTITY foo "&ent;">
<!--
    :
(other declarations)
    :
-->
<!NOTATION jpg SYSTEM "jpg">
<!ENTITY ent SYSTEM "ent" NDATA jpg>
----------------------------------------------------------------

It is impossible to say whether the declaration of "foo" is fatal error
or not, until the "ent" declaration appear.


I think these problems can be avoided if the reference is "Bybassed"
rather than "Forbidden".

(This comment is based on the argumentation at the xml-users ML in Japan.
 http://www2.xml.gr.jp/log.html?MLID=xmlusers&N=7378+7381+7382+7391&FORMAT=MIN
I'm sorry for my poor English.)

---
koseki
Received on Thursday, 31 January 2002 12:42:36 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:59:31 GMT