No extension attribute now matches all extensions

This allows us to reduce the amount of clutter in overrides.xml.
This commit is contained in:
Stefanos A 2013-11-03 21:28:24 +01:00
parent 7978627ad4
commit f95925302b

View file

@ -106,8 +106,12 @@ namespace Bind
if (extension != null) if (extension != null)
{ {
// match an override that has this specific extension
// *or* one that has no extension at all (equivalent
// to "match all possible extensions")
path.Append(String.Format( path.Append(String.Format(
"/function[contains(concat('|', @name, '|'), '|{0}|') and contains(concat('|', @extension, '|'), '|{1}|')]", "/function[contains(concat('|', @name, '|'), '|{0}|') and " +
"(contains(concat('|', @extension, '|'), '|{1}|') or not(boolean(@extension)))]",
function, function,
extension)); extension));
} }