Current master creates XPath of volumes/volume/uris/uri
authorDan Scott <dan@coffeecode.net>
Wed, 29 Jun 2011 22:48:38 +0000 (18:48 -0400)
committerDan Scott <dan@coffeecode.net>
Wed, 29 Jun 2011 22:48:38 +0000 (18:48 -0400)
In the master integration template-toolkit branch, we can correct the
XPath to match reality.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Open-ILS/web/templates/default/opac/parts/misc_util.tt2

index 752ce57..3bc2fa8 100644 (file)
@@ -61,7 +61,6 @@
             END;
         END;
 
-        # URI info is in volumes/volume/uris/volume, instead of uri element
         FOR volume IN xml.findnodes('//*[local-name()="volumes"]/*[local-name()="volume"]');
 
             # Check volume visibility - could push this into XPath
@@ -71,7 +70,7 @@
             NEXT IF volume.getAttribute('deleted') == 'true';
 
             IF vol.label == '##URI##';
-                FOR uri IN volume.findnodes('./*[local-name()="uris"]/*[local-name()="volume"]');
+                FOR uri IN volume.findnodes('./*[local-name()="uris"]/*[local-name()="uri"]');
                     res.href = uri.getAttribute('href');
                     res.link = uri.getAttribute('label');
                     res.note = uri.getAttribute('use_restriction');