-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b0030b3
commit 96009c6
Showing
14 changed files
with
102 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Package { #name : #ConfigurationOfXmlDomVisitor } | ||
Package { #name : 'ConfigurationOfXmlDomVisitor' } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Extension { #name : #XMLCData } | ||
Extension { #name : 'XMLCData' } | ||
|
||
{ #category : #'*XML-DOM-Visitor-visitor' } | ||
{ #category : '*XML-DOM-Visitor-visitor' } | ||
XMLCData >> accept: aVisitor [ | ||
aVisitor visitCData: self | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 6 additions & 4 deletions
10
repository/XML-DOM-Visitor/XMLDOMElementVisitorTest.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,39 @@ | ||
Class { | ||
#name : #XMLDOMTestVisitor, | ||
#superclass : #XMLDOMVisitor, | ||
#name : 'XMLDOMTestVisitor', | ||
#superclass : 'XMLDOMVisitor', | ||
#instVars : [ | ||
'entries' | ||
], | ||
#category : 'XML-DOM-Visitor-Visitor' | ||
#category : 'XML-DOM-Visitor-Visitor', | ||
#package : 'XML-DOM-Visitor', | ||
#tag : 'Visitor' | ||
} | ||
|
||
{ #category : #accessing } | ||
{ #category : 'accessing' } | ||
XMLDOMTestVisitor >> entries [ | ||
^ entries | ||
] | ||
|
||
{ #category : #initialization } | ||
{ #category : 'initialization' } | ||
XMLDOMTestVisitor >> initialize [ | ||
super initialize. | ||
entries := OrderedCollection new | ||
] | ||
|
||
{ #category : #visiting } | ||
{ #category : 'visiting' } | ||
XMLDOMTestVisitor >> visitDocument: aDocument [ | ||
entries add: 'version' -> aDocument version. | ||
entries add: 'encoding' -> aDocument encoding. | ||
super visitDocument: aDocument | ||
] | ||
|
||
{ #category : #visiting } | ||
{ #category : 'visiting' } | ||
XMLDOMTestVisitor >> visitElement: anElement [ | ||
entries add: anElement name -> anElement name. | ||
super visitElement: anElement | ||
] | ||
|
||
{ #category : #visiting } | ||
{ #category : 'visiting' } | ||
XMLDOMTestVisitor >> visitString: aStringNode [ | ||
entries add: #string -> aStringNode string | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,82 @@ | ||
Class { | ||
#name : #XMLDOMTypedElement, | ||
#superclass : #XMLElement, | ||
#category : 'XML-DOM-Visitor-DOM' | ||
#name : 'XMLDOMTypedElement', | ||
#superclass : 'XMLElement', | ||
#category : 'XML-DOM-Visitor-DOM', | ||
#package : 'XML-DOM-Visitor', | ||
#tag : 'DOM' | ||
} | ||
|
||
{ #category : #'typed attribute accessing' } | ||
{ #category : 'typed attribute accessing' } | ||
XMLDOMTypedElement >> booleanAt: aName [ | ||
^ self booleanFrom: (self attributeAt: aName) | ||
] | ||
|
||
{ #category : #'private - converting' } | ||
{ #category : 'private - converting' } | ||
XMLDOMTypedElement >> booleanFrom: aString [ | ||
^ #('1' 'true' 'yes') includes: aString | ||
] | ||
|
||
{ #category : #'typed value accessing' } | ||
{ #category : 'typed value accessing' } | ||
XMLDOMTypedElement >> booleanValue [ | ||
^ self booleanFrom: self rawContentString | ||
] | ||
|
||
{ #category : #'typed attribute accessing' } | ||
{ #category : 'typed attribute accessing' } | ||
XMLDOMTypedElement >> dateAt: aName [ | ||
^ self dateFrom: (self attributeAt: aName) | ||
] | ||
|
||
{ #category : #'private - converting' } | ||
{ #category : 'private - converting' } | ||
XMLDOMTypedElement >> dateFrom: aString [ | ||
^ DateAndTime fromString: aString | ||
] | ||
|
||
{ #category : #'typed value accessing' } | ||
{ #category : 'typed value accessing' } | ||
XMLDOMTypedElement >> dateValue [ | ||
^ self dateFrom: self rawContentString | ||
] | ||
|
||
{ #category : #'typed value accessing' } | ||
{ #category : 'typed value accessing' } | ||
XMLDOMTypedElement >> isEmptyValue [ | ||
^ self rawContentString isEmpty | ||
] | ||
|
||
{ #category : #'typed attribute accessing' } | ||
{ #category : 'typed attribute accessing' } | ||
XMLDOMTypedElement >> numberAt: aName [ | ||
^ (self attributeAt: aName) asNumber | ||
] | ||
|
||
{ #category : #'typed value accessing' } | ||
{ #category : 'typed value accessing' } | ||
XMLDOMTypedElement >> numberValue [ | ||
^ self rawContentString asNumber | ||
] | ||
|
||
{ #category : #'typed attribute accessing' } | ||
{ #category : 'typed attribute accessing' } | ||
XMLDOMTypedElement >> stringAt: aName [ | ||
^ self attributeAt: aName | ||
] | ||
|
||
{ #category : #'typed value accessing' } | ||
{ #category : 'typed value accessing' } | ||
XMLDOMTypedElement >> stringValue [ | ||
^ self rawContentString | ||
] | ||
|
||
{ #category : #'typed attribute accessing' } | ||
{ #category : 'typed attribute accessing' } | ||
XMLDOMTypedElement >> symbolAt: aName [ | ||
^ (self attributeAt: aName) asSymbol | ||
] | ||
|
||
{ #category : #'typed value accessing' } | ||
{ #category : 'typed value accessing' } | ||
XMLDOMTypedElement >> symbolValue [ | ||
^ self rawContentString asSymbol | ||
] | ||
|
||
{ #category : #'typed attribute accessing' } | ||
{ #category : 'typed attribute accessing' } | ||
XMLDOMTypedElement >> uuidAt: aName [ | ||
^ UUID fromString: (self attributeAt: aName) | ||
] | ||
|
||
{ #category : #'typed value accessing' } | ||
{ #category : 'typed value accessing' } | ||
XMLDOMTypedElement >> uuidValue [ | ||
^ UUID fromString: self rawContentString | ||
] |
Oops, something went wrong.