View | Details | Raw Unified | Return to bug 26195
Collapse All | Expand All

(-)a/C4/XSLT.pm (+1 lines)
Lines 48-53 BEGIN { Link Here
48
    @ISA = qw(Exporter);
48
    @ISA = qw(Exporter);
49
    @EXPORT = qw(
49
    @EXPORT = qw(
50
        &XSLTParse4Display
50
        &XSLTParse4Display
51
        &transformMARCXML4XSLT
51
    );
52
    );
52
    $engine=Koha::XSLT::Base->new( { do_not_return_source => 1 } );
53
    $engine=Koha::XSLT::Base->new( { do_not_return_source => 1 } );
53
}
54
}
(-)a/Koha/OAI/Server/Repository.pm (-10 / +20 lines)
Lines 36-41 use YAML::XS; Link Here
36
use CGI qw/:standard -oldstyle_urls/;
36
use CGI qw/:standard -oldstyle_urls/;
37
use C4::Context;
37
use C4::Context;
38
use C4::Biblio;
38
use C4::Biblio;
39
use C4::XSLT qw( transformMARCXML4XSLT );
39
use Koha::XSLT::Base;
40
use Koha::XSLT::Base;
40
41
41
=head1 NAME
42
=head1 NAME
Lines 82-91 mode. A configuration file koha-oai.conf can look like that: Link Here
82
      schema: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd
83
      schema: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd
83
      include_items: 1
84
      include_items: 1
84
    marcxml:
85
    marcxml:
85
      metadataPrefix: marxml
86
      metadataPrefix: marcxml
86
      metadataNamespace: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim
87
      metadataNamespace: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim
87
      schema: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd
88
      schema: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd
88
      include_items: 1
89
      include_items: 1
90
      expanded_avs: 1
89
    oai_dc:
91
    oai_dc:
90
      metadataPrefix: oai_dc
92
      metadataPrefix: oai_dc
91
      metadataNamespace: http://www.openarchives.org/OAI/2.0/oai_dc/
93
      metadataNamespace: http://www.openarchives.org/OAI/2.0/oai_dc/
Lines 166-181 sub DESTROY { Link Here
166
168
167
169
168
sub get_biblio_marcxml {
170
sub get_biblio_marcxml {
169
    my ($self, $biblionumber, $format) = @_;
171
    my ( $self, $biblionumber, $format ) = @_;
170
    my $with_items = 0;
172
    my $with_items   = 0;
173
    my $expanded_avs = 0;
171
    if ( my $conf = $self->{conf} ) {
174
    if ( my $conf = $self->{conf} ) {
172
        $with_items = $conf->{format}->{$format}->{include_items};
175
        $with_items   = $conf->{format}->{$format}->{include_items  };
176
        $expanded_avs = $conf->{format}->{$format}->{expanded_avs};
173
    }
177
    }
174
    my $record = GetMarcBiblio({
178
175
        biblionumber => $biblionumber,
179
    my $record = GetMarcBiblio(
176
        embed_items  => $with_items,
180
        {
177
        opac         => 1 });
181
            biblionumber => $biblionumber,
178
    $record ? $record->as_xml_record() : undef;
182
            embed_items  => $with_items,
183
            opac         => 1
184
        }
185
    );
186
    $record = transformMARCXML4XSLT( $biblionumber, $record )
187
        if $expanded_avs;
188
189
    return $record ? $record->as_xml_record() : undef;
179
}
190
}
180
191
181
192
182
- 

Return to bug 26195