diff --git a/settings.gradle b/settings.gradle
index b2fbeb4..60603ed 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,7 +1,13 @@
pluginManagement {
repositories {
mavenLocal()
- mavenCentral()
+ mavenCentral {
+ metadataSources {
+ mavenPom()
+ artifact()
+ ignoreGradleMetadataRedirection()
+ }
+ }
gradlePluginPortal()
}
}
diff --git a/src/test/java/org/xbib/marc/MarcToModsTest.java b/src/test/java/org/xbib/marc/MarcToModsTest.java
index c8963bb..d089091 100644
--- a/src/test/java/org/xbib/marc/MarcToModsTest.java
+++ b/src/test/java/org/xbib/marc/MarcToModsTest.java
@@ -45,163 +45,175 @@ public class MarcToModsTest {
@Test
public void testSax() throws Exception {
String s = "summerland.mrc";
- InputStream marcInputStream = getClass().getResource(s).openStream();
- Marc marc = Marc.builder()
- .setInputStream(marcInputStream)
- .setCharset(Charset.forName("ANSEL"))
- .setSchema(MARC21_FORMAT)
- .build();
- Source source = new SAXSource(marc.iso2709XmlReader(), new InputSource(marcInputStream));
- StringWriter writer = new StringWriter();
- StreamResult streamResult = new StreamResult(writer);
- TransformerFactory tf = TransformerFactory.newInstance();
- Transformer transformer = tf.newTransformer();
- transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
- transformer.setOutputProperty(OutputKeys.METHOD, "xml");
- transformer.setOutputProperty(OutputKeys.INDENT, "yes");
- transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
- transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
- transformer.transform(source, streamResult);
- assertThat(writer.toString(),
- CompareMatcher.isIdenticalTo(getClass().getResource("summerland-sax-marc.xml").openStream()));
+ try (InputStream marcInputStream = getClass().getResource(s).openStream()) {
+ Marc marc = Marc.builder()
+ .setInputStream(marcInputStream)
+ .setCharset(Charset.forName("ANSEL"))
+ .setSchema(MARC21_FORMAT)
+ .build();
+ Source source = new SAXSource(marc.iso2709XmlReader(), new InputSource(marcInputStream));
+ StringWriter writer = new StringWriter();
+ StreamResult streamResult = new StreamResult(writer);
+ TransformerFactory tf = TransformerFactory.newInstance();
+ Transformer transformer = tf.newTransformer();
+ transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
+ transformer.setOutputProperty(OutputKeys.METHOD, "xml");
+ transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+ transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
+ transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
+ transformer.transform(source, streamResult);
+ assertThat(writer.toString(),
+ CompareMatcher.isIdenticalTo(getClass().getResource("summerland-sax-marc.xml").openStream()));
+ }
}
@Test
public void testDom() throws Exception {
String s = "summerland.mrc";
- InputStream marcInputStream = getClass().getResource(s).openStream();
- Marc marc = Marc.builder()
- .setInputStream(marcInputStream)
- .setCharset(Charset.forName("ANSEL"))
- .setSchema(MARC21_FORMAT)
- .build();
- Sax2Dom sax2Dom = new Sax2Dom(marc.iso2709XmlReader(), new InputSource(marcInputStream));
- Document document = sax2Dom.document();
- StringWriter writer = new StringWriter();
- TransformerFactory tf = TransformerFactory.newInstance();
- Transformer transformer = tf.newTransformer();
- transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
- transformer.setOutputProperty(OutputKeys.METHOD, "xml");
- transformer.setOutputProperty(OutputKeys.INDENT, "yes");
- transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
- transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
- transformer.transform(new DOMSource(document), new StreamResult(writer));
- assertThat(writer.toString(),
- CompareMatcher.isIdenticalTo(getClass().getResource("summerland-dom-marc.xml").openStream()));
+ try (InputStream marcInputStream = getClass().getResource(s).openStream()) {
+ Marc marc = Marc.builder()
+ .setInputStream(marcInputStream)
+ .setCharset(Charset.forName("ANSEL"))
+ .setSchema(MARC21_FORMAT)
+ .build();
+ Sax2Dom sax2Dom = new Sax2Dom(marc.iso2709XmlReader(), new InputSource(marcInputStream));
+ Document document = sax2Dom.document();
+ StringWriter writer = new StringWriter();
+ TransformerFactory tf = TransformerFactory.newInstance();
+ Transformer transformer = tf.newTransformer();
+ transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
+ transformer.setOutputProperty(OutputKeys.METHOD, "xml");
+ transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+ transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
+ transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
+ transformer.transform(new DOMSource(document), new StreamResult(writer));
+ assertThat(writer.toString(),
+ CompareMatcher.isIdenticalTo(getClass().getResource("summerland-dom-marc.xml").openStream()));
+ }
}
@Test
public void testStylesheetSax() throws Exception {
String s = "summerland.mrc";
- InputStream marcInputStream = getClass().getResource(s).openStream();
- Marc marc = Marc.builder()
- .setInputStream(marcInputStream)
- .setCharset(Charset.forName("ANSEL"))
- .setSchema(MARC21_FORMAT)
- .build();
- Source source = new SAXSource(marc.iso2709XmlReader(), new InputSource(marcInputStream));
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- StreamResult streamResult = new StreamResult(out);
- InputStream xslInputStream = getClass().getResourceAsStream("MARC21slim2MODS3-6.xsl");
- TransformerFactory factory = TransformerFactory.newInstance();
- factory.setURIResolver(new ClasspathResourceURIResolver());
- Transformer transformer = factory.newTemplates(new StreamSource(xslInputStream)).newTransformer();
- transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
- transformer.setOutputProperty(OutputKeys.METHOD, "xml");
- transformer.setOutputProperty(OutputKeys.INDENT, "yes");
- transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
- transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
- transformer.setErrorListener(new ErrorListener() {
- @Override
- public void warning(TransformerException exception) throws TransformerException {
- exception.printStackTrace();
- }
+ try (InputStream marcInputStream = getClass().getResource(s).openStream()) {
+ Marc marc = Marc.builder()
+ .setInputStream(marcInputStream)
+ .setCharset(Charset.forName("ANSEL"))
+ .setSchema(MARC21_FORMAT)
+ .build();
+ Source source = new SAXSource(marc.iso2709XmlReader(), new InputSource(marcInputStream));
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ StreamResult streamResult = new StreamResult(out);
+ InputStream xslInputStream = getClass().getResourceAsStream("MARC21slim2MODS3-6.xsl");
+ TransformerFactory factory = TransformerFactory.newInstance();
+ // required for realtive URI resolving in xsl:include
+ factory.setURIResolver(new ClasspathResourceURIResolver());
+ Transformer transformer = factory.newTemplates(new StreamSource(xslInputStream)).newTransformer();
+ transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
+ transformer.setOutputProperty(OutputKeys.METHOD, "xml");
+ transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+ transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
+ transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
+ transformer.setErrorListener(new ErrorListener() {
+ @Override
+ public void warning(TransformerException exception) throws TransformerException {
+ exception.printStackTrace();
+ }
- @Override
- public void error(TransformerException exception) throws TransformerException {
- exception.printStackTrace();
- }
+ @Override
+ public void error(TransformerException exception) throws TransformerException {
+ exception.printStackTrace();
+ }
- @Override
- public void fatalError(TransformerException exception) throws TransformerException {
- exception.printStackTrace();
- }
- });
- transformer.transform(source, streamResult);
- marcInputStream.close();
- xslInputStream.close();
- assertThat(out.toByteArray(),
- CompareMatcher.isIdenticalTo(getClass().getResource("summerland-sax-mods.xml").openStream()));
+ @Override
+ public void fatalError(TransformerException exception) throws TransformerException {
+ exception.printStackTrace();
+ }
+ });
+ transformer.transform(source, streamResult);
+ marcInputStream.close();
+ xslInputStream.close();
+ assertThat(out.toByteArray(),
+ CompareMatcher.isIdenticalTo(getClass().getResource("summerland-sax-mods.xml").openStream()));
+ }
}
@Test
public void testStylesheetDom() throws Exception {
String s = "summerland.mrc";
- InputStream marcInputStream = getClass().getResource(s).openStream();
- Marc marc = Marc.builder()
- .setInputStream(marcInputStream)
- .setCharset(Charset.forName("ANSEL"))
- .setSchema(MARC21_FORMAT)
- .build();
- Sax2Dom sax2Dom = new Sax2Dom(marc.iso2709XmlReader(), new InputSource(marcInputStream));
- Document document = sax2Dom.document();
- Source source = new DOMSource(document);
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- StreamResult streamResult = new StreamResult(out);
- InputStream xslInputStream = getClass().getResourceAsStream("MARC21slim2MODS3-6.xsl");
- TransformerFactory factory = TransformerFactory.newInstance();
- factory.setURIResolver(new ClasspathResourceURIResolver());
- Transformer transformer = factory.newTemplates(new StreamSource(xslInputStream)).newTransformer();
- transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
- transformer.setOutputProperty(OutputKeys.METHOD, "xml");
- transformer.setOutputProperty(OutputKeys.INDENT, "yes");
- transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
- transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
- transformer.setErrorListener(new ErrorListener() {
- @Override
- public void warning(TransformerException exception) throws TransformerException {
- exception.printStackTrace();
- }
+ try (InputStream marcInputStream = getClass().getResource(s).openStream()) {
+ Marc marc = Marc.builder()
+ .setInputStream(marcInputStream)
+ .setCharset(Charset.forName("ANSEL"))
+ .setSchema(MARC21_FORMAT)
+ .build();
+ Sax2Dom sax2Dom = new Sax2Dom(marc.iso2709XmlReader(), new InputSource(marcInputStream));
+ Document document = sax2Dom.document();
+ Source source = new DOMSource(document);
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ StreamResult streamResult = new StreamResult(out);
+ InputStream xslInputStream = getClass().getResourceAsStream("MARC21slim2MODS3-6.xsl");
+ TransformerFactory factory = TransformerFactory.newInstance();
+ factory.setURIResolver(new ClasspathResourceURIResolver());
+ Transformer transformer = factory.newTemplates(new StreamSource(xslInputStream)).newTransformer();
+ transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
+ transformer.setOutputProperty(OutputKeys.METHOD, "xml");
+ transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+ transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
+ transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
+ transformer.setErrorListener(new ErrorListener() {
+ @Override
+ public void warning(TransformerException exception) throws TransformerException {
+ exception.printStackTrace();
+ }
- @Override
- public void error(TransformerException exception) throws TransformerException {
- exception.printStackTrace();
- }
+ @Override
+ public void error(TransformerException exception) throws TransformerException {
+ exception.printStackTrace();
+ }
- @Override
- public void fatalError(TransformerException exception) throws TransformerException {
- exception.printStackTrace();
- }
- });
- transformer.transform(source, streamResult);
- marcInputStream.close();
- xslInputStream.close();
- assertThat(out.toByteArray(),
- CompareMatcher.isIdenticalTo(getClass().getResource("summerland-dom-mods.xml").openStream()));
+ @Override
+ public void fatalError(TransformerException exception) throws TransformerException {
+ exception.printStackTrace();
+ }
+ });
+ transformer.transform(source, streamResult);
+ marcInputStream.close();
+ xslInputStream.close();
+ assertThat(out.toByteArray(),
+ CompareMatcher.isIdenticalTo(getClass().getResource("summerland-dom-mods.xml").openStream()));
+ }
}
+ /**
+ * With regard to sandboxed CI/CD platforms, we avoid loading external XSL style sheets from loc.gov
+ * We run the test with a local copy.
+ *
+ * @throws Exception if test fails
+ */
@Test
- public void testLocStyleSheet() throws Exception {
+ public void testLocLocalCopyStyleSheet() throws Exception {
String s = "summerland.mrc";
- InputStream marcInputStream = getClass().getResource(s).openStream();
- Marc marc = Marc.builder()
- .setInputStream(marcInputStream)
- .setCharset(Charset.forName("ANSEL"))
- .setSchema(MARC21_FORMAT)
- .build();
- StringWriter sw = new StringWriter();
- Result result = new StreamResult(sw);
- System.setProperty("http.agent", "Java Agent");
- marc.transform(TransformerFactory.newInstance(),
- new URL("http://www.loc.gov/standards/mods/v3/MARC21slim2MODS3.xsl"), result);
- assertThat(sw.toString(),
- CompareMatcher.isIdenticalTo(getClass().getResource("summerland-mods-loc-goc.xml").openStream()));
+ try (InputStream marcInputStream = getClass().getResource(s).openStream()) {
+ Marc marc = Marc.builder()
+ .setInputStream(marcInputStream)
+ .setCharset(Charset.forName("ANSEL"))
+ .setSchema(MARC21_FORMAT)
+ .build();
+ StringWriter sw = new StringWriter();
+ Result result = new StreamResult(sw);
+ URL url = getClass().getResource("MARC21slim2MODS3.xsl");
+ TransformerFactory factory = TransformerFactory.newInstance();
+ factory.setURIResolver(new ClasspathResourceURIResolver());
+ marc.transform(factory, url, result);
+ assertThat(sw.toString(),
+ CompareMatcher.isIdenticalTo(getClass().getResource("summerland-mods-loc-goc-local-copy.xml").openStream()));
+ }
}
-
private static class ClasspathResourceURIResolver implements URIResolver {
@Override
- public Source resolve(String href, String base) throws TransformerException {
+ public Source resolve(String href, String base) {
return new StreamSource(getClass().getResourceAsStream(href));
}
}
diff --git a/src/test/resources/org/xbib/marc/MARC21slim2MODS3.xsl b/src/test/resources/org/xbib/marc/MARC21slim2MODS3.xsl
new file mode 100644
index 0000000..600490f
--- /dev/null
+++ b/src/test/resources/org/xbib/marc/MARC21slim2MODS3.xsl
@@ -0,0 +1,5076 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ BK
+ SE
+
+
+ BK
+ MM
+ CF
+ MP
+ VM
+ MU
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ a
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ a
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ yes
+
+
+ yes
+
+
+ text
+ cartographic
+ notated music
+ sound recording-nonmusical
+ sound recording-musical
+ still image
+ moving image
+ three dimensional object
+ software, multimedia
+ mixed material
+
+
+
+ globe
+
+
+ remote-sensing image
+
+
+
+
+
+ map
+
+
+ atlas
+
+
+
+
+
+
+
+ database
+
+
+ loose-leaf
+
+
+ series
+
+
+ newspaper
+
+
+ periodical
+
+
+ web site
+
+
+
+
+
+
+
+ abstract or summary
+
+
+ bibliography
+
+
+ catalog
+
+
+ dictionary
+
+
+ encyclopedia
+
+
+ handbook
+
+
+ legal article
+
+
+ index
+
+
+ discography
+
+
+ legislation
+
+
+ theses
+
+
+ survey of literature
+
+
+ review
+
+
+ programmed text
+
+
+ filmography
+
+
+ directory
+
+
+ statistics
+
+
+ technical report
+
+
+ legal case and case notes
+
+
+ law report or digest
+
+
+ treaty
+
+
+
+
+
+ conference publication
+
+
+
+
+
+
+
+ numeric data
+
+
+ database
+
+
+ font
+
+
+ game
+
+
+
+
+
+ patent
+
+
+ offprint
+
+
+ festschrift
+
+
+
+ biography
+
+
+
+
+ essay
+
+
+ drama
+
+
+ comic strip
+
+
+ fiction
+
+
+ humor, satire
+
+
+ letter
+
+
+ novel
+
+
+ short story
+
+
+ speech
+
+
+
+
+
+
+ biography
+
+
+ conference publication
+
+
+ drama
+
+
+ essay
+
+
+ fiction
+
+
+ folktale
+
+
+ history
+
+
+ humor, satire
+
+
+ memoir
+
+
+ poetry
+
+
+ rehearsal
+
+
+ reporting
+
+
+ sound
+
+
+ speech
+
+
+
+
+
+
+ art original
+
+
+ kit
+
+
+ art reproduction
+
+
+ diorama
+
+
+ filmstrip
+
+
+ legal article
+
+
+ picture
+
+
+ graphic
+
+
+ technical drawing
+
+
+ motion picture
+
+
+ chart
+
+
+ flash card
+
+
+ microscope slide
+
+
+ model
+
+
+ realia
+
+
+ slide
+
+
+ transparency
+
+
+ videorecording
+
+
+ toy
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ code
+ marccountry
+
+
+
+
+
+
+
+ code
+ iso3166
+
+
+
+
+
+
+
+ text
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ :,;/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ monographic
+ continuing
+ multipart monograph
+ single unit
+ integrating resource
+ serial
+
+
+
+
+
+
+ ab
+
+
+
+
+
+
+
+
+ Annual
+ Bimonthly
+ Semiweekly
+ Daily
+ Biweekly
+ Semiannual
+ Biennial
+ Triennial
+ Three times a week
+ Three times a month
+ Continuously updated
+ Monthly
+ Quarterly
+ Semimonthly
+ Three times a year
+ Unknown
+ Weekly
+ Completely irregular
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ reformatted digital
+
+
+ digitized microfilm
+
+
+ digitized other analog
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ access
+
+
+ preservation
+
+
+ replacement
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ summary or subtitle
+ sung or spoken text
+ libretto
+ table of contents
+ accompanying material
+ translation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ summary or subtitle
+ sung or spoken text
+ libretto
+ table of contents
+ accompanying material
+ translation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Latn
+ Arab
+ Arab
+ Latn
+ Latn
+ CJK
+ Cyrl
+ Cyrl
+ Hebr
+ Grek
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Latn
+ Arab
+ Arab
+ Latn
+ Latn
+ CJK
+ Cyrl
+ Cyrl
+ Hebr
+ Grek
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+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
+
+ abcde35
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/test/resources/org/xbib/marc/summerland-mods-loc-goc-local-copy.xml b/src/test/resources/org/xbib/marc/summerland-mods-loc-goc-local-copy.xml
new file mode 100644
index 0000000..d766c1d
--- /dev/null
+++ b/src/test/resources/org/xbib/marc/summerland-mods-loc-goc-local-copy.xml
@@ -0,0 +1,54 @@
+
+
+Summerland
+
+
+Chabon, Michael.
+
+text
+
+
+nyu
+
+
+New York
+
+Miramax Books/Hyperion Books for Children
+c2002
+2002
+1st ed.
+monographic
+
+
+
+eng
+
+
+
+500 p. ; 22 cm.
+
+Ethan Feld, the worst baseball player in the history of the game, finds himself recruited by a 100-year-old scout to help a band of fairies triumph over an ancient enemy.
+juvenile
+
+Fantasy
+
+
+Baseball
+Fiction
+
+
+Magic
+Fiction
+
+0786808772
+0786816155 (pbk.)
+
+aacr
+DLC
+020805
+20030616111422.0
+12883376
+Converted from MARCXML to MODS version 3.4 using MARC21slim2MODS3-4.xsl
+ (Revision 1.70)
+
+