{ namespace_uri => 'http://www.loc.gov/MARC21/slim',
docs => 'http://www.loc.gov/marcxml/',
schema_location => 'http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd',
- }
+ },
+ marc21 => { docs => 'http://www.loc.gov/marc/' }
}
);
docs => 'http://www.loc.gov/marcxml/',
schema_location => 'http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd',
}
- }
+ marc21 => { docs => 'http://www.loc.gov/marc/' }
+ },
);
for my $type ( keys %record_xslt ) {
$feed->link( unapi => $base) if ($flesh_feed);
print "Content-type: ". $feed->type ."; charset=utf-8\n\n";
- print $U->entityize($feed->toString) . "\n";
+ print $feed->toString . "\n";
return Apache2::Const::OK;
}
$feed->link( unapi => $base) if ($flesh_feed);
print "Content-type: ". $feed->type ."; charset=utf-8\n\n";
- print $U->entityize($feed->toString) . "\n";
+ print $feed->toString . "\n";
return Apache2::Const::OK;
}
print "Content-type: ". $feed->type ."; charset=utf-8\n\n";
- print $U->entityize($feed->toString) . "\n";
+ print $feed->toString . "\n";
return Apache2::Const::OK;
}
print "Content-type: ". $feed->type ."; charset=utf-8\n\n";
- print $U->entityize($feed->toString) . "\n";
+ print $feed->toString . "\n";
return Apache2::Const::OK;
}
template="$base/1.1/$lib/mods3/$class/?searchTerms={searchTerms}&startPage={startPage?}&startIndex={startIndex?}&count={count?}&searchLang={language?}"/>
<Url type="application/x-mods+xml"
template="$base/1.1/$lib/mods/$class/?searchTerms={searchTerms}&startPage={startPage?}&startIndex={startIndex?}&count={count?}&searchLang={language?}"/>
+ <Url type="application/octet-stream"
+ template="$base/1.1/$lib/marc21/$class/?searchTerms={searchTerms}&startPage={startPage?}&startIndex={startIndex?}&count={count?}&searchLang={language?}"/>
<Url type="application/x-marcxml+xml"
template="$base/1.1/$lib/marcxml/$class/?searchTerms={searchTerms}&startPage={startPage?}&startIndex={startIndex?}&count={count?}&searchLang={language?}"/>
<Url type="text/html"
package OpenILS::WWW::SuperCat::Feed::ris::item;
use base 'OpenILS::WWW::SuperCat::Feed::marcxml::item';
+package OpenILS::WWW::SuperCat::Feed::marc21;
+use base 'OpenILS::WWW::SuperCat::Feed::marcxml';
+use MARC::File::XML ( BinaryEncoding => 'utf8', RecordFormat => 'USMARC' );
+
+sub new {
+ my $class = shift;
+ my $self = $class->SUPER::new;
+ $self->{type} = 'application/octet-stream';
+ return $self;
+}
+
+
+sub toString {
+ my $self = shift;
+
+ $self->{doc} = '';
+ for my $item ( $self->items ) {
+ my $r = MARC::Record->new_from_xml( $item->{doc}->toString(1) );
+ $r->update_leader;
+ $self->{doc} .= $r->encode;
+ }
+
+ return $self->{doc};
+}
+
+package OpenILS::WWW::SuperCat::Feed::marc21::item;
+use base 'OpenILS::WWW::SuperCat::Feed::marcxml::item';
+
1;