smalltalk
/
osmo-st-all
Archived
1
0
Fork 0

soap: Ignore unknown namespaces and assign dummy URLs

This commit is contained in:
Holger Hans Peter Freyther 2011-02-20 18:35:00 +01:00
parent 03fb87b322
commit fca3355744
1 changed files with 13 additions and 1 deletions

View File

@ -333,6 +333,18 @@ Object subclass: SoPortableUtil [
]
]
XML.XMLParser subclass: SoXMLParser [
| namespaces |
findNamespace: ns [
[^ super findNamespace: ns]
on: XML.InvalidSignal
do: [^ self customNamespaces at: ns ifAbsentPut: ['unknown'] ]
]
customNamespaces [
^ namespaces ifNil: [namespaces := Dictionary new]
]
]
Object subclass: SoVWXMLParserAdapter [
@ -427,7 +439,7 @@ Object subclass: SoVWXMLParserAdapter [
"assuming VWXML"
<category: 'actions'>
^(XML.XMLParser processDocumentString: xmlString
^(SoXMLParser processDocumentString: xmlString
beforeScanDo: [:p | p validate: false]) root
]
]