The parser issues the error as "validation error" instead of "well-formedness error" (if you turn on validation, you can see the error).
I guess the rationale was because of 3.3.1 Validity constraint: Entity Name Values of type ENTITY must match the Name production, values of type ENTITIES must match Names; ==>*** each Name must match the name of an unparsed entity declared in the DTD. ***<== So the parser just issues "validation error" if no matching declaration is found. May be we should clarify with the XML spec committee and see which one should be used..... Tinny ----- Original Message ----- From: "Jean-Fran�ois Farley" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, March 06, 2002 11:28 AM Subject: unparsed entity... well-formdness... > from the xml spec: > > ----- > 4.1 Character and Entity References > [...] > Well-Formedness Constraint: Entity Declared > In a document without any DTD, a document with only an internal DTD subset > which contains no parameter entity references, or a document with > "standalone='yes'", the Name given in the entity reference must match that > in an entity declaration > ----- > > So I understand that a xml file with only an internal DTD containing > entities, the entities must be declared. > > so > > <?xml version="1.0" encoding="ISO-8859-1"?> > <!DOCTYPE img [ > <!ELEMENT img EMPTY> > <!ATTLIST img src ENTITY #REQUIRED> > <!ENTITY logo SYSTEM "http://www.something.com/pic.gif" NDATA gif> > <!NOTATION gif PUBLIC "gif viewer"> > ]> > <img src="logo"/> > > must be well-formed and > > <?xml version="1.0" encoding="ISO-8859-1"?> > <!DOCTYPE img [ > <!ELEMENT img EMPTY> > <!ATTLIST img src ENTITY #REQUIRED> > <!ENTITY logo SYSTEM "http://www.something.com/pic.gif" NDATA gif> > <!NOTATION gif PUBLIC "gif viewer"> > ]> > <img src="logo_entity_notdeclared"/> > > must not be well-formed since the entity "logo_entity_notdeclared" isn't > declared... > > however, the SAXParser parse method seems to think that it's well-formed... > > Am I missing something here? > > Thanks a lot. > > > Jeff. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
