Zum Inhalt springen

Modul:Citation: Unterschied zwischen den Versionen

umgestellt
KKeine Bearbeitungszusammenfassung
(umgestellt)
Zeile 719: Zeile 719:
end
end


for key, value in pairs( params ) do
-- handle titles
if isSet( args[ key ] ) then
if args.type == 'book' or args.type == 'map' or args.type == 'collection' then
if value.COinS and value.COinS ~= 'rft.jtitle' then
insertCOinS( 'rft.title=', args.title )
insertCOinS( value.COinS, args[ key ] )
if args.type == 'collection' then
elseif value.COinS_id and args[ key ] then
insertCOinS( 'rft.atitle=', args.title )
table.insert( rft, 'rft_id=' ..
insertCOinS( 'rft.btitle=', args.collection )
mw.uri.encode( value.COinS_id .. '/' .. args[ key ] ) )
table.insert( rft, 1, 'rft.genre=bookitem' )
end
else
insertCOinS( 'rft.btitle=', args.title )
table.insert( rft, 1, 'rft.genre=book' )
end
table.insert( rft, 1, 'rft_val_fmt=' .. mw.uri.encode( 'info:ofi/fmt:kev:mtx:book' ) )
else -- 'journal', 'newspaper'
insertCOinS( 'rft.title=', args.title )
insertCOinS( 'rft.atitle=', args.title )
if args.type == 'journal' then
insertCOinS( 'rft.jtitle=', args.journal )
else
insertCOinS( 'rft.jtitle=', args.newspaper )
end
end
table.insert( rft, 1, 'rft.genre=journal' )
table.insert( rft, 1, 'rft_val_fmt=' .. mw.uri.encode( 'info:ofi/fmt:kev:mtx:journal' ) )
end
end


if next( rft ) then
if #rft > 2 then
if args.type == 'book' or args.type == 'map' or args.type == 'collection' then
for key, value in pairs( params ) do
if args.type == 'collection' then
if isSet( args[ key ] ) then
insertCOinS( 'rft.atitle=', args.title )
if value.COinS and value.COinS ~= 'rft.jtitle' and value.COinS ~= 'rft.title' then
insertCOinS( 'rft.btitle=', args.collection )
insertCOinS( value.COinS, args[ key ] )
table.insert( rft, 1, 'rft.genre=bookitem' )
elseif value.COinS_id and args[ key ] then
else
table.insert( rft, 'rft_id=' ..
insertCOinS( 'rft.btitle=', args.title )
mw.uri.encode( value.COinS_id .. '/' .. args[ key ] ) )
table.insert( rft, 1, 'rft.genre=book' )
end
end
end
table.insert( rft, 1, 'rft_val_fmt=' .. mw.uri.encode( 'info:ofi/fmt:kev:mtx:book' ) )
else
table.insert( rft, 1, 'rft.genre=journal' )
table.insert( rft, 1, 'rft_val_fmt=' .. mw.uri.encode( 'info:ofi/fmt:kev:mtx:journal' ) )
if args.type == 'journal' then
insertCOinS( 'rft.jtitle=', args.journal )
else
insertCOinS( 'rft.jtitle=', args.newspaper )
end
insertCOinS( 'rft.atitle=', args.title )
end
end
table.insert( rft, 1, 'ctx_ver=Z39.88-2004' )
table.insert( rft, 1, 'ctx_ver=Z39.88-2004' )
rft = table.concat( rft, '&' )
rft = table.concat( rft, '&' )
Anonymer Benutzer