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;
sub toString {
my $self = shift;
$self->composeDoc;
- $log->debug("Document composed");
return $self->{doc}->toString(1);
}
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;
}
if ($type eq 'opac') {
$self->_create_node(
- 'marc:record',
+ '*[local-name()="record"]',
'http://www.w3.org/1999/xhtml',
'xhtml:link',
undef,
$linkid++;
} elsif ($type eq 'unapi-id') {
$self->_create_node(
- 'marc:record',
+ '*[local-name()="record"]',
'http://www.w3.org/1999/xhtml',
'xhtml:abbr',
undef,