FogBugz (Case [Issue]12229) Tools - XML Tools improvement

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

FogBugz (Case [Issue]12229) Tools - XML Tools improvement

Pharo Issue Tracker
FogBugz Notification
avatar
Camillo Bruni opened Case 12229: XML Tools improvement and assigned it to Everyone:
Enhancement in Project:  Tools: 2. External  •  You are subscribed to this case
Prof. Stef, I have produced updates to the XML-Parser, XML-Parser-Testing, and XML-Writer-Core packages you are maintaining.

These updates add validation against internal and external DTDs, proper replacement of general and parameter entites, customizable resolution of external parsed entities using Zinc and FileSystem, awareness of notations and unparsed entities, preservation of the internal DTD subset by the DOM parser (so printing a parsed doc with a DTD will produce approximately what was input), line numbers reporting in error messages, and better well-formed and validity constraints.

I had to largely rewrite the tokenizer to make everything work, but I followed the spec closely, and it is about the same speed as long as there is no DTD to validate against.

One problem is that while the tests I added and the existing tests all pass, for some reason helper messages in some test classes starting with "should" (in the style of should:raise:) are being interpreted as tests and run by TestRuner, even though they don't begin with "test" and take arguments! This is possibly a bug in TestRunner.

Another problem is that there are so many deprecated methods cluttering up classes, some of which have been deprecated for years! It is confusing and hard to see which methods to use just by browsing the protocols. I would really suggest using this code to get rid of the XML-Parser methods that have been deprecated for at least a year:

expiry := 1 year.
(SystemNavigation default allClassesInPackageNamed: 'XML-Parser')
do: [:class |
class selectors do: [:selector | | compiledMethod timeStamp |
compiledMethod := class compiledMethodAt: selector.
timeStamp := compiledMethod timeStamp copyAfter: Character space.
(compiledMethod isDeprecated
and: [(DateAndTime now - (DateAndTime fromString: timeStamp)) > expiry])
ifTrue: [class removeSelector: selector]]].

I ran and checked it myself and it doesn't break anything. Running the above with XML-Writer-Core might not be a bad idea either.

I also updated BitmapCharacterSet to use less memory.
Priority Priority: 5 – Fix If Time Status Status: Work Needed
Assigned To Assigned to: Everyone Milestone Milestone: Later

Go to Case
No longer need updates? Unsubscribe from this case.

Don't want FogBugz notifications anymore? Update your preferences.

FogBugz

_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker