OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   XML 1.0 spec appears to violate itself

[ Lists Home | Date Index | Thread Index ]
  • From: "Takuki Kamiya" <kamiya@rp.open.cs.fujitsu.co.jp>
  • To: <xml-dev@ic.ac.uk>
  • Date: Tue, 24 Aug 1999 21:56:50 +0900

I have been worndering whether the XML 1.0 specification represented in XML
format is well-formed or not in the exact sense which the specification itself
is supposed to define.

For everyone's convenience, the file is located at the following URL.

  http://www.w3.org/TR/1998/REC-xml-19980210.xml

On line 21, you can find the entity "lt" being redeclared as "<" as follows.

  <!ENTITY lt     "<">

I remember there were some debate on this list discussing if such redeclaration
is allowed in terms of the XML 1.0 specification. I am not trying to revive that
thread in this message.

Even if we assume "lt" could be redeclared in the internal DTD subset for now
(I guess we can even extrapolate this is the case since the spec itself
redeclares it), I believe it'll end up being violating well-formedness constraint
for entities.

In 4.3.2 "Well-Formed Parsed Entities" of the XML 1.0 spec, it states that:

  "An internal general parsed entity is well-formed if its replacement text
   matches the production labeled content. All internal parameter entities
   are well-formed by definition. A consequence of well-formedness in entities
   is that the logical and physical structures in an XML document are properly
   nested; no start-tag, end-tag, empty-element tag, element, comment,
   processing instruction, character reference, or entity reference can begin
   in one entity and end in another."

And content is defined as:
  "content ::= (element | CharData | Reference | CDSect | PI | Comment)* "

I think that XML processor shall find the entity as "not well-formed" when it
tries to expand references to "lt" (i.e. &lt; ) if it have been redeclared
as "<", because "<" does not match the production rule for content.

Am I missing something?

= Takuki Kamiya  Phone: (045)476-4586 Fax: (045)476-4749   =
= FUJITSU LIMITED (COINS:7128-4217 NIFTY:HHA01731)         =


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS