|Anonymous | Login||08-18-2019 07:31 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|
|Summary||0000547: [BUG][FIX] XML parser example fails (was: XML parser and friends no documented at all....)|
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
"stane ducasse" <email@example.com> 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.
|Attached Files||Yaxo-fixes.2.cs [^] (2,703 bytes) 11-23-04 08:58|
(0011404 - 77 - 77 - 77 - 77 - 77 - 77)
|Picked up the idea using CharacterSet instead of Array and fixed the problems|
|11-23-04 08:58||MarcusDenker||New Issue|
|11-23-04 08:58||MarcusDenker||File Added: Yaxo-fixes.2.cs|
|11-25-04 09:22||MarcusDenker||Assigned To||=> michael|
|11-25-04 09:22||MarcusDenker||Status||new => assigned|
|08-11-05 19:00||MarcusDenker||Project||Squeak => Squeak Packages|
|10-31-07 16:13||michael||Status||assigned => resolved|
|10-31-07 16:13||michael||Resolution||open => fixed|
|10-31-07 16:13||michael||Note Added: 0011404|
| Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
39 total queries executed.|
31 unique queries executed.