From fca33557441d7df964a80e89c2b472ff33588e29 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 20 Feb 2011 18:35:00 +0100 Subject: [PATCH] soap: Ignore unknown namespaces and assign dummy URLs --- SoXML.st | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/SoXML.st b/SoXML.st index c407b4e..6b93f1f 100644 --- a/SoXML.st +++ b/SoXML.st @@ -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" - ^(XML.XMLParser processDocumentString: xmlString + ^(SoXMLParser processDocumentString: xmlString beforeScanDo: [:p | p validate: false]) root ] ]