Use paths without apiversion attribute

Paths that don't define a "version" attribute will now match all
possible versions. This will make it easier to add support for newer
APIs as they are introduced.
This commit is contained in:
Stefanos A 2013-11-07 16:48:11 +01:00
parent 1f6d445021
commit 7ab5e3ab6c

View file

@ -129,7 +129,7 @@ namespace Bind
{ {
path.Append(String.Format( path.Append(String.Format(
"[contains(concat('|', @name, '|'), '|{0}|') and " + "[contains(concat('|', @name, '|'), '|{0}|') and " +
"contains(concat('|', @version, '|'), '|{1}|')]", "(contains(concat('|', @version, '|'), '|{1}|') or not(boolean(@version)))]",
apiname, apiname,
apiversion)); apiversion));
} }
@ -139,7 +139,7 @@ namespace Bind
} }
else if (!String.IsNullOrEmpty(apiversion)) else if (!String.IsNullOrEmpty(apiversion))
{ {
path.Append(String.Format("[contains(concat('|', @version, '|'), '|{0}|')]", apiversion)); path.Append(String.Format("[contains(concat('|', @version, '|'), '|{0}|') or not(boolean(@version))]", apiversion));
} }
if (function != null) if (function != null)