mirror of
https://github.com/jezhiggins/arabica
synced 2025-01-17 18:12:04 +01:00
Change in checkPrefixAndNamespace to bind xmlns: to http://www.w3.org/2000/xmlns/ if it is unbound. This isn't exactly ideal, but it seems to be the least painful way to resolve the DOM and Namespace recommendation's disagreements about this.
This commit is contained in:
parent
b56eaec433
commit
9d914f19e8
1 changed files with 4 additions and 2 deletions
|
@ -35,8 +35,10 @@ std::pair<bool, stringT> checkPrefixAndNamespace(bool hasPrefix,
|
|||
|
||||
if(nodeType == DOM::Node<stringT>::ATTRIBUTE_NODE && prefix == xmlns)
|
||||
{
|
||||
if(namespaceURI == xmlnsURI)
|
||||
return std::make_pair(true, namespaceURI);
|
||||
// DOM mandates xmlns: be bound to a namespace URI, XML Namespace rec
|
||||
// says not - allow for both here
|
||||
if((namespaceURI == xmlnsURI) || (namespaceURI.empty()))
|
||||
return std::make_pair(true, xmlnsURI);
|
||||
throw DOM::DOMException(DOM::DOMException::NAMESPACE_ERR);
|
||||
} // if(nodeType == DOM::Node<stringT>::ATTRIBUTE_NODE && prefix == xmlns)
|
||||
|
||||
|
|
Loading…
Reference in a new issue