fix xpath generation to match what works
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Tue, 28 Aug 2012 15:09:02 +0000 (11:09 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Fri, 21 Sep 2012 15:06:58 +0000 (11:06 -0400)
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/web/js/ui/default/url_verify/create_session.js

index 18f3200..4b1bd3e 100644 (file)
@@ -277,12 +277,12 @@ var create_session = {};
                 var obj = new uvus();
 
                 obj.session(session_id);
+
+                /* XXX TODO handle control fields (no subfields) */
                 obj.xpath(
-                    "//marc:datafield[@tag='" + tag + "']/marc:subfield[" +
+                    "//*[@tag='" + tag + "']/*[" +
                     uniquely_grouped[tag].split("").map(
-                        function(c) {
-                            return "@code='" + c + "'";
-                        }
+                        function(c) { return "@code='" + c + "'"; }
                     ).join(" or ") +
                     "]"
                 );