Anonymous | Login | 03-03-2021 00:09 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||||||
0000547 | [Squeak Packages] XML-Yaxo | feature | always | 11-23-04 08:58 | 10-31-07 16:13 | ||||||||
Reporter | MarcusDenker | View Status | public | ||||||||||
Assigned To | michael | ||||||||||||
Priority | normal | Resolution | fixed | ||||||||||
Status | resolved | ||||||||||||
Summary | 0000547: [BUG][FIX] XML parser example fails (was: XML parser and friends no documented at all....) | ||||||||||||
Description |
Subject: [BUG][FIX] XML parser example fails (was: XML parser and friends no documented at all....) Author: Boris Gaertner Date Posted: 22 November 2004 Archive ID: 25609 Comments: "stane ducasse" <ducasse@iam.unibe.ch> wrote: > hi all > > As usual no comment and no example for the XML-Parser classes. > > Does someone has some tests/examples for this package? Because I never > output xml.... > > XMLDOMParser addressBookXMLWithDTD leads to an error. That worked in Squeak 3.4 and in Squeak 3.6. I did the example step-by-step with 3.6 and with 3.7 and found that XMLTokenizer>>nextLiteral was changed. In earlier versions, we had validChars := ':-_.' asSet. Now we have a class variable LiteralChars that is an array of boolean values. The value at position " asciiValue + 1 " tells us whether the ascii value is a literal char. In the class this variable LiteralChars is initialized, but regrettable under the assumption that array indices begin with 0. That is a bug and its consequence is that the literal xml:stylesheet is not correctly read. The attached change set is an attempt to fix the problem. As the mistake is clearly identified, I think that it should not be difficult to review the fix. However ... ... Uses of class variables NameDelimiters and DigitTable are (NameDelimiters at: char asciiValue) (DigitTable at: char asciiValue) This assumes an index range from 0 to 255 and will inevitably crash when the character (Character value: 0) is ever read. I fixed that, too - call me a pedant if you think I am one! (The fix is in the class initialization and in the methods that access the class variables). By the way: Squeak has a class CharacterSet which implements what tokenizers need: character sets. > I think it is the time for this wonderful community to wake up....We > need at least comments and example which can be done using tests. You are right, but for tests I need more time. Mind that I am not very experienced with XML; I used that code once to file in an electronic dictionary, that was all. > Stef Greetings, Boris |
||||||||||||
Additional Information | |||||||||||||
Attached Files |
![]() |
||||||||||||
|
![]() |
|
(0011404 - 77 - 77 - 77 - 77 - 77 - 77) michael 10-31-07 16:13 |
Picked up the idea using CharacterSet instead of Array and fixed the problems |
Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
39 total queries executed. 31 unique queries executed. |