mirror of
https://github.com/jezhiggins/arabica
synced 2025-01-30 08:38:15 +01:00
Failed if namespace was explicitly given as empty. Fixed
This commit is contained in:
parent
ccc4836fd7
commit
981fd4e9e3
2 changed files with 4 additions and 4 deletions
|
@ -24,14 +24,14 @@ protected:
|
|||
const SAX::Attributes<std::string>& atts)
|
||||
{
|
||||
static const ValueRule rules[] = { { "name", true, 0, 0 },
|
||||
{ "namespace", false, 0, 0 },
|
||||
{ "namespace", false, "", 0 },
|
||||
{ 0, false, 0, 0 } };
|
||||
|
||||
std::map<std::string, std::string> attrs = gatherAttributes(qName, atts, rules);
|
||||
|
||||
Arabica::XPath::XPathExpressionPtr<std::string> name = context().xpath_attribute_value_template(attrs["name"]);
|
||||
|
||||
if(attrs.find("namespace") == attrs.end())
|
||||
if(attrs["namespace"] == "")
|
||||
return new Attribute(name,
|
||||
context().inScopeNamespaces());
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ protected:
|
|||
const SAX::Attributes<std::string>& atts)
|
||||
{
|
||||
static const ValueRule rules[] = { { "name", true, 0, 0 },
|
||||
{ "namespace", false, 0, 0 },
|
||||
{ "namespace", false, "", 0 },
|
||||
{ "use-attribute-sets", false, 0, 0 },
|
||||
{ 0, false, 0, 0 } };
|
||||
|
||||
|
@ -35,7 +35,7 @@ protected:
|
|||
if(attrs["use-attribute-sets"] != "")
|
||||
throw SAX::SAXException("don't understand use-attribute-sets yet");
|
||||
|
||||
if(attrs.find("namespace") == attrs.end())
|
||||
if(attrs["namespace"] == "")
|
||||
return new Element(name,
|
||||
context().inScopeNamespaces(),
|
||||
attrs["use-attribute-sets"]);
|
||||
|
|
Loading…
Add table
Reference in a new issue