String limits
Elliotte Harold <[email protected]> Sun, 25 Apr 2004 14:11:15 -0400
| Newsgroups | gmane.text.xml.sax.devel |
|---|---|
| Message-ID | <[email protected]> |
XML places no fundamental limit on the sizes of things. In particular it is legal and well-formed to have multigabayte: 1. Element names 2. Attribute values 3. Processing instruction data In practice, processing instruction data is where I expect problems to arise first, though attribute values are also possible. SAX uses pure strings for all these constructs and a few others, and Java strings are limited to a maximum of 2.1 gigachars. SAX currently says nothing about what to do when these boundaries are exceeded. This needs to be rectified. Options I see are 1. Truncation 2. Throw a SAXException 3. Throw a different exception. I suggest 2, throw a SAXException. We wil simply say SAX cannot handle such extreme documents. If this becomes a more practical limit, then we can revisit possible solutions in the future. -- Elliotte Rusty Harold ------------------------------------------------------- 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