From f95925302b72bce6ea1ca18f3f75de46f4680285 Mon Sep 17 00:00:00 2001 From: Stefanos A Date: Sun, 3 Nov 2013 21:28:24 +0100 Subject: [PATCH] No extension attribute now matches all extensions This allows us to reduce the amount of clutter in overrides.xml. --- Source/Bind/FuncProcessor.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Bind/FuncProcessor.cs b/Source/Bind/FuncProcessor.cs index c3050ca3..57c1ae5b 100644 --- a/Source/Bind/FuncProcessor.cs +++ b/Source/Bind/FuncProcessor.cs @@ -106,8 +106,12 @@ namespace Bind 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( - "/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, extension)); }