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]

Reply via email to