Re: Locator2 is wrong
Elliotte Rusty Harold <[email protected]> Mon, 26 Apr 2004 16:00:30 -0400
| Newsgroups | gmane.text.xml.sax.devel |
|---|---|
| Message-ID | <p06010208bcb319d6dad7@[192.168.254.88]> |
At 9:38 AM -0700 4/26/04, Jeff Rafter wrote: >The nice thing about using the locator is that it fits neatly because of the >setDocumentLocator callback. I might tend to agree that encoding could >definitely be considered part of the entity location. The line and column >vis a vis the encoding may be different when using different encodings. >However, this is referring to the effective encoding-- not the encoding >label that appears in an XML Declaration-- which I think getEncoding should >report. Is that right? This is tricky. As the docs are currently written, getEncoding returns the encoding according to strict XML rules. This means, for instance, that the encoding in the HTTP header takes precedence over the encoding declaration. As currently written this would mean that the parser would return this even if it actually used a different encoding for reading the document. Bleah. -- Elliotte Rusty Harold [email protected] Effective XML (Addison-Wesley, 2003) http://www.cafeconleche.org/books/effectivexml http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA ------------------------------------------------------- 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