Skip to content

Commit a0f2736

Browse files
committed
Write valid leader without counting #527
Instead of just appending the incoming leader elements, this adds the static values for Pos: 00-04, 10-16, 20-23. By using `0`as default value for Pos: 00-04 and 12-16. #527 (comment)
1 parent 32beffb commit a0f2736

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

metafacture-biblio/src/main/java/org/metafacture/biblio/marc21/MarcXmlEncoder.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ private void writeLeader() {
435435
if (!leader.isEmpty()) {
436436
prettyPrintIndentation();
437437
writeTag(Tag.leader::open);
438-
writeRaw(leader);
438+
writeRaw("0000" + leader.substring(0, 4) + "2200000" + leader.substring(5, 7) + "4500"); // creates a valid leader without counted elements
439439
writeTag(Tag.leader::close);
440440
prettyPrintNewLine();
441441
}

0 commit comments

Comments
 (0)