Use paths without apiversion attribute
authorStefanos A <stapostol@gmail.com>
Thu, 7 Nov 2013 15:48:11 +0000 (16:48 +0100)
committerStefanos A <stapostol@gmail.com>
Thu, 7 Nov 2013 15:48:11 +0000 (16:48 +0100)
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.

Source/Bind/FuncProcessor.cs

index 34dc7ac1c5bd1b7507a79f96c5dbeb5971c9c585..e572c8e4b1ab073f3c6ba461a6434ee20678c0ec 100644 (file)
@@ -129,7 +129,7 @@ namespace Bind
             {
                 path.Append(String.Format(
                     "[contains(concat('|', @name, '|'), '|{0}|') and " +
-                    "contains(concat('|', @version, '|'), '|{1}|')]",
+                    "(contains(concat('|', @version, '|'), '|{1}|') or not(boolean(@version)))]",
                     apiname,
                     apiversion));
             }
@@ -139,7 +139,7 @@ namespace Bind
             }
             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)