Expressions

- DOM lookups now canonicalize attribute names, and no longer return
  the unmodified name if the lookup yields nothing.
This commit is contained in:
Paul Beckingham 2011-07-19 22:34:29 -04:00
parent 19cb6110bd
commit a6fadaee67

View file

@ -215,6 +215,7 @@ const std::string DOM::get (const std::string& name, const Task& task)
Nibbler n (name);
int id;
std::string uuid;
std::string canonical;
// Primitives
std::string copy_name (name);
@ -222,8 +223,8 @@ const std::string DOM::get (const std::string& name, const Task& task)
return /*_cache[name] =*/ copy_name;
// <attr>
else if (task.has (name))
return task.get (name);
else if (Arguments::is_attribute (name, canonical))
return task.get (canonical);
// <id>.<name>
else if (n.getInt (id))