Re: EntityResolver patch
"Karl Waclawek" <[email protected]> Sun, 25 Apr 2004 14:37:01 -0400
| Newsgroups | gmane.text.xml.sax.devel |
|---|---|
| Message-ID | <002a01c42af4$4c43e000$0200a8c0@karlglen188> |
----- Original Message ----- From: "Elliotte Rusty Harold" <[email protected]> To: "Karl Waclawek" <[email protected]> Cc: <[email protected]> > At 12:19 PM -0400 4/25/04, Karl Waclawek wrote: > > >The question I have is not about clarifying it, which is good, > >but about the reason for not allowing this in the first place. > > > >Why should the entity resolver not be called on the document entity > >if parse(systemId) is called? > > I think the assumption is that if the user provides a URL to be > parsed, then that is actually the URL they want to be parsed. If they > want to parse a different URL, then provide that different URL. This > is all done explicitly in the method argumentsso it's not hard. > > On the other hand, the user can't be expected to know the detailed > URL of every external entity that will then be loaded, and provide it > in the initial method invocation. Hence the EntityResolver. I would say the same argument can apply to the document entity as well, since its system Id may also be application or library generated, and it could make a lot of sense in the application context to resolve it exactly the same way as the other entities. > Also, remember that the prime motivation and use for this class is > for resolving external DTD subsets, not instance documents. That can > be done too, but it's really the DTD that motivates this class. I haven't seen anything to convince me that the special exception for the document entity makes sense. It likely requires extra effort to implement, and allowing the entity resolver call-back doesn't seem to have a detrimental effect. 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