Provide a suite of common XML utilities.
static const char *targetNs = "http://localhost:2000/calc.wsdl";
static const char goodSchema[] =
"<?xml version='1.0' encoding='UTF-8'?>"
" <schema targetNamespace='http://localhost:2000/calc.wsdl'"
" elementFormDefault='qualified'"
" xmlns='http://www.w3.org/2001/XMLSchema'"
" xmlns:xs='http://www.w3.org/2001/XMLSchema'"
" xmlns:bdem='http://bloomberg.com/schemas/bdem'"
" xmlns:m_bascalc='http://localhost:2000/calc.wsdl'"
" xmlns:tns='http://localhost:2000/calc.wsdl'"
" <xs:complexType name='Options'>"
" <xs:sequence>"
" <xs:element name='MaxDepth' type='xs:int'"
" minOccurs='0' maxOccurs='1'"
" default='32'"
" bdem:allowsDirectManipulation='0'>"
" </xs:element>"
" </xs:sequence>"
" </xs:complexType>"
" <complexType name='Configuration'>"
" <sequence>"
" <element name='Options' type='m_bascalc:Options'/>"
" </sequence>"
" </complexType>"
" <element name='Configuration' type='m_bascalc:Options'/>"
"</schema>";
static const char badSchema1[] =
"<?xml version='1.0' encoding='UTF-8'?>"
" elementFormDefault='qualified'"
" xmlns='http://www.w3.org/2001/XMLSchema'"
" xmlns:xs='http://www.w3.org/2001/XMLSchema'"
" xmlns:bdem='http://bloomberg.com/schemas/bdem'"
" xmlns:m_bascalc='http://localhost:2000/calc.wsdl'"
" xmlns:tns='http://localhost:2000/calc.wsdl'"
" <xs:complexType name='Options'>"
" <xs:sequence>"
" <xs:element name='MaxDepth' type='xs:int'"
" minOccurs='0' maxOccurs='1'"
" default='32'"
" bdem:allowsDirectManipulation='0'>"
" </xs:element>"
" </xs:sequence>"
" </xs:complexType>"
" <complexType name='Configuration'>"
" <sequence>"
" <element name='Options' type='m_bascalc:Options'/>"
" </sequence>"
" </complexType>"
" <element name='Configuration' type='m_bascalc:Options'/>"
"</schema>";
bool rc;
assert(rc);
assert(resultNs == targetNs);
assert(!rc);
Definition bslstl_string.h:1281
void clear() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_string.h:5430
static bool extractNamespaceFromXsd(const bsl::string_view &xsdSource, bsl::string *targetNamespace)