From: miker Date: Wed, 4 Jun 2008 04:15:53 +0000 (+0000) Subject: fix the marcxml feed to use default namespace on the record element X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=655474901ec2524bbe7dd0296214bbf5d02f2909;p=Evergreen.git fix the marcxml feed to use default namespace on the record element git-svn-id: svn://svn.open-ils.org/ILS/trunk@9766 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm index 9ad6c2c3ca..6d382a37d1 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm @@ -5,11 +5,8 @@ use OpenSRF::EX qw(:try); use XML::LibXML; use XML::LibXSLT; use OpenSRF::Utils::SettingsClient; -use OpenSRF::Utils::Logger qw/$logger/; use CGI; -my $log = 'OpenSRF::Utils::Logger'; - sub exists { my $class = shift; my $type = shift; @@ -215,7 +212,6 @@ sub composeDoc { sub toString { my $self = shift; $self->composeDoc; - $log->debug("Document composed"); return $self->{doc}->toString(1); } @@ -518,9 +514,8 @@ sub new { my $self = $class->SUPER::build($xml); return undef unless $self; $self->{doc}->documentElement->setNamespace('http://www.loc.gov/MARC21/slim', undef); - $self->{doc}->documentElement->setNamespace('http://www.loc.gov/MARC21/slim', 'marc'); $self->{type} = 'application/xml'; - $self->{holdings_xpath} = '/marc:record'; + $self->{holdings_xpath} = '/*[local-name()="record"]'; return $self; } @@ -531,7 +526,7 @@ sub link { if ($type eq 'opac') { $self->_create_node( - 'marc:record', + '*[local-name()="record"]', 'http://www.w3.org/1999/xhtml', 'xhtml:link', undef, @@ -540,7 +535,7 @@ sub link { $linkid++; } elsif ($type eq 'unapi-id') { $self->_create_node( - 'marc:record', + '*[local-name()="record"]', 'http://www.w3.org/1999/xhtml', 'xhtml:abbr', undef,