Re: [Saxdotnet-devel] SAX holes
Brought to you by:
jeffrafter,
kwaclaw
From: Karl W. <ka...@wa...> - 2004-12-07 20:56:13
|
> I know of two holes in the SAX API where it fails to address all > possible XML documents. It would be worth considering these and if > possible plugging them: > > 1. Maximum limits: > > XML places no size limits on anything. SAX does. There cannot be more > than 2.1 billion or so attributes in an element, characters in an > attribute values, characters in an element name, data in a processing > instruction. Possibly .NET does not have these issues. Does .Net have a > maximum string size or array size like Java does? If it does, this > concern should at least be addressed in the documentation if not solved. The size is limited by the data type of the Length property. Seems to be the same as in Java. > 2. Skipped entities in attribute values: SAX says nothing about how to > handle these. Most parsers just drop them out, though a few add > something like &entity; to the attributer's string value. This should be > fixed, but it might require some major redesign. It says something in LexicalHandler.startEntity(): <quote> Because of the streaming event model that SAX uses, some entity boundaries cannot be reported under any circumstances: a.. general entities within attribute values b.. parameter entities within declarations These will be silently expanded, with no indication of where the original entity boundaries were. </quote> It would be really hard to find a way to do that. Karl |