Nicolas Cellier uploaded a new version of XML-Parser to project The Trunk:
http://source.squeak.org/trunk/XML-Parser-nice.23.mcz==================== Summary ====================
Name: XML-Parser-nice.23
Author: nice
Time: 27 December 2009, 3:26:55 am
UUID: 95eba115-08e7-4cad-acf3-b67213197abe
Ancestors: XML-Parser-nice.22
Cosmetic: move or remove a few temps inside closures
=============== Diff against XML-Parser-nice.22 ===============
Item was changed:
----- Method: XMLNamespaceScope>>validateAttributes: (in category 'validation') -----
validateAttributes: attributeList
"check all attribute namespaces are defined and not duplicated by aliasing"
+
- | namespace localName |
attributeList keysDo: [:attrName |
+ | namespace localName |
self splitName: attrName into: [:ns :ln |
namespace := ns.
localName := ln].
namespace ifNotNil: [
(self namespaceAliases: namespace) do: [:alias |
(attributeList includesKey: alias , ':' , localName)
ifTrue: [self parseError: 'Attributes ' , attrName , ' and ' , alias , ':' , localName , ' are aliased to namespace ' , (self namespaceURIOf: namespace) ]]]]!
Item was changed:
----- Method: XMLTokenizer>>nextLiteral (in category 'tokenizing') -----
nextLiteral
+ | resultStream nextChar |
- | resultStream nextChar resultString |
resultStream := (String new: 10) writeStream.
((nextChar := self peek) isLetter
or: [nextChar == $_])
ifFalse: [self errorExpected: 'Name literal.'].
+ [ | resultString |
+ nextChar := self peek.
- [nextChar := self peek.
(LiteralChars includes: nextChar)
ifTrue: [
nextChar == $&
ifTrue: [
nextChar := self next.
resultStream nextPut: (self peek == $#
ifTrue: [self nextCharReference]
ifFalse: [^resultStream contents])]
ifFalse: [
resultStream nextPut: self next]]
ifFalse: [resultString := resultStream contents.
resultString isEmpty
ifTrue: [self errorExpected: 'Name literal']
ifFalse: [^resultString]]] repeat!