forked from codeZeilen/DAV-smalltalk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed namespaces from parsed xml tags
- Loading branch information
Josafat-Mattias Burmeister
committed
Jul 3, 2019
1 parent
7ef847f
commit cff02aa
Showing
20 changed files
with
76 additions
and
61 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
repository/DAV.package/CalDavClient.class/instance/checkPropertyStatus..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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
parsing | ||
checkPropertyStatus: anEventNode | ||
|
||
| propertyStatus | | ||
|
||
propertyStatus := anEventNode firstTagNamed: #'d:propstat'. | ||
|
||
(propertyStatus firstTagNamed: #'d:status') contents first string = 'HTTP/1.1 200 OK' | ||
ifFalse: [CalDavGenericException signal: | ||
'There was an error retrieving information for an event'] |
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
13 changes: 6 additions & 7 deletions
13
repository/DAV.package/CalDavClient.class/instance/parseEventInformation..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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
parsing | ||
parseEventInformation: anEventNode | ||
|
||
| properties propertyStatus resultProperties | | ||
propertyStatus := anEventNode firstTagNamed: #'d:propstat'. | ||
(propertyStatus firstTagNamed: #'d:status') contents first string = 'HTTP/1.1 200 OK' | ||
ifFalse: [CalDavGenericException signal: 'There was an error retrieving information for an event']. | ||
| properties resultProperties | | ||
|
||
self checkPropertyStatus: anEventNode. | ||
|
||
properties := (propertyStatus firstTagNamed: #'d:prop') elements. | ||
properties := (anEventNode firstTagNamed: #'d:prop') elements. | ||
resultProperties := Dictionary newFrom: {#urlLocalPart -> (anEventNode firstTagNamed: #'d:href') contents first string}. | ||
properties | ||
select: [:property | property contents notEmpty] | ||
thenDo: [:property | | ||
resultProperties at: property name asSymbol put: property contents first string ]. | ||
|
||
resultProperties at: (self tagWithOutNamespace: property name) asSymbol put: property contents first string ]. | ||
^ resultProperties |
4 changes: 4 additions & 0 deletions
4
repository/DAV.package/CalDavClient.class/instance/tagWithOutNamespace..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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
parsing | ||
tagWithOutNamespace: aString | ||
|
||
^ (aString subStrings: ':') last |
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
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
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
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
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
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
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
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