Re: Attribute values with unresolved entities
"Karl Waclawek" <[email protected]> Sun, 25 Apr 2004 15:02:05 -0400
| Newsgroups | gmane.text.xml.sax.devel |
|---|---|
| Message-ID | <005301c42af7$cd4730a0$0200a8c0@karlglen188> |
----- Original Message ----- From: "Elliotte Harold" <[email protected]> To: <[email protected]> Sent: Sunday, April 25, 2004 2:20 PM > I thought David Brownell had fixed this at some point, but don't see > anything about it in the docs. Consider this document: > > <!DOCTYPE root SYSTEM "http://www.example.com/DTD/example.dtd"> > <root name="data&entity; some more data"/> > > Now consider this document being parsed by a parser that *does not read > the external DTD subset* > What should such a parser report for the attribute value? It can't call > skippedEntity(). It's got to return a string or maybe throw an exception. > > This is not a theoretical question. I have run into this one myself. > Xerces, I think, simply drops the entity and anything it reference, but > I really don't like that. Expat currently expands the reference to nothing, just like Xerces. What else can one do? There is no streaming context for reporting attributes. > I don't see a clean solution here. Suggestions are appreciated, but I > think we do need to address this case in the JavaDocs. I think I'm > leaning toward throwing an exception, but others may feel differently. If there is an exception it would mean there is an error. But is there? Karl ------------------------------------------------------- This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek For a limited time only, get FREE Ground shipping on all orders of $35 or more. Hurry up and shop folks, this offer expires April 30th! http://www.thinkgeek.com/freeshipping/?cpg=12297 _______________________________________________ List: sax-devel, [email protected] See: http://www.saxproject.org/ https://lists.sourceforge.net/lists/listinfo/sax-devel