Merge branch 'turbomarc'
authorDennis Schafroth <dennis@indexdata.com>
Mon, 15 Mar 2010 14:11:46 +0000 (15:11 +0100)
committerDennis Schafroth <dennis@indexdata.com>
Mon, 15 Mar 2010 14:11:46 +0000 (15:11 +0100)
64 files changed:
.cproject
include/yaz/marcdisp.h
src/marc_read_xml.c
src/marcdisp.c
src/record_conv.c
src/zoom-c.c
test/.gitignore
test/test_record_conv.c
test/tmarc1.xml [new file with mode: 0644]
test/tmarc1.xml.marc [new file with mode: 0644]
test/tmarc2.xml [new file with mode: 0644]
test/tmarc2.xml.marc [new file with mode: 0644]
test/tmarc3.xml [new file with mode: 0644]
test/tmarc3.xml.marc [new file with mode: 0644]
test/tmarc4.xml [new file with mode: 0644]
test/tmarc4.xml.marc [new file with mode: 0644]
test/tmarc5.xml [new file with mode: 0644]
test/tmarc5.xml.marc [new file with mode: 0644]
test/tmarc6.xml [new file with mode: 0644]
test/tmarc6.xml.marc [new file with mode: 0644]
test/tmarc7.xml [new file with mode: 0644]
test/tmarc7.xml.marc [new file with mode: 0644]
test/tmarc8.xml [new file with mode: 0644]
test/tmarc8.xml.marc [new file with mode: 0644]
test/tmarc9.xml [new file with mode: 0644]
test/tmarc9.xml.marc [new file with mode: 0644]
test/tstmarc.sh
test/xml2marc1.xml [new file with mode: 0644]
test/xml2marc1.xml.marc [new file with mode: 0644]
test/xml2marc2.xml [new file with mode: 0644]
test/xml2marc2.xml.marc [new file with mode: 0644]
test/xml2marc3.xml [new file with mode: 0644]
test/xml2marc3.xml.marc [new file with mode: 0644]
test/xml2marc4.xml [new file with mode: 0644]
test/xml2marc4.xml.marc [new file with mode: 0644]
test/xml2marc5.xml [new file with mode: 0644]
test/xml2marc5.xml.marc [new file with mode: 0644]
test/xml2marc6.xml [new file with mode: 0644]
test/xml2marc6.xml.marc [new file with mode: 0644]
test/xml2marc7.xml [new file with mode: 0644]
test/xml2marc7.xml.marc [new file with mode: 0644]
test/xml2marc8.xml [new file with mode: 0644]
test/xml2marc8.xml.marc [new file with mode: 0644]
test/xml2marc9.xml [new file with mode: 0644]
test/xml2marc9.xml.marc [new file with mode: 0644]
test/xml2tmarc1.xml [new file with mode: 0644]
test/xml2tmarc1.xml.marc [new file with mode: 0644]
test/xml2tmarc2.xml [new file with mode: 0644]
test/xml2tmarc2.xml.marc [new file with mode: 0644]
test/xml2tmarc3.xml [new file with mode: 0644]
test/xml2tmarc3.xml.marc [new file with mode: 0644]
test/xml2tmarc4.xml [new file with mode: 0644]
test/xml2tmarc4.xml.marc [new file with mode: 0644]
test/xml2tmarc5.xml [new file with mode: 0644]
test/xml2tmarc5.xml.marc [new file with mode: 0644]
test/xml2tmarc6.xml [new file with mode: 0644]
test/xml2tmarc6.xml.marc [new file with mode: 0644]
test/xml2tmarc7.xml [new file with mode: 0644]
test/xml2tmarc7.xml.marc [new file with mode: 0644]
test/xml2tmarc8.xml [new file with mode: 0644]
test/xml2tmarc8.xml.marc [new file with mode: 0644]
test/xml2tmarc9.xml [new file with mode: 0644]
test/xml2tmarc9.xml.marc [new file with mode: 0644]
util/marcdump.c

index 80a5f3e..f42e265 100644 (file)
--- a/.cproject
+++ b/.cproject
 <?fileVersion 4.0.0?>
 
 <cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
-<storageModule moduleId="org.eclipse.cdt.core.settings">
-<cconfiguration id="cdt.managedbuild.toolchain.gnu.macosx.base.368006805">
-<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.macosx.base.368006805" moduleId="org.eclipse.cdt.core.settings" name="Default">
-<externalSettings/>
-<extensions>
-<extension id="org.eclipse.cdt.core.MachO" point="org.eclipse.cdt.core.BinaryParser"/>
-<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-</extensions>
-</storageModule>
-<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-<configuration artifactName="yaz" buildProperties="" description="" id="cdt.managedbuild.toolchain.gnu.macosx.base.368006805" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
-<folderInfo id="cdt.managedbuild.toolchain.gnu.macosx.base.368006805.761048058" name="/" resourcePath="">
-<toolChain id="cdt.managedbuild.toolchain.gnu.macosx.base.1850362137" name="cdt.managedbuild.toolchain.gnu.macosx.base" superClass="cdt.managedbuild.toolchain.gnu.macosx.base">
-<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.MachO" id="cdt.managedbuild.target.gnu.platform.macosx.base.736382379" name="Debug Platform" osList="macosx" superClass="cdt.managedbuild.target.gnu.platform.macosx.base"/>
-<builder buildPath="/Users/dennis/proj/yaz" id="cdt.managedbuild.target.gnu.builder.macosx.base.1919262822" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.macosx.base"/>
-<tool id="cdt.managedbuild.tool.macosx.c.linker.macosx.base.1175453977" name="MacOS X C Linker" superClass="cdt.managedbuild.tool.macosx.c.linker.macosx.base">
-<inputType id="cdt.managedbuild.tool.macosx.c.linker.input.1936915484" superClass="cdt.managedbuild.tool.macosx.c.linker.input">
-<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
-<additionalInput kind="additionalinput" paths="$(LIBS)"/>
-</inputType>
-</tool>
-<tool id="cdt.managedbuild.tool.macosx.cpp.linker.macosx.base.524764932" name="MacOS X C++ Linker" superClass="cdt.managedbuild.tool.macosx.cpp.linker.macosx.base"/>
-<tool id="cdt.managedbuild.tool.gnu.assembler.macosx.base.1871976203" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.macosx.base">
-<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1256561366" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
-</tool>
-<tool id="cdt.managedbuild.tool.gnu.archiver.macosx.base.1171332498" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.macosx.base"/>
-<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.macosx.base.1658301018" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.macosx.base"/>
-<tool id="cdt.managedbuild.tool.gnu.c.compiler.macosx.base.1367873707" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.macosx.base">
-<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1402339125" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
-</tool>
-</toolChain>
-</folderInfo>
-<sourceEntries>
-<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
-<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="util"/>
-<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="client"/>
-<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="include"/>
-</sourceEntries>
-</configuration>
-</storageModule>
-<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
-<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
-<storageModule moduleId="scannerConfiguration">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.macosx.base.368006805;cdt.managedbuild.toolchain.gnu.macosx.base.368006805.761048058;cdt.managedbuild.tool.gnu.c.compiler.macosx.base.1367873707;cdt.managedbuild.tool.gnu.c.compiler.input.1402339125">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-</storageModule>
-</cconfiguration>
-</storageModule>
-<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-<project id="yaz.null.1422187919" name="yaz"/>
-</storageModule>
+       <storageModule moduleId="org.eclipse.cdt.core.settings">
+               <cconfiguration id="cdt.managedbuild.toolchain.gnu.macosx.base.368006805">
+                       <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.macosx.base.368006805" moduleId="org.eclipse.cdt.core.settings" name="Default">
+                               <externalSettings/>
+                               <extensions>
+                                       <extension id="org.eclipse.cdt.core.MachO" point="org.eclipse.cdt.core.BinaryParser"/>
+                                       <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+                                       <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+                                       <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+                                       <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+                                       <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+                               </extensions>
+                       </storageModule>
+                       <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+                               <configuration artifactName="yaz" buildProperties="" description="" id="cdt.managedbuild.toolchain.gnu.macosx.base.368006805" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
+                                       <folderInfo id="cdt.managedbuild.toolchain.gnu.macosx.base.368006805.761048058" name="/" resourcePath="">
+                                               <toolChain id="cdt.managedbuild.toolchain.gnu.macosx.base.1850362137" name="cdt.managedbuild.toolchain.gnu.macosx.base" superClass="cdt.managedbuild.toolchain.gnu.macosx.base">
+                                                       <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.MachO" id="cdt.managedbuild.target.gnu.platform.macosx.base.736382379" name="Debug Platform" osList="macosx" superClass="cdt.managedbuild.target.gnu.platform.macosx.base"/>
+                                                       <builder buildPath="/Users/dennis/proj/yaz" id="cdt.managedbuild.target.gnu.builder.macosx.base.1919262822" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.macosx.base"/>
+                                                       <tool id="cdt.managedbuild.tool.macosx.c.linker.macosx.base.1175453977" name="MacOS X C Linker" superClass="cdt.managedbuild.tool.macosx.c.linker.macosx.base">
+                                                               <inputType id="cdt.managedbuild.tool.macosx.c.linker.input.1936915484" superClass="cdt.managedbuild.tool.macosx.c.linker.input">
+                                                                       <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+                                                                       <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+                                                               </inputType>
+                                                       </tool>
+                                                       <tool id="cdt.managedbuild.tool.macosx.cpp.linker.macosx.base.524764932" name="MacOS X C++ Linker" superClass="cdt.managedbuild.tool.macosx.cpp.linker.macosx.base"/>
+                                                       <tool id="cdt.managedbuild.tool.gnu.assembler.macosx.base.1871976203" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.macosx.base">
+                                                               <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1256561366" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+                                                       </tool>
+                                                       <tool id="cdt.managedbuild.tool.gnu.archiver.macosx.base.1171332498" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.macosx.base"/>
+                                                       <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.macosx.base.1658301018" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.macosx.base"/>
+                                                       <tool id="cdt.managedbuild.tool.gnu.c.compiler.macosx.base.1367873707" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.macosx.base">
+                                                               <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1402339125" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+                                                       </tool>
+                                               </toolChain>
+                                       </folderInfo>
+                                       <folderInfo id="cdt.managedbuild.toolchain.gnu.macosx.base.368006805.791362720" name="/" resourcePath="zoom">
+                                               <toolChain id="cdt.managedbuild.toolchain.gnu.macosx.base.474709397" name="cdt.managedbuild.toolchain.gnu.macosx.base" superClass="cdt.managedbuild.toolchain.gnu.macosx.base" unusedChildren="">
+                                                       <tool id="cdt.managedbuild.tool.macosx.c.linker.macosx.base.1024820357" name="MacOS X C Linker" superClass="cdt.managedbuild.tool.macosx.c.linker.macosx.base.1175453977"/>
+                                                       <tool id="cdt.managedbuild.tool.macosx.cpp.linker.macosx.base.1291126016" name="MacOS X C++ Linker" superClass="cdt.managedbuild.tool.macosx.cpp.linker.macosx.base.524764932"/>
+                                                       <tool id="cdt.managedbuild.tool.gnu.assembler.macosx.base.1716146569" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.macosx.base.1871976203">
+                                                               <inputType id="cdt.managedbuild.tool.gnu.assembler.input.2100292690" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+                                                       </tool>
+                                                       <tool id="cdt.managedbuild.tool.gnu.archiver.macosx.base.424756820" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.macosx.base.1171332498"/>
+                                                       <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.macosx.base.1371212607" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.macosx.base.1658301018"/>
+                                                       <tool id="cdt.managedbuild.tool.gnu.c.compiler.macosx.base.2071622157" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.macosx.base.1367873707">
+                                                               <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.986509299" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+                                                       </tool>
+                                               </toolChain>
+                                       </folderInfo>
+                                       <sourceEntries>
+                                               <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+                                               <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="util"/>
+                                               <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="client"/>
+                                               <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="include"/>
+                                               <entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="zoom"/>
+                                               <entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="test"/>
+                                       </sourceEntries>
+                               </configuration>
+                       </storageModule>
+                       <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+                       <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
+                       <storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
+                       <storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
+                       <storageModule moduleId="scannerConfiguration">
+                               <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+                               <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+                                       <buildOutputProvider>
+                                               <openAction enabled="true" filePath=""/>
+                                               <parser enabled="true"/>
+                                       </buildOutputProvider>
+                                       <scannerInfoProvider id="specsFile">
+                                               <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+                                               <parser enabled="true"/>
+                                       </scannerInfoProvider>
+                               </profile>
+                               <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+                                       <buildOutputProvider>
+                                               <openAction enabled="true" filePath=""/>
+                                               <parser enabled="true"/>
+                                       </buildOutputProvider>
+                                       <scannerInfoProvider id="makefileGenerator">
+                                               <runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+                                               <parser enabled="true"/>
+                                       </scannerInfoProvider>
+                               </profile>
+                               <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+                                       <buildOutputProvider>
+                                               <openAction enabled="true" filePath=""/>
+                                               <parser enabled="true"/>
+                                       </buildOutputProvider>
+                                       <scannerInfoProvider id="specsFile">
+                                               <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+                                               <parser enabled="true"/>
+                                       </scannerInfoProvider>
+                               </profile>
+                               <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+                                       <buildOutputProvider>
+                                               <openAction enabled="true" filePath=""/>
+                                               <parser enabled="true"/>
+                                       </buildOutputProvider>
+                                       <scannerInfoProvider id="specsFile">
+                                               <runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+                                               <parser enabled="true"/>
+                                       </scannerInfoProvider>
+                               </profile>
+                               <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+                                       <buildOutputProvider>
+                                               <openAction enabled="true" filePath=""/>
+                                               <parser enabled="true"/>
+                                       </buildOutputProvider>
+                                       <scannerInfoProvider id="specsFile">
+                                               <runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+                                               <parser enabled="true"/>
+                                       </scannerInfoProvider>
+                               </profile>
+                               <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+                                       <buildOutputProvider>
+                                               <openAction enabled="true" filePath=""/>
+                                               <parser enabled="true"/>
+                                       </buildOutputProvider>
+                                       <scannerInfoProvider id="specsFile">
+                                               <runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
+                                               <parser enabled="true"/>
+                                       </scannerInfoProvider>
+                               </profile>
+                               <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+                                       <buildOutputProvider>
+                                               <openAction enabled="true" filePath=""/>
+                                               <parser enabled="true"/>
+                                       </buildOutputProvider>
+                                       <scannerInfoProvider id="specsFile">
+                                               <runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
+                                               <parser enabled="true"/>
+                                       </scannerInfoProvider>
+                               </profile>
+                               <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+                                       <buildOutputProvider>
+                                               <openAction enabled="true" filePath=""/>
+                                               <parser enabled="true"/>
+                                       </buildOutputProvider>
+                                       <scannerInfoProvider id="specsFile">
+                                               <runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
+                                               <parser enabled="true"/>
+                                       </scannerInfoProvider>
+                               </profile>
+                               <scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.macosx.base.368006805;cdt.managedbuild.toolchain.gnu.macosx.base.368006805.791362720;cdt.managedbuild.tool.gnu.c.compiler.macosx.base.2071622157;cdt.managedbuild.tool.gnu.c.compiler.input.986509299">
+                                       <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+                                       <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+                                               <buildOutputProvider>
+                                                       <openAction enabled="true" filePath=""/>
+                                                       <parser enabled="true"/>
+                                               </buildOutputProvider>
+                                               <scannerInfoProvider id="specsFile">
+                                                       <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+                                                       <parser enabled="true"/>
+                                               </scannerInfoProvider>
+                                       </profile>
+                                       <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+                                               <buildOutputProvider>
+                                                       <openAction enabled="true" filePath=""/>
+                                                       <parser enabled="true"/>
+                                               </buildOutputProvider>
+                                               <scannerInfoProvider id="makefileGenerator">
+                                                       <runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+                                                       <parser enabled="true"/>
+                                               </scannerInfoProvider>
+                                       </profile>
+                                       <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+                                               <buildOutputProvider>
+                                                       <openAction enabled="true" filePath=""/>
+                                                       <parser enabled="true"/>
+                                               </buildOutputProvider>
+                                               <scannerInfoProvider id="specsFile">
+                                                       <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+                                                       <parser enabled="true"/>
+                                               </scannerInfoProvider>
+                                       </profile>
+                                       <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+                                               <buildOutputProvider>
+                                                       <openAction enabled="true" filePath=""/>
+                                                       <parser enabled="true"/>
+                                               </buildOutputProvider>
+                                               <scannerInfoProvider id="specsFile">
+                                                       <runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+                                                       <parser enabled="true"/>
+                                               </scannerInfoProvider>
+                                       </profile>
+                                       <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+                                               <buildOutputProvider>
+                                                       <openAction enabled="true" filePath=""/>
+                                                       <parser enabled="true"/>
+                                               </buildOutputProvider>
+                                               <scannerInfoProvider id="specsFile">
+                                                       <runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+                                                       <parser enabled="true"/>
+                                               </scannerInfoProvider>
+                                       </profile>
+                                       <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+                                               <buildOutputProvider>
+                                                       <openAction enabled="true" filePath=""/>
+                                                       <parser enabled="true"/>
+                                               </buildOutputProvider>
+                                               <scannerInfoProvider id="specsFile">
+                                                       <runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
+                                                       <parser enabled="true"/>
+                                               </scannerInfoProvider>
+                                       </profile>
+                                       <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+                                               <buildOutputProvider>
+                                                       <openAction enabled="true" filePath=""/>
+                                                       <parser enabled="true"/>
+                                               </buildOutputProvider>
+                                               <scannerInfoProvider id="specsFile">
+                                                       <runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
+                                                       <parser enabled="true"/>
+                                               </scannerInfoProvider>
+                                       </profile>
+                                       <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+                                               <buildOutputProvider>
+                                                       <openAction enabled="true" filePath=""/>
+                                                       <parser enabled="true"/>
+                                               </buildOutputProvider>
+                                               <scannerInfoProvider id="specsFile">
+                                                       <runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
+                                                       <parser enabled="true"/>
+                                               </scannerInfoProvider>
+                                       </profile>
+                               </scannerConfigBuildInfo>
+                               <scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.macosx.base.368006805;cdt.managedbuild.toolchain.gnu.macosx.base.368006805.791362720;cdt.managedbuild.tool.gnu.c.compiler.macosx.base.2071622157;cdt.managedbuild.tool.gnu.c.compiler.input.1402339125">
+                                       <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+                                       <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+                                               <buildOutputProvider>
+                                                       <openAction enabled="true" filePath=""/>
+                                                       <parser enabled="true"/>
+                                               </buildOutputProvider>
+                                               <scannerInfoProvider id="specsFile">
+                                                       <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+                                                       <parser enabled="true"/>
+                                               </scannerInfoProvider>
+                                       </profile>
+                                       <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+                                               <buildOutputProvider>
+                                                       <openAction enabled="true" filePath=""/>
+                                                       <parser enabled="true"/>
+                                               </buildOutputProvider>
+                                               <scannerInfoProvider id="makefileGenerator">
+                                                       <runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+                                                       <parser enabled="true"/>
+                                               </scannerInfoProvider>
+                                       </profile>
+                                       <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+                                               <buildOutputProvider>
+                                                       <openAction enabled="true" filePath=""/>
+                                                       <parser enabled="true"/>
+                                               </buildOutputProvider>
+                                               <scannerInfoProvider id="specsFile">
+                                                       <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+                                                       <parser enabled="true"/>
+                                               </scannerInfoProvider>
+                                       </profile>
+                                       <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+                                               <buildOutputProvider>
+                                                       <openAction enabled="true" filePath=""/>
+                                                       <parser enabled="true"/>
+                                               </buildOutputProvider>
+                                               <scannerInfoProvider id="specsFile">
+                                                       <runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+                                                       <parser enabled="true"/>
+                                               </scannerInfoProvider>
+                                       </profile>
+                                       <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+                                               <buildOutputProvider>
+                                                       <openAction enabled="true" filePath=""/>
+                                                       <parser enabled="true"/>
+                                               </buildOutputProvider>
+                                               <scannerInfoProvider id="specsFile">
+                                                       <runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+                                                       <parser enabled="true"/>
+                                               </scannerInfoProvider>
+                                       </profile>
+                                       <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+                                               <buildOutputProvider>
+                                                       <openAction enabled="true" filePath=""/>
+                                                       <parser enabled="true"/>
+                                               </buildOutputProvider>
+                                               <scannerInfoProvider id="specsFile">
+                                                       <runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
+                                                       <parser enabled="true"/>
+                                               </scannerInfoProvider>
+                                       </profile>
+                                       <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+                                               <buildOutputProvider>
+                                                       <openAction enabled="true" filePath=""/>
+                                                       <parser enabled="true"/>
+                                               </buildOutputProvider>
+                                               <scannerInfoProvider id="specsFile">
+                                                       <runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
+                                                       <parser enabled="true"/>
+                                               </scannerInfoProvider>
+                                       </profile>
+                                       <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+                                               <buildOutputProvider>
+                                                       <openAction enabled="true" filePath=""/>
+                                                       <parser enabled="true"/>
+                                               </buildOutputProvider>
+                                               <scannerInfoProvider id="specsFile">
+                                                       <runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
+                                                       <parser enabled="true"/>
+                                               </scannerInfoProvider>
+                                       </profile>
+                               </scannerConfigBuildInfo>
+                               <scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.macosx.base.368006805;cdt.managedbuild.toolchain.gnu.macosx.base.368006805.761048058;cdt.managedbuild.tool.gnu.c.compiler.macosx.base.1367873707;cdt.managedbuild.tool.gnu.c.compiler.input.1402339125">
+                                       <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+                                       <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+                                               <buildOutputProvider>
+                                                       <openAction enabled="true" filePath=""/>
+                                                       <parser enabled="true"/>
+                                               </buildOutputProvider>
+                                               <scannerInfoProvider id="specsFile">
+                                                       <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+                                                       <parser enabled="true"/>
+                                               </scannerInfoProvider>
+                                       </profile>
+                                       <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+                                               <buildOutputProvider>
+                                                       <openAction enabled="true" filePath=""/>
+                                                       <parser enabled="true"/>
+                                               </buildOutputProvider>
+                                               <scannerInfoProvider id="makefileGenerator">
+                                                       <runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+                                                       <parser enabled="true"/>
+                                               </scannerInfoProvider>
+                                       </profile>
+                                       <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+                                               <buildOutputProvider>
+                                                       <openAction enabled="true" filePath=""/>
+                                                       <parser enabled="true"/>
+                                               </buildOutputProvider>
+                                               <scannerInfoProvider id="specsFile">
+                                                       <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+                                                       <parser enabled="true"/>
+                                               </scannerInfoProvider>
+                                       </profile>
+                                       <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+                                               <buildOutputProvider>
+                                                       <openAction enabled="true" filePath=""/>
+                                                       <parser enabled="true"/>
+                                               </buildOutputProvider>
+                                               <scannerInfoProvider id="specsFile">
+                                                       <runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+                                                       <parser enabled="true"/>
+                                               </scannerInfoProvider>
+                                       </profile>
+                                       <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+                                               <buildOutputProvider>
+                                                       <openAction enabled="true" filePath=""/>
+                                                       <parser enabled="true"/>
+                                               </buildOutputProvider>
+                                               <scannerInfoProvider id="specsFile">
+                                                       <runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+                                                       <parser enabled="true"/>
+                                               </scannerInfoProvider>
+                                       </profile>
+                                       <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+                                               <buildOutputProvider>
+                                                       <openAction enabled="true" filePath=""/>
+                                                       <parser enabled="true"/>
+                                               </buildOutputProvider>
+                                               <scannerInfoProvider id="specsFile">
+                                                       <runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
+                                                       <parser enabled="true"/>
+                                               </scannerInfoProvider>
+                                       </profile>
+                                       <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+                                               <buildOutputProvider>
+                                                       <openAction enabled="true" filePath=""/>
+                                                       <parser enabled="true"/>
+                                               </buildOutputProvider>
+                                               <scannerInfoProvider id="specsFile">
+                                                       <runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
+                                                       <parser enabled="true"/>
+                                               </scannerInfoProvider>
+                                       </profile>
+                                       <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+                                               <buildOutputProvider>
+                                                       <openAction enabled="true" filePath=""/>
+                                                       <parser enabled="true"/>
+                                               </buildOutputProvider>
+                                               <scannerInfoProvider id="specsFile">
+                                                       <runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
+                                                       <parser enabled="true"/>
+                                               </scannerInfoProvider>
+                                       </profile>
+                               </scannerConfigBuildInfo>
+                       </storageModule>
+               </cconfiguration>
+       </storageModule>
+       <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+               <project id="yaz.null.1422187919" name="yaz"/>
+       </storageModule>
 </cproject>
index 4d11922..2453ab0 100644 (file)
@@ -69,6 +69,8 @@ YAZ_EXPORT void yaz_marc_xml(yaz_marc_t mt, int xmlmode);
 #define YAZ_MARC_XCHANGE   5
 /** \brief Output format: check only (no marc output) */
 #define YAZ_MARC_CHECK  6
+/** \brief Output format: Turbo MARCXML Index Data format*/
+#define YAZ_MARC_TMARCXML   7
 
 /** \brief set iconv handle for character set conversion */
 YAZ_EXPORT void yaz_marc_iconv(yaz_marc_t mt, yaz_iconv_t cd);
index b755c2e..3f3e05b 100644 (file)
@@ -90,6 +90,82 @@ int yaz_marc_read_xml_subfields(yaz_marc_t mt, const xmlNode *ptr)
     return 0;
 }
 
+const char *tag_value_extract(const char *name, char tag_buffer[5]) {
+       size_t length = strlen(name);
+       if (length == 3) {
+               strcpy(tag_buffer, name);
+               return tag_buffer;
+       }
+       return 0;
+}
+
+// Given a xmlNode ptr,  extract a value from either a element name or from a given attribute
+const char *element_attribute_value_extract(const xmlNode *ptr, const char *attribute_name, NMEM nmem) {
+
+       const char *name = ptr->name;
+       size_t length = strlen(name);
+       if (length > 1 ) {
+               return nmem_strdup(nmem, name+1);
+       }
+       // TODO Extract from attribute where matches attribute_name
+       xmlAttr *attr;
+    for (attr = ptr->properties; attr; attr = attr->next)
+        if (!strcmp((const char *)attr->name, attribute_name)) {
+               return nmem_text_node_cdata(attr->children, nmem);
+        }
+       return 0;
+}
+
+
+int yaz_marc_read_turbo_xml_subfields(yaz_marc_t mt, const xmlNode *ptr)
+{
+    NMEM nmem = yaz_marc_get_nmem(mt);
+    for (; ptr; ptr = ptr->next)
+    {
+        if (ptr->type == XML_ELEMENT_NODE)
+        {
+               xmlNode *p;
+            if (!strncmp((const char *) ptr->name, "s", 1))
+            {
+                       NMEM nmem = yaz_marc_get_nmem(mt);
+                       char *buffer = (char *) nmem_malloc(nmem, 5);
+                               const char *tag_value = element_attribute_value_extract(ptr, "code", nmem);
+                if (!tag_value)
+                {
+                    yaz_marc_cprintf(
+                        mt, "Missing 'code' value for 'subfield'" );
+                    return -1;
+                }
+
+               size_t ctrl_data_len = 0;
+                char *ctrl_data_buf = 0;
+                               ctrl_data_len = strlen((const char *) tag_value);
+                               // Extract (length) from CDATA
+                               xmlNode *p;
+                               for (p = ptr->children; p ; p = p->next)
+                    if (p->type == XML_TEXT_NODE)
+                        ctrl_data_len += strlen((const char *)p->content);
+                               // Allocate memory for code value (1 character (can be multi-byte) and data
+                ctrl_data_buf = (char *) nmem_malloc(nmem, ctrl_data_len+1);
+                // Build a string with "<Code><data>"
+                strcpy(ctrl_data_buf, (const char *) tag_value);
+                for (p = ptr->children; p ; p = p->next)
+                    if (p->type == XML_TEXT_NODE)
+                        strcat(ctrl_data_buf, (const char *)p->content);
+                yaz_marc_add_subfield(mt, ctrl_data_buf, ctrl_data_len);
+            }
+            else
+            {
+                yaz_marc_cprintf(
+                    mt, "Expected element 'subfield', got '%.80s'", ptr->name);
+                return -1;
+            }
+        }
+    }
+    return 0;
+}
+
+
 static int yaz_marc_read_xml_leader(yaz_marc_t mt, const xmlNode **ptr_p)
 {
     int indicator_length;
@@ -104,7 +180,8 @@ static int yaz_marc_read_xml_leader(yaz_marc_t mt, const xmlNode **ptr_p)
     for(; ptr; ptr = ptr->next)
         if (ptr->type == XML_ELEMENT_NODE)
         {
-            if (!strcmp((const char *) ptr->name, "leader"))
+               if ( !strcmp( (const char *) ptr->name, "leader") ||
+                       (!strncmp((const char *) ptr->name, "l", 1) ))
             {
                 xmlNode *p = ptr->children;
                 for(; p; p = p->next)
@@ -145,7 +222,7 @@ static int yaz_marc_read_xml_fields(yaz_marc_t mt, const xmlNode *ptr)
     for(; ptr; ptr = ptr->next)
         if (ptr->type == XML_ELEMENT_NODE)
         {
-            if (!strcmp((const char *) ptr->name, "controlfield"))
+               if (!strcmp( (const char *) ptr->name, "controlfield"))
             {
                 const xmlNode *ptr_tag = 0;
                 struct _xmlAttr *attr;
@@ -215,6 +292,75 @@ static int yaz_marc_read_xml_fields(yaz_marc_t mt, const xmlNode *ptr)
         }
     return 0;
 }
+
+void yaz_marc_add_datafield_turbo_xml(yaz_marc_t mt, char *tag_value, char *indicators);
+
+static int yaz_marc_read_turbo_xml_fields(yaz_marc_t mt, const xmlNode *ptr)
+{
+    for(; ptr; ptr = ptr->next)
+        if (ptr->type == XML_ELEMENT_NODE)
+        {
+               if (!strncmp( (const char *) ptr->name, "c", 1))
+            {
+                       NMEM nmem = yaz_marc_get_nmem(mt);
+                       const char *tag_value = element_attribute_value_extract(ptr, "tag", nmem);
+                if (!tag_value)
+                {
+                    yaz_marc_cprintf(
+                        mt, "Missing attribute 'tag' for 'controlfield'" );
+                    return -1;
+                }
+                yaz_marc_add_controlfield_turbo_xml(mt, tag_value, ptr->children);
+            }
+            else if (!strncmp((const char *) ptr->name, "d",1))
+            {
+                struct _xmlAttr *attr;
+                       NMEM nmem = yaz_marc_get_nmem(mt);
+                char *indstr = nmem_malloc(nmem, 11);  /* 0(unused), 1,....9, + zero term */
+                int index = 0;
+                for (index = 0; index < 11; index++)
+                                       indstr[index] = '\0';
+                       const char *tag_value = element_attribute_value_extract(ptr, "tag", nmem);
+                if (!tag_value)
+                               {
+                    yaz_marc_cprintf(
+                        mt, "Missing attribute 'tag' for 'datafield'" );
+                    return -1;
+                }
+                for (attr = ptr->properties; attr; attr = attr->next)
+                    if (strlen((const char *)attr->name) == 2 &&
+                             attr->name[0] == 'i')
+                    {
+                       //extract indicator attribute from i#="Y" pattern
+                        int no = atoi((const char *)attr->name+1);
+                        if (attr->children
+                            && attr->children->type == XML_TEXT_NODE)
+                            indstr[no] = attr->children->content[0];
+                    }
+                    else
+                    {
+                        yaz_marc_cprintf(
+                            mt, "Bad attribute '%.80s' for 'datafield'",
+                            attr->name);
+                    }
+                /* note that indstr[0] is unused so we use indstr[1..] */
+                yaz_marc_add_datafield_turbo_xml(mt, tag_value, indstr+1);
+                int rc = yaz_marc_read_turbo_xml_subfields(mt, ptr->children /*, indstr */);
+                if (rc)
+                    return -1;
+            }
+            else
+            {
+                yaz_marc_cprintf(mt,
+                                 "Expected element controlfield or datafield,"
+                                 " got %.80s", ptr->name);
+                return -1;
+            }
+        }
+    return 0;
+}
+
+
 #endif
 
 #if YAZ_HAVE_XML2
@@ -225,9 +371,15 @@ int yaz_marc_read_xml(yaz_marc_t mt, const xmlNode *ptr)
     for(; ptr; ptr = ptr->next)
         if (ptr->type == XML_ELEMENT_NODE)
         {
-            if (!strcmp((const char *) ptr->name, "record"))
+                       //TODO Should actually look at the namespace but...
+            if (!strcmp((const char *) ptr->name, "record")) {
+               yaz_marc_set_read_format(mt, YAZ_MARC_MARCXML);
                 break;
-            else
+            }
+            else if (!strcmp((const char *) ptr->name, "r")) {
+               yaz_marc_set_read_format(mt, YAZ_MARC_TMARCXML);
+                break;
+            }
             {
                 yaz_marc_cprintf(
                     mt, "Unknown element '%.80s' in MARC XML reader",
@@ -244,7 +396,14 @@ int yaz_marc_read_xml(yaz_marc_t mt, const xmlNode *ptr)
     ptr = ptr->children;
     if (yaz_marc_read_xml_leader(mt, &ptr))
         return -1;
-    return yaz_marc_read_xml_fields(mt, ptr->next);
+
+    switch (yaz_marc_get_read_format(mt)) {
+               case YAZ_MARC_MARCXML:
+                       return yaz_marc_read_xml_fields(mt, ptr->next);
+               case YAZ_MARC_TMARCXML:
+                       return yaz_marc_read_turbo_xml_fields(mt, ptr->next);
+    }
+       return -1;
 }
 #endif
 
index 8f3ebc0..5cda038 100644 (file)
@@ -87,7 +87,8 @@ struct yaz_marc_subfield {
 struct yaz_marc_t_ {
     WRBUF m_wr;
     NMEM nmem;
-    int xml;
+    int input_format;
+    int output_format;
     int debug;
     int write_using_libxml2;
     enum yaz_collection_state enable_collection;
@@ -103,7 +104,7 @@ struct yaz_marc_t_ {
 yaz_marc_t yaz_marc_create(void)
 {
     yaz_marc_t mt = (yaz_marc_t) xmalloc(sizeof(*mt));
-    mt->xml = YAZ_MARC_LINE;
+    mt->output_format = YAZ_MARC_LINE;
     mt->debug = 0;
     mt->write_using_libxml2 = 0;
     mt->enable_collection = no_collection;
@@ -161,6 +162,16 @@ void yaz_marc_add_controlfield_xml(yaz_marc_t mt, const xmlNode *ptr_tag,
     n->u.controlfield.tag = nmem_text_node_cdata(ptr_tag, mt->nmem);
     n->u.controlfield.data = nmem_text_node_cdata(ptr_data, mt->nmem);
 }
+
+void yaz_marc_add_controlfield_turbo_xml(yaz_marc_t mt, char *tag,
+                                   const xmlNode *ptr_data)
+{
+    struct yaz_marc_node *n = yaz_marc_add_node(mt);
+    n->which = YAZ_MARC_CONTROLFIELD;
+    n->u.controlfield.tag = tag;
+    n->u.controlfield.data = nmem_text_node_cdata(ptr_data, mt->nmem);
+}
+
 #endif
 
 
@@ -230,6 +241,36 @@ void yaz_marc_add_datafield(yaz_marc_t mt, const char *tag,
     mt->subfield_pp = &n->u.datafield.subfields;
 }
 
+// Magic function: adds a attribute value to the element name if it is plain characters.
+// if not, and if the attribute name is not null, it will append a attribute element with the value
+// if attribute name is null it will return a non-zero value meaning it couldnt handle the value.
+
+int element_name_append_attribute_value(yaz_marc_t mt, WRBUF buffer, const char *attribute_name, char *code_data, size_t code_len) {
+       // TODO Map special codes to something possible for XML ELEMENT names
+
+       int encode = 0;
+       int index = 0;
+       for (index = 0; index < code_len; index++) {
+               if (!((code_data[index] >= '0' && code_data[index] <= '9') ||
+                         (code_data[index] >= 'a' && code_data[index] <= 'z') ||
+                         (code_data[index] >= 'A' && code_data[index] <= 'Z')))
+                       encode = 1;
+       }
+       int success = 0;
+       // Add as attribute
+       if (encode && attribute_name)
+               wrbuf_printf(buffer, " %s=\"", attribute_name);
+
+       if (!encode || attribute_name)
+               wrbuf_iconv_write_cdata(buffer, mt->iconv_cd, code_data, code_len);
+       else
+               success = -1;
+
+       if (encode && attribute_name)
+               wrbuf_printf(buffer, "\"");     // return error if we couldn't handle it.
+       return success;
+}
+
 #if YAZ_HAVE_XML2
 void yaz_marc_add_datafield_xml(yaz_marc_t mt, const xmlNode *ptr_tag,
                                 const char *indicator, size_t indicator_len)
@@ -244,6 +285,24 @@ void yaz_marc_add_datafield_xml(yaz_marc_t mt, const xmlNode *ptr_tag,
     /* make subfield_pp the current (last one) */
     mt->subfield_pp = &n->u.datafield.subfields;
 }
+
+void yaz_marc_add_datafield_turbo_xml(yaz_marc_t mt, char *tag_value, char *indicators)
+{
+    struct yaz_marc_node *n = yaz_marc_add_node(mt);
+    n->which = YAZ_MARC_DATAFIELD;
+    n->u.datafield.tag = tag_value;
+    n->u.datafield.indicator = indicators;
+    n->u.datafield.subfields = 0;
+
+    // make subfield_pp the current (last one)
+    mt->subfield_pp = &n->u.datafield.subfields;
+}
+
+void yaz_marc_datafield_set_indicators(struct yaz_marc_node *n, char *indicator)
+{
+    n->u.datafield.indicator = indicator;
+}
+
 #endif
 
 void yaz_marc_add_subfield(yaz_marc_t mt,
@@ -503,9 +562,10 @@ int yaz_marc_write_trailer(yaz_marc_t mt, WRBUF wr)
 {
     if (mt->enable_collection == collection_second)
     {
-        switch(mt->xml)
+        switch(mt->output_format)
         {
         case YAZ_MARC_MARCXML:
+        case YAZ_MARC_TMARCXML:
             wrbuf_printf(wr, "</collection>\n");
             break;
         case YAZ_MARC_XCHANGE:
@@ -523,11 +583,12 @@ void yaz_marc_enable_collection(yaz_marc_t mt)
 
 int yaz_marc_write_mode(yaz_marc_t mt, WRBUF wr)
 {
-    switch(mt->xml)
+    switch(mt->output_format)
     {
     case YAZ_MARC_LINE:
         return yaz_marc_write_line(mt, wr);
     case YAZ_MARC_MARCXML:
+    case YAZ_MARC_TMARCXML:
         return yaz_marc_write_marcxml(mt, wr);
     case YAZ_MARC_XCHANGE:
         return yaz_marc_write_marcxchange(mt, wr, 0, 0); /* no format, type */
@@ -539,6 +600,15 @@ int yaz_marc_write_mode(yaz_marc_t mt, WRBUF wr)
     return -1;
 }
 
+const char *collection_name[2]  = { "collection", "collection"};
+const char *record_name[2]     = { "record", "r"};
+const char *leader_name[2]     = { "leader", "l"};
+const char *controlfield_name[2]= { "controlfield", "c"};
+const char *datafield_name[2]          = { "datafield", "d"};
+const char *indicator_name[2]          = { "ind", "i"};
+const char *subfield_name[2]   = { "subfield", "s"};
+
+
 /** \brief common MARC XML/Xchange writer
     \param mt handle
     \param wr WRBUF output
@@ -555,6 +625,145 @@ static int yaz_marc_write_marcxml_ns1(yaz_marc_t mt, WRBUF wr,
     int identifier_length;
     const char *leader = 0;
 
+    int turbo = yaz_marc_get_write_format(mt) == YAZ_MARC_TMARCXML;
+
+    for (n = mt->nodes; n; n = n->next)
+        if (n->which == YAZ_MARC_LEADER)
+        {
+            leader = n->u.leader;
+            break;
+        }
+    
+    if (!leader)
+        return -1;
+    if (!atoi_n_check(leader+11, 1, &identifier_length))
+        return -1;
+    
+    if (mt->enable_collection != no_collection)
+    {
+        if (mt->enable_collection == collection_first) {
+            wrbuf_printf(wr, "<%s xmlns=\"%s\">\n", collection_name[turbo], ns);
+            mt->enable_collection = collection_second;
+        }
+        wrbuf_printf(wr, "<%s", record_name[turbo]);
+    }
+    else
+    {
+        wrbuf_printf(wr, "<%s xmlns=\"%s\"", record_name[turbo], ns);
+    }
+    if (format)
+        wrbuf_printf(wr, " format=\"%.80s\"", format);
+    if (type)
+        wrbuf_printf(wr, " type=\"%.80s\"", type);
+    wrbuf_printf(wr, ">\n");
+    for (n = mt->nodes; n; n = n->next)
+    {
+        struct yaz_marc_subfield *s;
+
+        switch(n->which)
+        {
+        case YAZ_MARC_DATAFIELD:
+
+               wrbuf_printf(wr, "  <%s", datafield_name[turbo]);
+            if (!turbo)
+               wrbuf_printf(wr, " tag=\"");
+            wrbuf_iconv_write_cdata(wr, mt->iconv_cd, n->u.datafield.tag,
+                                    strlen(n->u.datafield.tag));
+               if (!turbo)
+                       wrbuf_printf(wr, "\"");
+           if (n->u.datafield.indicator)
+           {
+               int i;
+               for (i = 0; n->u.datafield.indicator[i]; i++)
+               {
+                       wrbuf_printf(wr, " %s%d=\"", indicator_name[turbo], i+1);
+                       wrbuf_iconv_write_cdata(wr, mt->iconv_cd,
+                                       n->u.datafield.indicator+i, 1);
+                       wrbuf_iconv_puts(wr, mt->iconv_cd, "\"");
+                               }
+            }
+               wrbuf_printf(wr, ">\n");
+            for (s = n->u.datafield.subfields; s; s = s->next)
+            {
+                size_t using_code_len = get_subfield_len(mt, s->code_data,
+                                                         identifier_length);
+                wrbuf_printf(wr, "    <%s", subfield_name[turbo]);
+                               if (!turbo) {
+                                       wrbuf_printf(wr, " code=\"");
+                       wrbuf_iconv_write_cdata(wr, mt->iconv_cd,
+                                        s->code_data, using_code_len);
+                       wrbuf_iconv_puts(wr, mt->iconv_cd, "\">");
+                               } else {
+                                       element_name_append_attribute_value(mt, wr, "code", s->code_data, using_code_len);
+                                       wrbuf_puts(wr, ">");
+                               }
+                wrbuf_iconv_write_cdata(wr, mt->iconv_cd,
+                                        s->code_data + using_code_len,
+                                        strlen(s->code_data + using_code_len));
+                marc_iconv_reset(mt, wr);
+                               wrbuf_printf(wr, "</%s", subfield_name[turbo]);
+                               if (turbo)
+                               element_name_append_attribute_value(mt, wr, 0, s->code_data, using_code_len);
+                wrbuf_puts(wr, ">\n");
+            }
+            wrbuf_printf(wr, "  </%s", datafield_name[turbo]);
+               //TODO Not CDATA
+            if (turbo)
+               wrbuf_iconv_write_cdata(wr, mt->iconv_cd, n->u.datafield.tag,
+                               strlen(n->u.datafield.tag));
+            wrbuf_printf(wr, ">\n", datafield_name[turbo]);
+            break;
+        case YAZ_MARC_CONTROLFIELD:
+               wrbuf_printf(wr, "  <%s", controlfield_name[turbo]);
+               if (!turbo) {
+               wrbuf_printf(wr, " tag=\"");
+                       wrbuf_iconv_write_cdata(wr, mt->iconv_cd, n->u.controlfield.tag,
+                                       strlen(n->u.controlfield.tag));
+                       wrbuf_iconv_puts(wr, mt->iconv_cd, "\">");
+               }
+               else {
+                       //TODO convert special
+                       wrbuf_iconv_write_cdata(wr, mt->iconv_cd, n->u.controlfield.tag,
+                                       strlen(n->u.controlfield.tag));
+                       wrbuf_iconv_puts(wr, mt->iconv_cd, ">");
+               }
+               wrbuf_iconv_write_cdata(wr, mt->iconv_cd,
+                                                                       n->u.controlfield.data,
+                                                                       strlen(n->u.controlfield.data));
+               marc_iconv_reset(mt, wr);
+               wrbuf_printf(wr, "</%s", controlfield_name[turbo]);
+               //TODO convert special
+               if (turbo)
+                       wrbuf_iconv_write_cdata(wr, mt->iconv_cd, n->u.controlfield.tag,
+                                       strlen(n->u.controlfield.tag));
+               wrbuf_puts(wr, ">\n");
+            break;
+        case YAZ_MARC_COMMENT:
+            wrbuf_printf(wr, "<!-- ");
+            wrbuf_puts(wr, n->u.comment);
+            wrbuf_printf(wr, " -->\n");
+            break;
+        case YAZ_MARC_LEADER:
+               wrbuf_printf(wr, "  <%s>", leader_name[turbo]);
+               wrbuf_iconv_write_cdata(wr,
+                                    0 , /* no charset conversion for leader */
+                                    n->u.leader, strlen(n->u.leader));
+            wrbuf_printf(wr, "</%s>\n", leader_name[turbo]);
+        }
+    }
+    wrbuf_printf(wr, "</%s>\n", record_name[turbo]);
+    return 0;
+}
+
+static int yaz_marc_write_marcxml_ns2(yaz_marc_t mt, WRBUF wr,
+                                      const char *ns, 
+                                      const char *format,
+                                      const char *type)
+{
+    struct yaz_marc_node *n;
+    int identifier_length;
+    const char *leader = 0;
+
     for (n = mt->nodes; n; n = n->next)
         if (n->which == YAZ_MARC_LEADER)
         {
@@ -653,6 +862,7 @@ static int yaz_marc_write_marcxml_ns1(yaz_marc_t mt, WRBUF wr,
     return 0;
 }
 
+
 static int yaz_marc_write_marcxml_ns(yaz_marc_t mt, WRBUF wr,
                                      const char *ns, 
                                      const char *format,
@@ -664,7 +874,10 @@ static int yaz_marc_write_marcxml_ns(yaz_marc_t mt, WRBUF wr,
         int ret;
         xmlNode *root_ptr;
 
-        ret = yaz_marc_write_xml(mt, &root_ptr, ns, format, type);
+        if (yaz_marc_get_write_format(mt) == YAZ_MARC_MARCXML)
+               ret = yaz_marc_write_xml(mt, &root_ptr, ns, format, type);
+        else // Check for Turbo XML
+               ret = yaz_marc_write_turbo_xml(mt, &root_ptr, ns, format, type);
         if (ret == 0)
         {
             xmlChar *buf_out;
@@ -694,7 +907,10 @@ int yaz_marc_write_marcxml(yaz_marc_t mt, WRBUF wr)
     /* http://www.loc.gov/marc/bibliographic/ecbdldrd.html#mrcblea */
     if (!mt->leader_spec)
         yaz_marc_modify_leader(mt, 9, "a");
-    return yaz_marc_write_marcxml_ns(mt, wr, "http://www.loc.gov/MARC21/slim",
+    char *name_space = "http://www.loc.gov/MARC21/slim";
+    if (mt->output_format == YAZ_MARC_TMARCXML)
+       name_space = "http://www.indexdata.com/MARC21/turboxml";
+    return yaz_marc_write_marcxml_ns(mt, wr, name_space,
                                      0, 0);
 }
 
@@ -707,8 +923,166 @@ int yaz_marc_write_marcxchange(yaz_marc_t mt, WRBUF wr,
                                      0, 0);
 }
 
-
 #if YAZ_HAVE_XML2
+
+void add_marc_datafield_turbo_xml(yaz_marc_t mt, struct yaz_marc_node *n, xmlNode *record_ptr, xmlNsPtr ns_record, WRBUF wr_cdata, int identifier_length)
+{
+    xmlNode *ptr;
+    struct yaz_marc_subfield *s;
+    int turbo = mt->output_format == YAZ_MARC_TMARCXML;
+    if (!turbo) {
+        ptr = xmlNewChild(record_ptr, ns_record, BAD_CAST "datafield", 0);
+        xmlNewProp(ptr, BAD_CAST "tag", BAD_CAST n->u.datafield.tag);
+    }
+    else {
+        //TODO consider if safe
+       char field[10];
+       field[0] = 'd';
+        strncpy(field + 1, n->u.datafield.tag, 3);
+        field[4] = '\0';
+        ptr = xmlNewChild(record_ptr, ns_record, BAD_CAST field, 0);
+    }
+    if (n->u.datafield.indicator)
+    {
+        int i;
+        for (i = 0; n->u.datafield.indicator[i]; i++)
+        {
+            char ind_str[6];
+            char ind_val[2];
+            
+            ind_val[0] = n->u.datafield.indicator[i];
+            ind_val[1] = '\0';
+            sprintf(ind_str, "%s%d", indicator_name[turbo], i+1);
+                       xmlNewProp(ptr, BAD_CAST ind_str, BAD_CAST ind_val);
+        }
+    }
+       WRBUF subfield_name = wrbuf_alloc();
+    for (s = n->u.datafield.subfields; s; s = s->next)
+    {
+        xmlNode *ptr_subfield;
+        size_t using_code_len = get_subfield_len(mt, s->code_data,
+                                                 identifier_length);
+        wrbuf_rewind(wr_cdata);
+        wrbuf_iconv_puts(wr_cdata, mt->iconv_cd, s->code_data + using_code_len);
+        marc_iconv_reset(mt, wr_cdata);
+        
+        if (!turbo) {
+               ptr_subfield = xmlNewTextChild(
+                               ptr, ns_record,
+                               BAD_CAST "subfield",  BAD_CAST wrbuf_cstr(wr_cdata));
+               // Generate code attribute value and add
+               wrbuf_rewind(wr_cdata);
+               wrbuf_iconv_write(wr_cdata, mt->iconv_cd,s->code_data, using_code_len);
+               xmlNewProp(ptr_subfield, BAD_CAST "code",
+                               BAD_CAST wrbuf_cstr(wr_cdata));
+        }
+        else { // Turbo format
+               wrbuf_rewind(subfield_name);
+               wrbuf_puts(subfield_name, "s");
+               int not_written = element_name_append_attribute_value(mt, subfield_name, 0, s->code_data, using_code_len) != 0;
+               ptr_subfield = xmlNewTextChild(ptr, ns_record,
+                               BAD_CAST wrbuf_cstr(subfield_name),
+                               BAD_CAST wrbuf_cstr(wr_cdata));
+               if (not_written) {
+               // Generate code attribute value and add
+               wrbuf_rewind(wr_cdata);
+                       wrbuf_iconv_write(wr_cdata, mt->iconv_cd,s->code_data, using_code_len);
+                       xmlNewProp(ptr_subfield, BAD_CAST "code",  BAD_CAST wrbuf_cstr(wr_cdata));
+               }
+        }
+    }
+       wrbuf_destroy(subfield_name);
+}
+
+int yaz_marc_write_turbo_xml(yaz_marc_t mt, xmlNode **root_ptr,
+                       const char *ns, 
+                       const char *format,
+                       const char *type)
+{
+    struct yaz_marc_node *n;
+    int identifier_length;
+    const char *leader = 0;
+    xmlNode *record_ptr;
+    xmlNsPtr ns_record;
+    WRBUF wr_cdata = 0;
+    int turbo = mt->output_format == YAZ_MARC_TMARCXML;
+    for (n = mt->nodes; n; n = n->next)
+        if (n->which == YAZ_MARC_LEADER)
+        {
+            leader = n->u.leader;
+            break;
+        }
+    
+    if (!leader)
+        return -1;
+    if (!atoi_n_check(leader+11, 1, &identifier_length))
+        return -1;
+
+    wr_cdata = wrbuf_alloc();
+
+    record_ptr = xmlNewNode(0, BAD_CAST "r");
+    *root_ptr = record_ptr;
+
+    ns_record = xmlNewNs(record_ptr, BAD_CAST ns, 0);
+    xmlSetNs(record_ptr, ns_record);
+
+    if (format)
+        xmlNewProp(record_ptr, BAD_CAST "format", BAD_CAST format);
+    if (type)
+        xmlNewProp(record_ptr, BAD_CAST "type", BAD_CAST type);
+    for (n = mt->nodes; n; n = n->next)
+    {
+        struct yaz_marc_subfield *s;
+        xmlNode *ptr;
+
+        switch(n->which)
+        {
+        case YAZ_MARC_DATAFIELD:
+               add_marc_datafield_turbo_xml(mt, n, record_ptr, ns_record, wr_cdata, identifier_length);
+            break;
+        case YAZ_MARC_CONTROLFIELD:
+            wrbuf_rewind(wr_cdata);
+            wrbuf_iconv_puts(wr_cdata, mt->iconv_cd, n->u.controlfield.data);
+            marc_iconv_reset(mt, wr_cdata);
+            
+            if (!turbo) {
+                               ptr = xmlNewTextChild(record_ptr, ns_record,
+                                                                         BAD_CAST "controlfield",
+                                                                         BAD_CAST wrbuf_cstr(wr_cdata));
+                               xmlNewProp(ptr, BAD_CAST "tag", BAD_CAST n->u.controlfield.tag);
+            }
+            else {
+               // TODO required iconv?
+               char field[10];
+                               field[0] = 'c';
+                strncpy(field + 1, n->u.controlfield.tag, 3);
+                field[4] = '\0';
+                ptr = xmlNewTextChild(record_ptr, ns_record,
+                                                                         BAD_CAST field,
+                                                                         BAD_CAST wrbuf_cstr(wr_cdata));
+            }
+
+            break;
+        case YAZ_MARC_COMMENT:
+            ptr = xmlNewComment(BAD_CAST n->u.comment);
+            xmlAddChild(record_ptr, ptr);
+            break;
+        case YAZ_MARC_LEADER:
+                       {
+                               char *field = "leader";
+                               if (turbo)
+                                       field = "l";
+                               xmlNewTextChild(record_ptr, ns_record, BAD_CAST field,
+                                                               BAD_CAST n->u.leader);
+                       }
+            break;
+        }
+    }
+    wrbuf_destroy(wr_cdata);
+    return 0;
+}
+
+
 int yaz_marc_write_xml(yaz_marc_t mt, xmlNode **root_ptr,
                        const char *ns, 
                        const char *format,
@@ -779,7 +1153,7 @@ int yaz_marc_write_xml(yaz_marc_t mt, xmlNode **root_ptr,
                                  s->code_data + using_code_len);
                 marc_iconv_reset(mt, wr_cdata);
                 ptr_subfield = xmlNewTextChild(
-                    ptr, ns_record, 
+                    ptr, ns_record,
                     BAD_CAST "subfield",  BAD_CAST wrbuf_cstr(wr_cdata));
 
                 wrbuf_rewind(wr_cdata);
@@ -813,6 +1187,10 @@ int yaz_marc_write_xml(yaz_marc_t mt, xmlNode **root_ptr,
     wrbuf_destroy(wr_cdata);
     return 0;
 }
+
+
+
+
 #endif
 
 int yaz_marc_write_iso2709(yaz_marc_t mt, WRBUF wr)
@@ -974,12 +1352,45 @@ int yaz_marc_decode_buf (yaz_marc_t mt, const char *buf, int bsize,
     return r;
 }
 
-void yaz_marc_xml(yaz_marc_t mt, int xmlmode)
+void yaz_marc_set_read_format(yaz_marc_t mt, int format)
 {
     if (mt)
-        mt->xml = xmlmode;
+        mt->input_format = format;
 }
 
+int yaz_marc_get_read_format(yaz_marc_t mt)
+{
+    if (mt)
+        return mt->input_format;
+    return -1;
+}
+
+
+void yaz_marc_set_write_format(yaz_marc_t mt, int format)
+{
+    if (mt) {
+        mt->output_format = format;
+    }
+}
+
+int yaz_marc_get_write_format(yaz_marc_t mt)
+{
+    if (mt)
+        return mt->output_format;
+    return -1;
+}
+
+
+/**
+ * Deprecated, use yaz_marc_set_write_format
+ */
+void yaz_marc_xml(yaz_marc_t mt, int xmlmode)
+{
+       yaz_marc_set_write_format(mt, xmlmode);
+}
+
+
+
 void yaz_marc_debug(yaz_marc_t mt, int level)
 {
     if (mt)
@@ -1073,6 +1484,8 @@ int yaz_marc_decode_formatstr(const char *arg)
         mode = YAZ_MARC_ISO2709;
     if (!strcmp(arg, "marcxml"))
         mode = YAZ_MARC_MARCXML;
+    if (!strcmp(arg, "tmarcxml"))
+        mode = YAZ_MARC_TMARCXML;
     if (!strcmp(arg, "marcxchange"))
         mode = YAZ_MARC_XCHANGE;
     if (!strcmp(arg, "line"))
@@ -1085,6 +1498,12 @@ void yaz_marc_write_using_libxml2(yaz_marc_t mt, int enable)
     mt->write_using_libxml2 = enable;
 }
 
+int yaz_marc_is_turbo_format(yaz_marc_t mt)
+{
+    return mt->output_format == YAZ_MARC_TMARCXML;
+}
+
+
 /*
  * Local variables:
  * c-basic-offset: 4
index 6f65797..b3ec821 100644 (file)
@@ -304,6 +304,12 @@ static int conv_marc(yaz_record_conv_t p, const xmlNode *ptr)
         if (input_charset && !output_charset)
             output_charset = "utf-8";
     }
+    else if (!strcmp(output_format, "tmarcxml"))
+    {
+        output_format_mode = YAZ_MARC_TMARCXML;
+        if (input_charset && !output_charset)
+            output_charset = "utf-8";
+    }
     else if (!strcmp(output_format, "marc"))
     {
         output_format_mode = YAZ_MARC_ISO2709;
@@ -472,7 +478,8 @@ static int yaz_record_conv_record_rule(yaz_record_conv_t p,
                 else
                     ret = -1;
             }
-            else if (r->u.marc.input_format == YAZ_MARC_MARCXML)
+            else if (r->u.marc.input_format == YAZ_MARC_MARCXML ||
+                                        r->u.marc.input_format == YAZ_MARC_TMARCXML)
             {
                 xmlDocPtr doc = xmlParseMemory(wrbuf_buf(record),
                                                wrbuf_len(record));
@@ -483,7 +490,7 @@ static int yaz_record_conv_record_rule(yaz_record_conv_t p,
                 }
                 else
                 {
-                    ret = yaz_marc_read_xml(mt, xmlDocGetRootElement(doc));
+                                       ret = yaz_marc_read_xml(mt, xmlDocGetRootElement(doc));
                     if (ret)
                         wrbuf_printf(p->wr_error, "yaz_marc_read_xml failed");
                 }
index 4a208b3..44a5646 100644 (file)
@@ -2196,6 +2196,11 @@ ZOOM_API(const char *)
         return get_record_format(rec, len, npr, YAZ_MARC_MARCXML, charset,
                                  format);
     }
+    else if (!strcmp(type, "txml"))
+    {
+        return get_record_format(rec, len, npr, YAZ_MARC_TMARCXML, charset,
+                                 format);
+    }
     else if (!strcmp(type, "raw"))
     {
         return get_record_format(rec, len, npr, YAZ_MARC_ISO2709, charset,
index ad09bef..6c57ec2 100644 (file)
@@ -36,3 +36,6 @@ test_log_thread
 *.log
 *.o
 *~
+*.diff
+*.hex*
+*.revert*
\ No newline at end of file
index dff7f68..80b6d02 100644 (file)
@@ -225,6 +225,14 @@ static void tst_convert1(void)
         "    <subfield code=\"a\">   11224466 </subfield>\n"
         "  </datafield>\n"
         "</record>\n";
+    const char *tmarcxml_rec =
+        "<r xmlns=\"http://www.indexdata.com/MARC21/turboxml\">\n"
+        "  <l>00080nam a22000498a 4500</l>\n"
+        "  <c001>   11224466 </c001>\n"
+        "  <d010 i1=\" \" i2=\" \">\n"
+        "    <sa>   11224466 </sa>\n"
+        "  </d010>\n"
+        "</r>\n";
     const char *iso2709_rec =
         "\x30\x30\x30\x38\x30\x6E\x61\x6D\x20\x61\x32\x32\x30\x30\x30\x34"
         "\x39\x38\x61\x20\x34\x35\x30\x30\x30\x30\x31\x30\x30\x31\x33\x30"
@@ -242,6 +250,7 @@ static void tst_convert1(void)
                                   "</backend>",
                                   0, &p));
     YAZ_CHECK(conv_convert_test(p, marcxml_rec, iso2709_rec));
+    YAZ_CHECK(conv_convert_test(p, tmarcxml_rec, iso2709_rec));
     yaz_record_conv_destroy(p);
 
     YAZ_CHECK(conv_configure_test("<backend>"
diff --git a/test/tmarc1.xml b/test/tmarc1.xml
new file mode 100644 (file)
index 0000000..6483662
--- /dev/null
@@ -0,0 +1,95 @@
+<collection xmlns="http://www.indexdata.com/MARC21/turboxml">
+<r>
+<!-- Length implementation at offset 22 should hold a digit. Assuming 0 -->
+  <l>00988nam0a32003011  450 </l>
+  <d001 i1="0" i2="0" i3="0">
+    <sa>9 181 423 4</sa>
+    <sb>710100</sb>
+    <sf>a</sf>
+  </d001>
+  <d004 i1="0" i2="0" i3="0">
+    <sr>n</sr>
+    <sa>e</sa>
+  </d004>
+  <d008 i1="0" i2="0" i3="0">
+    <st>m</st>
+    <su>u</su>
+    <sa>2002</sa>
+    <sb>us</sb>
+    <sl>eng</sl>
+    <sv>0</sv>
+  </d008>
+  <d009 i1="0" i2="0" i3="0">
+    <sa>a</sa>
+    <sg>xx</sg>
+  </d009>
+  <d021 i1="0" i2="0" i3="0">
+    <sa>1-4000-4596-7</sa>
+    <sd>$14,00</sd>
+  </d021>
+  <d032 i1="0" i2="0" i3="0">
+    <s code="&amp;">DBC200439</s>
+  </d032>
+  <d100 i1="0" i2="0" i3="0">
+    <s0></s0>
+    <sa>Sloman</sa>
+    <sh>Larry</sh>
+  </d100>
+  <d245 i1="0" i2="0" i3="0">
+    <sa>On the road with Bob Dylan</sa>
+    <se>Larry &quot;Ratso&quot; Sloman</se>
+  </d245>
+  <d250 i1="0" i2="0" i3="0">
+    <sa>Revised edition</sa>
+    <sb>Three Rivers Press</sb>
+  </d250>
+  <d260 i1="0" i2="0" i3="0">
+    <sa>New York</sa>
+    <sb>Three Rivers Press</sb>
+    <sc>2002</sc>
+  </d260>
+  <d300 i1="0" i2="0" i3="0">
+    <sa>xv, 464 sider, tavler</sa>
+  </d300>
+  <d504 i1="0" i2="0" i3="0">
+    <sa>Larry &quot;Ratso&quot; Slomans meget personlige beretning om Bob Dylans koncertturne i USA i 1975: &quot;The Rolling Thunder revue&quot;</sa>
+  </d504>
+  <d512 i1="0" i2="0" i3="0">
+    <sa>På omslaget: With a new introduction by Kinky Friedman</sa>
+  </d512>
+  <d520 i1="0" i2="0" i3="0">
+    <sa>Tidligere: 1. udgave. New York, Bantam, 1978</sa>
+  </d520>
+  <d652 i1="0" i2="0" i3="0">
+    <s0></s0>
+    <sm>99.4</sm>
+    <sa>Dylan</sa>
+    <sh>Bob</sh>
+  </d652>
+  <d652 i1="0" i2="0" i3="0">
+    <sp>78.9064</sp>
+    <sv>5</sv>
+  </d652>
+  <d666 i1="0" i2="0" i3="0">
+    <sf>folkemusik</sf>
+  </d666>
+  <d666 i1="0" i2="0" i3="0">
+    <sf>folkemusikere</sf>
+  </d666>
+  <d666 i1="0" i2="0" i3="0">
+    <sf>rockmusik</sf>
+  </d666>
+  <d666 i1="0" i2="0" i3="0">
+    <sf>rockmusikere</sf>
+  </d666>
+  <d666 i1="0" i2="0" i3="0">
+    <sf>rockkoncerter</sf>
+  </d666>
+  <d666 i1="0" i2="0" i3="0">
+    <se>USA</se>
+  </d666>
+  <d666 i1="0" i2="0" i3="0">
+    <si>1970-1979</si>
+  </d666>
+</r>
+</collection>
diff --git a/test/tmarc1.xml.marc b/test/tmarc1.xml.marc
new file mode 100644 (file)
index 0000000..efc7bdf
--- /dev/null
@@ -0,0 +1 @@
+00989nam0a32003011  450 001002800000004001000028008002800038009001100066021002700077032001500104100002100119245005400140250004100194260004000235300002700275504012300302512006100425520005000486652002400536652001600560666001600576666001900592666001500611666001800626666001900644666000900663666001500672\1e000\1fa9 181 423 4\1fb710100\1ffa\1e000\1frn\1fae\1e000\1ftm\1fuu\1fa2002\1fbus\1fleng\1fv0\1e000\1faa\1fgxx\1e000\1fa1-4000-4596-7\1fd$14,00\1e000\1f&DBC200439\1e000\1f0\1faSloman\1fhLarry\1e000\1faOn the road with Bob Dylan\1feLarry "Ratso" Sloman\1e000\1faRevised edition\1fbThree Rivers Press\1e000\1faNew York\1fbThree Rivers Press\1fc2002\1e000\1faxv, 464 sider, tavler\1e000\1faLarry "Ratso" Slomans meget personlige beretning om Bob Dylans koncertturne i USA i 1975: "The Rolling Thunder revue"\1e000\1faPå omslaget: With a new introduction by Kinky Friedman\1e000\1faTidligere: 1. udgave. New York, Bantam, 1978\1e000\1f0\1fm99.4\1faDylan\1fhBob\1e000\1fp78.9064\1fv5\1e000\1fffolkemusik\1e000\1fffolkemusikere\1e000\1ffrockmusik\1e000\1ffrockmusikere\1e000\1ffrockkoncerter\1e000\1feUSA\1e000\1fi1970-1979\1e\1d
\ No newline at end of file
diff --git a/test/tmarc2.xml b/test/tmarc2.xml
new file mode 100644 (file)
index 0000000..f2b6433
--- /dev/null
@@ -0,0 +1,102 @@
+<collection xmlns="http://www.indexdata.com/MARC21/turboxml">
+<r>
+<!-- Length implementation at offset 22 should hold a digit. Assuming 0 -->
+  <l>01116nam0a32002171  450 </l>
+  <d001 i1="0" i2="0" i3="0">
+    <sa>9 182 502 3</sa>
+    <sb>710100</sb>
+    <sf>a</sf>
+  </d001>
+  <d004 i1="0" i2="0" i3="0">
+    <sr>c</sr>
+    <sa>e</sa>
+  </d004>
+  <d008 i1="0" i2="0" i3="0">
+    <st>s</st>
+    <su>f</su>
+    <sa>1995</sa>
+    <sb>gb</sb>
+    <sl>eng</sl>
+    <sv>0</sv>
+  </d008>
+  <d009 i1="0" i2="0" i3="0">
+    <sa>s</sa>
+    <sg>xc</sg>
+  </d009>
+  <d039 i1="0" i2="0" i3="0">
+    <sa>bef</sa>
+  </d039>
+  <d100 i1="0" i2="0" i3="0">
+    <sa>Mimms</sa>
+    <sh>Garnet</sh>
+  </d100>
+  <d245 i1="0" i2="0" i3="0">
+    <sa>Cry baby</sa>
+    <sa>Warm and soulful</sa>
+    <se>Garnet Mimms ... [et al.]</se>
+  </d245>
+  <d260 i1="0" i2="0" i3="0">
+    <sa>Bury St. Edmunds</sa>
+    <sb>BGO</sb>
+    <sc>1995</sc>
+  </d260>
+  <d300 i1="0" i2="0" i3="0">
+    <sn>1 cd</sn>
+  </d300>
+  <d512 i1="0" i2="0" i3="0">
+    <sa>Indspilninger publiceret 1963 (Cry baby) og 1965 (Warm and soulful)</sa>
+  </d512>
+  <d531 i1="0" i2="0" i3="0">
+    <sa>Indhold:</sa>
+  </d531>
+  <d538 i1="0" i2="0" i3="0">
+    <sf>BGO</sf>
+    <sg>BGOCD268</sg>
+  </d538>
+  <d652 i1="0" i2="0" i3="0">
+    <sm>78.794</sm>
+    <sv>4</sv>
+  </d652>
+  <d666 i1="0" i2="0" i3="0">
+    <sm>soul</sm>
+    <sm>rhythm &amp; blues</sm>
+    <sn>vokal</sn>
+    <sp>1960-1969</sp>
+    <sl>USA</sl>
+  </d666>
+  <d795 i1="0" i2="0" i3="0">
+    <s code="å">11</s>
+    <sa>Cry baby</sa>
+    <sa>Nobody but you</sa>
+    <sa>Until you were gone</sa>
+    <sa>Anytime you want me</sa>
+    <sa>So close</sa>
+    <sa>For your precious love</sa>
+    <sa>Baby don&apos;t you weep</sa>
+    <sa>A ¤quiet place</sa>
+    <sa>Cry to me</sa>
+    <sa>Don&apos;t change your heart</sa>
+    <sa>Wanting you</sa>
+    <sa>The ¤truth hurts</sa>
+    <sa>I&apos;ll take good care of you</sa>
+    <sa>Looking for you</sa>
+    <sa>It won&apos;t hurt (half as much)</sa>
+    <sa>It was easier to hurt her</sa>
+    <sa>Thinkin&apos;</sa>
+    <sa>Prove it to me</sa>
+    <sa>More than a miracle</sa>
+    <sa>As long as I have you</sa>
+    <sa>One girl</sa>
+    <sa>There goes my baby</sa>
+    <sa>It&apos;s just a matter of time</sa>
+    <sa>A ¤little bit of soap</sa>
+    <sa>Look away</sa>
+    <sa>I&apos;ll make it up to you</sa>
+  </d795>
+  <d795 i1="0" i2="0" i3="0">
+    <s code="å">40</s>
+    <sy>0</sy>
+    <sa>1 girl</sa>
+  </d795>
+</r>
+</collection>
diff --git a/test/tmarc2.xml.marc b/test/tmarc2.xml.marc
new file mode 100644 (file)
index 0000000..106fce3
--- /dev/null
@@ -0,0 +1 @@
+01121nam0a32002171  450 001002800000004001000028008002800038009001100066039000900077100001900086245005900105260003300164300001000197512007300207531001400280538001900294652001500313666004900328795050600377795002000883\1e000\1fa9 182 502 3\1fb710100\1ffa\1e000\1frc\1fae\1e000\1fts\1fuf\1fa1995\1fbgb\1fleng\1fv0\1e000\1fas\1fgxc\1e000\1fabef\1e000\1faMimms\1fhGarnet\1e000\1faCry baby\1faWarm and soulful\1feGarnet Mimms ... [et al.]\1e000\1faBury St. Edmunds\1fbBGO\1fc1995\1e000\1fn1 cd\1e000\1faIndspilninger publiceret 1963 (Cry baby) og 1965 (Warm and soulful)\1e000\1faIndhold:\1e000\1ffBGO\1fgBGOCD268\1e000\1fm78.794\1fv4\1e000\1fmsoul\1fmrhythm & blues\1fnvokal\1fp1960-1969\1flUSA\1e000\1få11\1faCry baby\1faNobody but you\1faUntil you were gone\1faAnytime you want me\1faSo close\1faFor your precious love\1faBaby don't you weep\1faA ¤quiet place\1faCry to me\1faDon't change your heart\1faWanting you\1faThe ¤truth hurts\1faI'll take good care of you\1faLooking for you\1faIt won't hurt (half as much)\1faIt was easier to hurt her\1faThinkin'\1faProve it to me\1faMore than a miracle\1faAs long as I have you\1faOne girl\1faThere goes my baby\1faIt's just a matter of time\1faA ¤little bit of soap\1faLook away\1faI'll make it up to you\1e000\1få40\1fy0\1fa1 girl\1e\1d
\ No newline at end of file
diff --git a/test/tmarc3.xml b/test/tmarc3.xml
new file mode 100644 (file)
index 0000000..3fac6ac
--- /dev/null
@@ -0,0 +1,122 @@
+<collection xmlns="http://www.indexdata.com/MARC21/turboxml">
+<r>
+<!-- Length implementation at offset 22 should hold a digit. Assuming 0 -->
+  <l>00914naa a2200337   450 </l>
+  <d001 i1=" " i2=" ">
+    <sa>a00001508</sa>
+    <sf>a</sf>
+  </d001>
+  <d004 i1=" " i2=" ">
+    <sa>i</sa>
+    <sr>n</sr>
+  </d004>
+  <d008 i1=" " i2=" ">
+    <sa>1991</sa>
+    <sb>xx</sb>
+    <sl>nor</sl>
+    <st>a</st>
+    <sv>9</sv>
+  </d008>
+  <d009 i1=" " i2=" ">
+    <sa>a</sa>
+    <sg>xx</sg>
+  </d009>
+  <d041 i1=" " i2=" ">
+    <sa>nor</sa>
+  </d041>
+  <d041 i1=" " i2=" ">
+    <sd>eng</sd>
+  </d041>
+  <d097 i1="0" i2="0">
+    <sa>06</sa>
+  </d097>
+  <d245 i1=" " i2=" ">
+    <sa>Byfornyelse ved Ibsen-Ringen</sa>
+  </d245>
+  <d300 i1=" " i2=" ">
+    <sb>farvefoto</sb>
+    <sb>plan</sb>
+    <sb>snit</sb>
+  </d300>
+  <d557 i1=" " i2=" ">
+    <sa>Byggekunst</sa>
+    <sj>1991</sj>
+    <sv>1/2</sv>
+    <sk>41-45</sk>
+  </d557>
+  <d630 i1=" " i2=" ">
+    <sf>byfornyelse</sf>
+  </d630>
+  <d630 i1=" " i2=" ">
+    <sf>sanering</sf>
+  </d630>
+  <d633 i1=" " i2=" ">
+    <sf>Norge</sf>
+  </d633>
+  <d633 i1=" " i2=" ">
+    <sf>Oslo</sf>
+  </d633>
+  <d648 i1=" " i2=" ">
+    <sa>Telje Torp Aasen Arkitektkontor</sa>
+    <sc>Kristian Augustsgate 7B</sc>
+  </d648>
+  <d648 i1=" " i2=" ">
+    <sa>Eng, Dagfin</sa>
+  </d648>
+  <d648 i1=" " i2=" ">
+    <sr>anlund, Tom</sr>
+    <sc>Kristian Augustsgate</sc>
+    <sc>Pilestredet 19</sc>
+  </d648>
+  <dJ01 i1=" " i2=" ">
+    <sa>a</sa>
+  </dJ01>
+  <dBAS i1=" " i2=" ">
+    <s0></s0>
+  </dBAS>
+  <dLKR i1=" " i2=" ">
+    <sa>ITM</sa>
+    <sl>ARK50</sl>
+    <sb>0000145</sb>
+    <sy>1991</sy>
+    <si>1/2</si>
+    <sk>41-45</sk>
+  </dLKR>
+  <dCAT i1=" " i2=" ">
+    <sa></sa>
+    <sb></sb>
+    <sc>20020111</sc>
+    <sl>ARK01</sl>
+    <sh>2002</sh>
+  </dCAT>
+  <dCAT i1=" " i2=" ">
+    <sa></sa>
+    <sb></sb>
+    <sc>20020111</sc>
+    <sl>ARK01</sl>
+    <sh>2116</sh>
+  </dCAT>
+  <dCAT i1=" " i2=" ">
+    <sa></sa>
+    <sb></sb>
+    <sc>20021002</sc>
+    <sl>ARK01</sl>
+    <sh>1000</sh>
+  </dCAT>
+  <dCAT i1=" " i2=" ">
+    <sa>ICLLOAD</sa>
+    <sb>00</sb>
+    <sc>20021122</sc>
+    <sl>ARK01</sl>
+    <sh>1948</sh>
+  </dCAT>
+  <dCAT i1=" " i2=" ">
+    <sc>20030618</sc>
+    <sl>ARK01</sl>
+    <sh>1330</sh>
+  </dCAT>
+  <dUID i1=" " i2=" ">
+    <sa>a00001508</sa>
+  </dUID>
+</r>
+</collection>
diff --git a/test/tmarc3.xml.marc b/test/tmarc3.xml.marc
new file mode 100644 (file)
index 0000000..64f2cef
--- /dev/null
@@ -0,0 +1 @@
+00914naa a2200337   450 001001700000004000900017008002400026009001000050041000800060041000800068097000700076245003300083300002600116557003300142630001600175630001300191633001000204633000900214648006100223648001600284648005400300J01000600354BAS000500360LKR004200365CAT003000407CAT003000437CAT003000467CAT003900497CAT002600536UID001400562\1e  \1faa00001508\1ffa\1e  \1fai\1frn\1e  \1fa1991\1fbxx\1flnor\1fta\1fv9\1e  \1faa\1fgxx\1e  \1fanor\1e  \1fdeng\1e00\1fa06\1e  \1faByfornyelse ved Ibsen-Ringen\1e  \1fbfarvefoto\1fbplan\1fbsnit\1e  \1faByggekunst\1fj1991\1fv1/2\1fk41-45\1e  \1ffbyfornyelse\1e  \1ffsanering\1e  \1ffNorge\1e  \1ffOslo\1e  \1faTelje Torp Aasen Arkitektkontor\1fcKristian Augustsgate 7B\1e  \1faEng, Dagfin\1e  \1franlund, Tom\1fcKristian Augustsgate\1fcPilestredet 19\1e  \1faa\1e  \1f0\1e  \1faITM\1flARK50\1fb0000145\1fy1991\1fi1/2\1fk41-45\1e  \1fa\1fb\1fc20020111\1flARK01\1fh2002\1e  \1fa\1fb\1fc20020111\1flARK01\1fh2116\1e  \1fa\1fb\1fc20021002\1flARK01\1fh1000\1e  \1faICLLOAD\1fb00\1fc20021122\1flARK01\1fh1948\1e  \1fc20030618\1flARK01\1fh1330\1e  \1faa00001508\1e\1d
\ No newline at end of file
diff --git a/test/tmarc4.xml b/test/tmarc4.xml
new file mode 100644 (file)
index 0000000..763d438
--- /dev/null
@@ -0,0 +1,11 @@
+<collection xmlns="http://www.indexdata.com/MARC21/turboxml">
+<r>
+<!-- Indicator length at offset 10 should hold a digit. Assuming 2 -->
+<!-- Identifier length at offset 11 should hold a digit. Assuming 2 -->
+<!-- Base address at offsets 12..16 should hold a number. Assuming 0 -->
+<!-- Length implementation at offset 22 should hold a digit. Assuming 0 -->
+  <l>009140091a22a  22003370 </l>
+<!-- Directory offset 24: Bad value for data length and/or length starting -->
+<!-- Base address not at end of directory, base 0, end 25 -->
+</r>
+</collection>
diff --git a/test/tmarc4.xml.marc b/test/tmarc4.xml.marc
new file mode 100644 (file)
index 0000000..9b3d907
--- /dev/null
@@ -0,0 +1 @@
+000260091a2200025003370 \1e\1d
\ No newline at end of file
diff --git a/test/tmarc5.xml b/test/tmarc5.xml
new file mode 100644 (file)
index 0000000..7adf9fb
--- /dev/null
@@ -0,0 +1,33 @@
+<collection xmlns="http://www.indexdata.com/MARC21/turboxml">
+<r>
+  <l>00492nam a22001455a 4500</l>
+  <c001>000277485</c001>
+  <c005>20051026111436.0</c005>
+  <c008>050413s1894    gr            000 0 gre d</c008>
+  <d100 i1="1" i2=" ">
+    <sa>Μαρούδης, Κωνσταντίνος Ιω</sa>
+  </d100>
+  <d245 i1="1" i2="0">
+    <sa>Ελληνικόν κρυπτογραφικόν λεξικόν /</sa>
+    <sc>Κωνστ. Ι. Μαρούδης.</sc>
+  </d245>
+  <d250 i1=" " i2=" ">
+    <s code="η"> εκδ.</s>
+  </d250>
+  <d260 i1=" " i2=" ">
+    <sa>Αθήνα,</sa>
+    <sc>1894.</sc>
+  </d260>
+  <d300 i1=" " i2=" ">
+    <sa>248 σελ.</sa>
+  </d300>
+  <d650 i1=" " i2="0">
+    <sa>Greek language, Modern</sa>
+    <sx>Dialects</sx>
+    <sv>Dictionaries</sv>
+  </d650>
+  <d650 i1=" " i2="0">
+    <sa>Cryptography.</sa>
+  </d650>
+</r>
+</collection>
diff --git a/test/tmarc5.xml.marc b/test/tmarc5.xml.marc
new file mode 100644 (file)
index 0000000..50102a7
--- /dev/null
@@ -0,0 +1 @@
+00492nam a22001455a 4500001001000000005001700010008004100027100005200068245010400120250001400224260002300238300001600261650005100277650001800328\1e000277485\1e20051026111436.0\1e050413s1894    gr            000 0 gre d\1e\1faΜαρούδης, Κωνσταντίνος Ιω\1e10\1faΕλληνικόν κρυπτογραφικόν λεξικόν /\1fcΚωνστ. Ι. Μαρούδης.\1e  \1fη εκδ.\1e  \1faΑθήνα,\1fc1894.\1e  \1fa248 σελ.\1e 0\1faGreek language, Modern\1fxDialects\1fvDictionaries\1e 0\1faCryptography.\1e\1d
\ No newline at end of file
diff --git a/test/tmarc6.xml b/test/tmarc6.xml
new file mode 100644 (file)
index 0000000..6d45255
--- /dev/null
@@ -0,0 +1,34 @@
+<collection xmlns="http://www.indexdata.com/MARC21/turboxml">
+<r>
+  <l>00366nam a22001698a 4500</l>
+  <c001>   11224466 </c001>
+  <c003>DLC</c003>
+  <c005>00000000000000.0</c005>
+  <c008>910710c19910701nju           00010 eng  </c008>
+  <d010 i1=" " i2=" ">
+    <sa>   11224466 </sa>
+  </d010>
+  <d040 i1=" " i2=" ">
+    <sa>DLC</sa>
+    <sc>DLC</sc>
+  </d040>
+  <d050 i1="0" i2="0">
+    <sa>123-xyz</sa>
+  </d050>
+  <d100 i1="1" i2="0">
+    <sa>Jack Collins</sa>
+  </d100>
+  <d245 i1="1" i2="0">
+    <sa>How to program a computer</sa>
+  </d245>
+  <d260 i1="1" i2=" ">
+    <sa>Penguin</sa>
+  </d260>
+  <d263 i1=" " i2=" ">
+    <sa>8710</sa>
+  </d263>
+  <d300 i1=" " i2=" ">
+    <sa>p. cm.</sa>
+  </d300>
+</r>
+</collection>
diff --git a/test/tmarc6.xml.marc b/test/tmarc6.xml.marc
new file mode 100644 (file)
index 0000000..400a01a
--- /dev/null
@@ -0,0 +1 @@
+00366nam a22001698a 4500001001300000003000400013005001700017008004100034010001700075040001300092050001200105100001700117245003000134260001200164263000900176300001100185\1e   11224466 \1eDLC\1e00000000000000.0\1e910710c19910701nju           00010 eng  \1e  \1fa   11224466 \1e  \1faDLC\1fcDLC\1e00\1fa123-xyz\1e10\1faJack Collins\1e10\1faHow to program a computer\1e\1faPenguin\1e  \1fa8710\1e  \1fap. cm.\1e\1d
\ No newline at end of file
diff --git a/test/tmarc7.xml b/test/tmarc7.xml
new file mode 100644 (file)
index 0000000..7b80870
--- /dev/null
@@ -0,0 +1,88 @@
+<collection xmlns="http://www.indexdata.com/MARC21/turboxml">
+<r>
+  <l>03114cam a2200349 i 4500</l>
+  <c001>   77123332 </c001>
+  <c003>DLC</c003>
+  <c005>20051218154744.0</c005>
+  <c008>981008b2001    ilu           000 0 eng  </c008>
+  <d035 i1=" " i2=" ">
+    <sa>57779</sa>
+  </d035>
+  <d035 i1=" " i2=" ">
+    <sa>90490</sa>
+  </d035>
+  <d035 i1=" " i2=" ">
+    <sa>93202</sa>
+  </d035>
+  <d040 i1=" " i2=" ">
+    <sa>DLC</sa>
+    <sc>DLC</sc>
+  </d040>
+  <d906 i1=" " i2=" ">
+    <sa>0</sa>
+    <sb>und</sb>
+    <sc>orignew</sc>
+    <sd>u</sd>
+    <se>ncip</se>
+    <sf>19</sf>
+    <sg>y-gencatlg</sg>
+  </d906>
+  <d010 i1=" " i2=" ">
+    <sa>   77123332 </sa>
+  </d010>
+  <d245 i1="0" i2="0">
+    <sa>Voyager Diacritic test -- New input 001 (SBIE).</sa>
+  </d245>
+  <d260 i1=" " i2=" ">
+    <sa>ny :</sa>
+    <sb>ny,</sb>
+    <sc>2001.</sc>
+  </d260>
+  <d300 i1=" " i2=" ">
+    <sa>100 p. ;</sa>
+    <sc>12 cm.</sc>
+  </d300>
+  <d500 i1=" " i2=" ">
+    <sa>New copy imported from file (8/12/99).</sa>
+  </d500>
+  <d500 i1=" " i2=" ">
+    <sa>VOYAGER COLUMN 0  (NEW):  Degree sign (°);  Phono Copyright mark (℗);  Copyright mark (©);  Sharp (♯);  Inverted Question mark (¿);  Inverted Exclamation mark (¡).</sa>
+  </d500>
+  <d500 i1=" " i2=" ">
+    <sa>VOYAGER COLUMN 1:  Script L (ℓ);  Polish L (Ł);  Scandanavian O (Ø);  D with Crossbar (Đ);  Icelandic Thorn (Þ);  AE Digraph (Æ); OE Digraph (Œ);  Miagkii Znak (ʹ);  Dot at Midline (·).</sa>
+  </d500>
+  <d500 i1=" " i2=" ">
+    <sa>VOYAGER COLUMN 2:  Musical Flat (♭);  Patent Mark (®);  Plus or Minus (±);  O Hook (Ơ);  U Hook (Ư);  Alif (ʼ);  alpha α;  Ayn (ʻ);  Polish l (ł).</sa>
+  </d500>
+  <d500 i1=" " i2=" ">
+    <sa>VOYAGER COLUMN 3:  Scandanavian o (ø);  d with crossbar (đ);  Icelandic Thorn (þ);  ae Digraph (æ);  oe Digraph (œ);  Tverdii Znak (ʺ);  Turkish i (ı);  British Pound (£);  eth (ð).</sa>
+  </d500>
+  <d500 i1=" " i2=" ">
+    <sa>VOYAGER COLUMN 4:  Dagger (DO NOT USE);  o Hook (ơ);  u Hook (ư);  Beta β;  Gamma γ;  Superscript 0 (⁰);  Superscript 1 (¹);  Superscript 2 (²);  Superscript 3 (³).</sa>
+  </d500>
+  <d500 i1=" " i2=" ">
+    <sa>VOYAGER COLUMN 5:  Superscript 4 (⁴);  Superscript 5 (⁵);  Superscript 6 (⁶);  Superscript 7 (⁷);  Superscript 8 (⁸);  Superscript 9 (⁹);  Superscript + (⁺);  Superscript - (⁻);  Superscript ( (⁽).</sa>
+  </d500>
+  <d500 i1=" " i2=" ">
+    <sa>VOYAGER COLUMN 6:  Superscript ) (⁾);  Subscript 0 (₀);  Subscript  1 (₁);  Subscript 2 (₂);  Subscript 3 (₃);  Subscript 4 (₄);  Subscript 5 (₅);  Subscript 6 (₆);  Subscript 7 (₇).</sa>
+  </d500>
+  <d500 i1=" " i2=" ">
+    <sa>VOYAGER COLUMN 7:  Subscript 8 (₈);  Subscript 9 (₉);  Subscript + (₊);  Subscript - (₋);  Subscript ( (₍);  Subscript ) (₎);  Pseudo Question Mark (ỏ);  Grave (ò);  Acute (ó).</sa>
+  </d500>
+  <d500 i1=" " i2=" ">
+    <sa>VOYAGER COLUMN 8:  Circumflex (ô);  Tilde (õ);  Macron (ō);  Breve (ŏ);  Superior Dot (ȯ);  Umlaut (ö);  Hacek (ǒ);  Circle Above (o̊);  Ligature left (o͡).</sa>
+  </d500>
+  <d500 i1=" " i2=" ">
+    <sa>VOYAGER COLUMN 9:  Ligature right (o) ;  High Comma off center (o̕);  Double Acute (ő);  Candrabindu (o̐);  Cedilla (o̧);  Right Hook (ǫ);  Dot Below (ọ);  Double Dot Below (o̤);  Circle Below (o̥).</sa>
+  </d500>
+  <d500 i1=" " i2=" ">
+    <sa>VOYAGER COLUMN 10:  Double Underscore (o̳);  Underscore (o̲);  Left Hook (o̦);  Right Cedilla (o̜);  Upadhmaniya (o̮);  Double Tilde 1st half (o͠);  Double Tilde 2nd half (o) ;  High Comma centered (o̓).</sa>
+  </d500>
+  <d500 i1=" " i2=" ">
+    <sa>VOYAGER PC Keyboard:  Spacing Circumflex (^); Spacing Underscore (_); Spacing Grave (`); Open Curly Bracket ({); Close Curly Bracket (}); Spacing Tilde (~).</sa>
+  </d500>
+  <d500 i1=" " i2=" ">
+    <sa>Standard PC Keyboard:   1234567890-=   !@#$%^&amp;*()_+   qwertyuiop[]\   QWERTYUIOP{}|   asdfghjkl;&apos;  ASDFGHJKL:&quot;   zxcvbnm,./   ZXCVBNM&lt;&gt;?</sa>
+  </d500>
+</r>
+</collection>
diff --git a/test/tmarc7.xml.marc b/test/tmarc7.xml.marc
new file mode 100644 (file)
index 0000000..e6315df
--- /dev/null
@@ -0,0 +1 @@
+03109cam a2200349 i 4500001001300000003000400013005001700017008004100034035001000075035001000085035001000095040001300105906004500118010001700163245005200180260002100232300002100253500004300274500017600317500020000493500016100693500019500854500017801049500022001227500020501447500019901652500017701851500021402028500021502242500016102457500014102618\1e   77123332 \1eDLC\1e20051218154744.0\1e981008b2001    ilu           000 0 eng  \1e  \1fa57779\1e  \1fa90490\1e  \1fa93202\1e  \1faDLC\1fcDLC\1e  \1fa0\1fbund\1fcorignew\1fdu\1fencip\1ff19\1fgy-gencatlg\1e  \1fa   77123332 \1e00\1faVoyager Diacritic test -- New input 001 (SBIE).\1e  \1fany :\1fbny,\1fc2001.\1e  \1fa100 p. ;\1fc12 cm.\1e  \1faNew copy imported from file (8/12/99).\1e  \1faVOYAGER COLUMN 0  (NEW):  Degree sign (°);  Phono Copyright mark (℗);  Copyright mark (©);  Sharp (♯);  Inverted Question mark (¿);  Inverted Exclamation mark (¡).\1e  \1faVOYAGER COLUMN 1:  Script L (ℓ);  Polish L (Ł);  Scandanavian O (Ø);  D with Crossbar (Đ);  Icelandic Thorn (Þ);  AE Digraph (Æ); OE Digraph (Œ);  Miagkii Znak (ʹ);  Dot at Midline (·).\1e  \1faVOYAGER COLUMN 2:  Musical Flat (♭);  Patent Mark (®);  Plus or Minus (±);  O Hook (Ơ);  U Hook (Ư);  Alif (ʼ);  alpha α;  Ayn (ʻ);  Polish l (ł).\1e  \1faVOYAGER COLUMN 3:  Scandanavian o (ø);  d with crossbar (đ);  Icelandic Thorn (þ);  ae Digraph (æ);  oe Digraph (œ);  Tverdii Znak (ʺ);  Turkish i (ı);  British Pound (£);  eth (ð).\1e  \1faVOYAGER COLUMN 4:  Dagger (DO NOT USE);  o Hook (ơ);  u Hook (ư);  Beta β;  Gamma γ;  Superscript 0 (⁰);  Superscript 1 (¹);  Superscript 2 (²);  Superscript 3 (³).\1e  \1faVOYAGER COLUMN 5:  Superscript 4 (⁴);  Superscript 5 (⁵);  Superscript 6 (⁶);  Superscript 7 (⁷);  Superscript 8 (⁸);  Superscript 9 (⁹);  Superscript + (⁺);  Superscript - (⁻);  Superscript ( (⁽).\1e  \1faVOYAGER COLUMN 6:  Superscript ) (⁾);  Subscript 0 (₀);  Subscript  1 (₁);  Subscript 2 (₂);  Subscript 3 (₃);  Subscript 4 (₄);  Subscript 5 (₅);  Subscript 6 (₆);  Subscript 7 (₇).\1e  \1faVOYAGER COLUMN 7:  Subscript 8 (₈);  Subscript 9 (₉);  Subscript + (₊);  Subscript - (₋);  Subscript ( (₍);  Subscript ) (₎);  Pseudo Question Mark (ỏ);  Grave (ò);  Acute (ó).\1e  \1faVOYAGER COLUMN 8:  Circumflex (ô);  Tilde (õ);  Macron (ō);  Breve (ŏ);  Superior Dot (ȯ);  Umlaut (ö);  Hacek (ǒ);  Circle Above (o̊);  Ligature left (o͡).\1e  \1faVOYAGER COLUMN 9:  Ligature right (o) ;  High Comma off center (o̕);  Double Acute (ő);  Candrabindu (o̐);  Cedilla (o̧);  Right Hook (ǫ);  Dot Below (ọ);  Double Dot Below (o̤);  Circle Below (o̥).\1e  \1faVOYAGER COLUMN 10:  Double Underscore (o̳);  Underscore (o̲);  Left Hook (o̦);  Right Cedilla (o̜);  Upadhmaniya (o̮);  Double Tilde 1st half (o͠);  Double Tilde 2nd half (o) ;  High Comma centered (o̓).\1e  \1faVOYAGER PC Keyboard:  Spacing Circumflex (^); Spacing Underscore (_); Spacing Grave (`); Open Curly Bracket ({); Close Curly Bracket (}); Spacing Tilde (~).\1e  \1faStandard PC Keyboard:   1234567890-=   !@#$%^&*()_+   qwertyuiop[]\   QWERTYUIOP{}|   asdfghjkl;'  ASDFGHJKL:"   zxcvbnm,./   ZXCVBNM<>?\1e\1d
\ No newline at end of file
diff --git a/test/tmarc8.xml b/test/tmarc8.xml
new file mode 100644 (file)
index 0000000..6ee9be7
--- /dev/null
@@ -0,0 +1,141 @@
+<collection xmlns="http://www.indexdata.com/MARC21/turboxml">
+<r>
+  <l>02647nam^a2200469^^^4500</l>
+  <c001>UCD-002592301</c001>
+  <c005>20061209034435.0</c005>
+  <c006>m        d        </c006>
+  <c007>cr bn |||a|bb|</c007>
+  <c008>920330s1583    enk     s     000 0 eng d</c008>
+  <d035 i1=" " i2=" ">
+    <sa>99851339eo</sa>
+  </d035>
+  <d037 i1=" " i2=" ">
+    <sa>CL0036000039</sa>
+    <sb>ProQuest Information and Learning. 300 N. Zeeb Rd., Ann Arbor, MI 48106</sb>
+  </d037>
+  <d040 i1=" " i2=" ">
+    <sa>Cu-RivES</sa>
+    <sc>Cu-RivES</sc>
+    <sd>CStRLIN</sd>
+    <se>dcrb</se>
+    <sd>WaOLN</sd>
+  </d040>
+  <d100 i1="1" i2=" ">
+    <sa>Clinton, Atkinson.</sa>
+  </d100>
+  <d245 i1="0" i2="0">
+    <sa>Clinton, Purser &amp; Arnold, to their countreymen wheresoeuer</sa>
+    <sh>[electronic resource] :</sh>
+    <sb>Wherein is described by their own hands their vnfeigned penitence for their offences past: their patience in welcoming their death, &amp; their duetiful minds towardes her most excellent Maiestie</sb>
+  </d245>
+  <d246 i1="2" i2=" ">
+    <sa>Clinton, Purser &amp; Arnold, to their countreymen wheresoever</sa>
+  </d246>
+  <d246 i1="2" i2=" ">
+    <sa>Clinton, Purser &amp; Arnold, to their countreymen wheresoever</sa>
+  </d246>
+  <d260 i1=" " i2=" ">
+    <sa>London :</sa>
+    <sb>Imprinted by Iohn Wolfe and are to be sold [by W. Wright] at the middle shop in the Poultry, ioyning S. Mildreds Church,</sb>
+    <sc>[1583?]</sc>
+  </d260>
+  <d300 i1=" " i2=" ">
+    <sa>[12] p</sa>
+  </d300>
+  <d500 i1=" " i2=" ">
+    <sa>In verse</sa>
+  </d500>
+  <d500 i1=" " i2=" ">
+    <sa>The first poem is signed: Thomas Walton alias Purser</sa>
+  </d500>
+  <d500 i1=" " i2=" ">
+    <sa>Clinton&apos;s full name and bookseller&apos;s name from, and publication date conjectured by, STC</sa>
+  </d500>
+  <d500 i1=" " i2=" ">
+    <sa>Signatures: A⁴ B²</sa>
+  </d500>
+  <d500 i1=" " i2=" ">
+    <sa>Reproduction of the original in the Bodleian Library</sa>
+  </d500>
+  <d510 i1="4" i2=" ">
+    <sa>STC (2nd ed.)</sa>
+    <sc>5431</sc>
+  </d510>
+  <d530 i1=" " i2=" ">
+    <sa>Also issued in print and on microform</sa>
+  </d530>
+  <d533 i1=" " i2=" ">
+    <sa>Electronic reproduction.</sa>
+    <sn>Mode of access: World Wide Web.</sn>
+    <sn>Restricted to UC campuses</sn>
+  </d533>
+  <d655 i1=" " i2="7">
+    <sa>Electronic texts.</sa>
+    <s2>local</s2>
+  </d655>
+  <d650 i1=" " i2="0">
+    <sa>Pirates</sa>
+    <sz>England</sz>
+    <sv>Early works to 1800.</sv>
+  </d650>
+  <d700 i1="1" i2=" ">
+    <sa>Walton, Thomas,</sa>
+    <sd>fl. 1583.</sd>
+    <s4>aut</s4>
+  </d700>
+  <d700 i1="1" i2=" ">
+    <sa>Arnold,</sa>
+    <sd>fl. 1583.</sd>
+    <s4>aut</s4>
+  </d700>
+  <d793 i1="0" i2=" ">
+    <sa>Early English books online</sa>
+  </d793>
+  <d852 i1=" " i2=" ">
+    <sa>MER</sa>
+    <sb>kmain</sb>
+  </d852>
+  <d852 i1=" " i2=" ">
+    <sa>SCB</sa>
+    <sb>nnet</sb>
+  </d852>
+  <d856 i1="4" i2="0">
+    <sz>Restricted to UC campuses</sz>
+    <sx>SCP UCSD</sx>
+    <su>http://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&amp;res_id=xri:eebo&amp;rft_val_fmt=&amp;rft_id=xri:eebo:image:16610</su>
+  </d856>
+  <d856 i1="4" i2="0">
+    <sz>Restricted to UC campuses</sz>
+    <sx>SCP UCSD</sx>
+    <su>http://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&amp;res_id=xri:eebo&amp;rft_val_fmt=&amp;rft_id=xri:eebo:image:16610</su>
+  </d856>
+  <d852 i1=" " i2=" ">
+    <sa>DVXL</sa>
+    <sb>ELECT-GEN</sb>
+    <sh>Internet</sh>
+  </d852>
+  <d852 i1=" " i2=" ">
+    <sa>LAGE</sa>
+    <sb>in</sb>
+    <s3>Online access</s3>
+  </d852>
+  <d856 i1="4" i2="0">
+    <sz>Restricted to UC campuses</sz>
+    <sx>SCP UCSD</sx>
+    <su>http://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&amp;res_id=xri:eebo&amp;rft_val_fmt=&amp;rft_id=xri:eebo:image:16610</su>
+  </d856>
+  <d856 i1="4" i2="0">
+    <sz>Restricted to UC campuses</sz>
+    <su>http://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&amp;res_id=xri:eebo&amp;rft_val_fmt=&amp;rft_id=xri:eebo:image:16610</su>
+    <sx>CDL</sx>
+  </d856>
+  <d830 i1=" " i2="0">
+    <sa>Early English books, 1475-1640 ;</sa>
+    <sv>1406:13.</sv>
+  </d830>
+  <d901 i1=" " i2=" ">
+    <sa>DVXL</sa>
+    <sb>002592301</sb>
+  </d901>
+</r>
+</collection>
diff --git a/test/tmarc8.xml.marc b/test/tmarc8.xml.marc
new file mode 100644 (file)
index 0000000..7a433b0
--- /dev/null
@@ -0,0 +1 @@
+02643nam^a2200469^^^4500001001400000005001700014006001900031007001500050008004100065035001500106037009000121040004500211100002300256245028100279246006300560246006300623260014400686300001100830500001300841500005700854500009300911500002501004500005701029510002401086530004201110533008901152655002901241650004301270700003601313700002801349793003101377852001501408852001401423856015401437856015401591852003001745852002801775856015401803856014901957830004702106901002002153\1eUCD-002592301\1e20061209034435.0\1em        d        \1ecr bn |||a|bb|\1e920330s1583    enk     s     000 0 eng d\1e  \1fa99851339eo\1e  \1faCL0036000039\1fbProQuest Information and Learning. 300 N. Zeeb Rd., Ann Arbor, MI 48106\1e  \1faCu-RivES\1fcCu-RivES\1fdCStRLIN\1fedcrb\1fdWaOLN\1e\1faClinton, Atkinson.\1e00\1faClinton, Purser & Arnold, to their countreymen wheresoeuer\1fh[electronic resource] :\1fbWherein is described by their own hands their vnfeigned penitence for their offences past: their patience in welcoming their death, & their duetiful minds towardes her most excellent Maiestie\1e\1faClinton, Purser & Arnold, to their countreymen wheresoever\1e\1faClinton, Purser & Arnold, to their countreymen wheresoever\1e  \1faLondon :\1fbImprinted by Iohn Wolfe and are to be sold [by W. Wright] at the middle shop in the Poultry, ioyning S. Mildreds Church,\1fc[1583?]\1e  \1fa[12] p\1e  \1faIn verse\1e  \1faThe first poem is signed: Thomas Walton alias Purser\1e  \1faClinton's full name and bookseller's name from, and publication date conjectured by, STC\1e  \1faSignatures: A⁴ B²\1e  \1faReproduction of the original in the Bodleian Library\1e\1faSTC (2nd ed.)\1fc5431\1e  \1faAlso issued in print and on microform\1e  \1faElectronic reproduction.\1fnMode of access: World Wide Web.\1fnRestricted to UC campuses\1e 7\1faElectronic texts.\1f2local\1e 0\1faPirates\1fzEngland\1fvEarly works to 1800.\1e\1faWalton, Thomas,\1fdfl. 1583.\1f4aut\1e\1faArnold,\1fdfl. 1583.\1f4aut\1e\1faEarly English books online\1e  \1faMER\1fbkmain\1e  \1faSCB\1fbnnet\1e40\1fzRestricted to UC campuses\1fxSCP UCSD\1fuhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610\1e40\1fzRestricted to UC campuses\1fxSCP UCSD\1fuhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610\1e  \1faDVXL\1fbELECT-GEN\1fhInternet\1e  \1faLAGE\1fbin\1f3Online access\1e40\1fzRestricted to UC campuses\1fxSCP UCSD\1fuhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610\1e40\1fzRestricted to UC campuses\1fuhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610\1fxCDL\1e 0\1faEarly English books, 1475-1640 ;\1fv1406:13.\1e  \1faDVXL\1fb002592301\1e\1d
\ No newline at end of file
diff --git a/test/tmarc9.xml b/test/tmarc9.xml
new file mode 100644 (file)
index 0000000..aaca7a6
--- /dev/null
@@ -0,0 +1,157 @@
+<collection xmlns="http://www.indexdata.com/MARC21/turboxml">
+<r>
+  <l>02075cas a22005055a 4500</l>
+  <c001>  2005336282</c001>
+  <c003>DLC</c003>
+  <c005>20070911033614.0</c005>
+  <c008>070910c20059999mr uu p      f0    0ara  </c008>
+  <d010 i1=" " i2=" ">
+    <sa>  2005336282</sa>
+  </d010>
+  <d012 i1=" " i2=" ">
+    <sa>-3-7-0709110002-p-----    </sa>
+  </d012>
+  <d035 i1=" " i2=" ">
+    <sa>(OCoLC)170490164</sa>
+  </d035>
+  <d906 i1=" " i2=" ">
+    <sa>7</sa>
+    <sb>und</sb>
+    <sc>serials</sc>
+    <sd>u</sd>
+    <se>ncip</se>
+    <sf>19</sf>
+    <sg>n-oclcserc</sg>
+  </d906>
+  <d040 i1=" " i2=" ">
+    <sa>DLC</sa>
+    <sc>DLC</sc>
+    <sd>DLC</sd>
+  </d040>
+  <d041 i1="0" i2=" ">
+    <sa>ara</sa>
+    <sa>fre</sa>
+  </d041>
+  <d042 i1=" " i2=" ">
+    <sa>lc</sa>
+  </d042>
+  <d043 i1=" " i2=" ">
+    <sa>f-mr---</sa>
+  </d043>
+  <d050 i1="0" i2="0">
+    <sa>IN PROCESS</sa>
+  </d050>
+  <d066 i1=" " i2=" ">
+    <sc>(3</sc>
+  </d066>
+  <d245 i1="0" i2="0">
+    <s6>880-01</s6>
+    <sa>Qaḍāʼ al-usrah :</sa>
+    <sb>majallah mutakhaṣṣiṣah /</sb>
+    <sc>Wizārat al-ʻAdl.</sc>
+  </d245>
+  <d246 i1="1" i2="3">
+    <sa>Justice de la famille</sa>
+  </d246>
+  <d246 i1="1" i2="3">
+    <s6>880-02</s6>
+    <sa>Majallat Qaḍāʼ al-usrah</sa>
+    <sf>&lt;2006&gt;</sf>
+  </d246>
+  <d260 i1=" " i2=" ">
+    <s6>880-03</s6>
+    <sa>al-Rabāṭ :</sa>
+    <sb>Jamʻīyat Nashr al-Maʻlūmah al-Qānūnīyah wa-al-Qaḍāʼīyah,</sb>
+    <sc>2005-</sc>
+  </d260>
+  <d300 i1=" " i2=" ">
+    <sa>v. :</sa>
+    <sb>ill. ;</sb>
+    <sc>24 cm.</sc>
+  </d300>
+  <d310 i1=" " i2=" ">
+    <sa>Irregular (semiannual)</sa>
+  </d310>
+  <d362 i1="0" i2=" ">
+    <s6>880-04</s6>
+    <sa>al-ʻAdad 1. (Yūlyūz 2005)-</sa>
+  </d362>
+  <d490 i1="0" i2=" ">
+    <s6>880-05</s6>
+    <sa>Manshūrāt Jamʻīyat Nashr al-Maʻlūmah al-Qānūnīyah wa-al-Qaḍāʼīyah</sa>
+  </d490>
+  <d500 i1=" " i2=" ">
+    <sa>Some issues have also a distinctive title.</sa>
+  </d500>
+  <d500 i1=" " i2=" ">
+    <sa>Latest issue consulted: al-ʻAdad 3. (Dujanbir 2006).</sa>
+  </d500>
+  <d546 i1=" " i2=" ">
+    <sa>Chiefly in Arabic; some French.</sa>
+  </d546>
+  <d650 i1=" " i2="0">
+    <sa>Domestic relations (Islamic law)</sa>
+    <sz>Morocco.</sz>
+  </d650>
+  <d650 i1=" " i2="0">
+    <sa>Divorce (Islamic law)</sa>
+  </d650>
+  <d650 i1=" " i2="0">
+    <sa>Marriage law</sa>
+    <sz>Morocco.</sz>
+  </d650>
+  <d650 i1=" " i2="0">
+    <sa>Law reports, digests, etc.</sa>
+    <sz>Morocco.</sz>
+  </d650>
+  <d710 i1="2" i2=" ">
+    <s6>880-06</s6>
+    <sa>Jamʻīyat Nashr al-Maʻlūmah al-Qānūnīyah wa-al-Qaḍāʼīyah.</sa>
+  </d710>
+  <d710 i1="1" i2=" ">
+    <s6>880-07</s6>
+    <sa>Morocco.</sa>
+    <sb>Wizārat al-ʻAdl.</sb>
+  </d710>
+  <d850 i1=" " i2=" ">
+    <sa>DLC</sa>
+  </d850>
+  <d880 i1="0" i2="0">
+    <s6>245-01/(3/r</s6>
+    <sa>قضاء الأسرة :</sa>
+    <sb>مجلة متخصصة /</sb>
+    <sc>وزارة العدل.</sc>
+  </d880>
+  <d880 i1="1" i2="3">
+    <s6>246-02/(3/r</s6>
+    <sa>مجلة قضاء الأسرة</sa>
+    <sf>&lt;2006&gt;</sf>
+  </d880>
+  <d880 i1=" " i2=" ">
+    <s6>260-03/(3/r</s6>
+    <sa>الرباط :</sa>
+    <sb>جمعية نشر المعلومة القانونية والقضائية،</sb>
+    <sc>2005-</sc>
+  </d880>
+  <d880 i1="0" i2=" ">
+    <s6>362-04/(3/r</s6>
+    <sa>العدد 1. (يوليوز 2005)-</sa>
+  </d880>
+  <d880 i1="0" i2=" ">
+    <s6>490-05/(3/r</s6>
+    <sa>منشورات جمعية نشر المعلومة القانونية والقضائية</sa>
+  </d880>
+  <d880 i1="2" i2=" ">
+    <s6>710-06/(3/r</s6>
+    <sa>جمعية نشر المعلومة القانونية والقضائية.</sa>
+  </d880>
+  <d880 i1="1" i2=" ">
+    <s6>710-07/(3/r</s6>
+    <sa>Morocco.</sa>
+    <sb>وزارة العدل.</sb>
+  </d880>
+  <d936 i1=" " i2=" ">
+    <sa>LC Cairo Office [we 45]</sa>
+  </d936>
+</r>
+</collection>
diff --git a/test/tmarc9.xml.marc b/test/tmarc9.xml.marc
new file mode 100644 (file)
index 0000000..9880e30
--- /dev/null
@@ -0,0 +1 @@
+02244cas a22005055a 4500001001300000003000400013005001700017008004100034010001700075012003100092035002100123906004500144040001800189041001300207042000700220043001200227050001500239066000700254245008700261246002600348246004900374260011100423300002500534310002700559362004400586490010100630500004700731500005800778546003600836650004700872650002600919650002700945650004100972710008801013710004201101850000801143880009001151880005601241880011501297880005201412880010501464880009101569880005001660936002801710\1e  2005336282\1eDLC\1e20070911033614.0\1e070910c20059999mr uu p      f0    0ara  \1e  \1fa  2005336282\1e  \1fa-3-7-0709110002-p-----    \1e  \1fa(OCoLC)170490164\1e  \1fa7\1fbund\1fcserials\1fdu\1fencip\1ff19\1fgn-oclcserc\1e  \1faDLC\1fcDLC\1fdDLC\1e\1faara\1fafre\1e  \1falc\1e  \1faf-mr---\1e00\1faIN PROCESS\1e  \1fc(3\1e00\1f6880-01\1faQaḍāʼ al-usrah :\1fbmajallah mutakhaṣṣiṣah /\1fcWizārat al-ʻAdl.\1e13\1faJustice de la famille\1e13\1f6880-02\1faMajallat Qaḍāʼ al-usrah\1ff<2006>\1e  \1f6880-03\1faal-Rabāṭ :\1fbJamʻīyat Nashr al-Maʻlūmah al-Qānūnīyah wa-al-Qaḍāʼīyah,\1fc2005-\1e  \1fav. :\1fbill. ;\1fc24 cm.\1e  \1faIrregular (semiannual)\1e\1f6880-04\1faal-ʻAdad 1. (Yūlyūz 2005)-\1e\1f6880-05\1faManshūrāt Jamʻīyat Nashr al-Maʻlūmah al-Qānūnīyah wa-al-Qaḍāʼīyah\1e  \1faSome issues have also a distinctive title.\1e  \1faLatest issue consulted: al-ʻAdad 3. (Dujanbir 2006).\1e  \1faChiefly in Arabic; some French.\1e 0\1faDomestic relations (Islamic law)\1fzMorocco.\1e 0\1faDivorce (Islamic law)\1e 0\1faMarriage law\1fzMorocco.\1e 0\1faLaw reports, digests, etc.\1fzMorocco.\1e\1f6880-06\1faJamʻīyat Nashr al-Maʻlūmah al-Qānūnīyah wa-al-Qaḍāʼīyah.\1e\1f6880-07\1faMorocco.\1fbWizārat al-ʻAdl.\1e  \1faDLC\1e00\1f6245-01/(3/r\1faقضاء الأسرة :\1fbمجلة متخصصة /\1fcوزارة العدل.\1e13\1f6246-02/(3/r\1faمجلة قضاء الأسرة\1ff<2006>\1e  \1f6260-03/(3/r\1faالرباط :\1fbجمعية نشر المعلومة القانونية والقضائية،\1fc2005-\1e\1f6362-04/(3/r\1faالعدد 1. (يوليوز 2005)-\1e\1f6490-05/(3/r\1faمنشورات جمعية نشر المعلومة القانونية والقضائية\1e\1f6710-06/(3/r\1faجمعية نشر المعلومة القانونية والقضائية.\1e\1f6710-07/(3/r\1faMorocco.\1fbوزارة العدل.\1e  \1faLC Cairo Office [we 45]\1e\1d
\ No newline at end of file
index ff0b686..9e4d119 100755 (executable)
@@ -2,7 +2,9 @@
 # Tests reading of ISO2709 and checks that we get identical MARCXML
 # 
 # Reads marc?.marc files , Generates marc*.xml files
-# If Libxml2 is present, the marc*.xml files are parsed again..
+# If Libxml2 is present, also turbomarc*xml. 
+# as well as reverse transformation from *marc*.xml files are parsed again.. 
+# 
 srcdir=${srcdir:-.}
 ecode=0
 
@@ -11,64 +13,92 @@ if test $? = "3"; then
     noxml=1
 fi
 
-for f in ${srcdir}/marc[0-9].marc; do
-    fb=`basename ${f} .marc`
-    CHR=${srcdir}/${fb}.chr
-    NEW=${fb}.new.xml
-    OLD=${srcdir}/${fb}.xml
-    DIFF=`basename ${f}`.diff
-    ../util/yaz-marcdump -f `cat $CHR` -t utf-8 -o marcxml $f > $NEW
-    if test $? != "0"; then
-       echo "$f: yaz-marcdump returned error"
-       ecode=1
-    elif test -f $OLD; then
-        if diff $OLD $NEW >$DIFF; then
-           rm $DIFF
-           rm $NEW
-       else
-           echo "$f: $NEW and $OLD differ"
-           ecode=1
-       fi
-    else
-       echo "$f: Making test result $OLD for the first time"
-       if test -x /usr/bin/xmllint; then
-           if xmllint --noout $NEW >out 2>stderr; then
-               echo "$f: $NEW is well-formed"
-               mv $NEW $OLD
-           else
-               echo "$f: $NEW not well-formed"
-               ecode=1
-           fi
-       else
-           echo "xmllint not found. install libxml2-utils"
-           ecode=1
-       fi
-    fi
+binmarc_convert() {  
+    OUTPUT_FORMAT="$1"
+    REVERT_FORMAT="$2"
+    PREFIX="$3"
+    for f in ${srcdir}/marc[0-9].marc; do
+        fb=`basename ${f} .marc`
+        CHR=`cat ${srcdir}/${fb}.chr`
+        NEW=${PREFIX}${fb}.new.xml
+        OLD=${srcdir}/${PREFIX}${fb}.xml
+        DIFF=`basename ${f}`.diff
+        #echo "../util/yaz-marcdump -f $CHR -t utf-8 -i marc -o ${OUTPUT_FORMAT} $f > $NEW"
+        ../util/yaz-marcdump -f $CHR -t utf-8 -i marc -o ${OUTPUT_FORMAT} $f > $NEW
+        if test $? != "0"; then
+                   echo "$f: yaz-marcdump returned error"
+           ecode=1
+        elif test -f $OLD; then
+            if diff $OLD $NEW >$DIFF; then
+               rm $DIFF
+               rm $NEW
+           else
+               echo "$f: $NEW and $OLD differ"
+               ecode=1
+           fi
+        else
+           echo "$f: Making test result $OLD for the first time"
+           if test -x /usr/bin/xmllint; then
+               if xmllint --noout $NEW >out 2>stderr; then
+                   echo "$f: $NEW is well-formed"
+                   mv $NEW $OLD
+               else
+                   echo "$f: $NEW not well-formed"
+                   ecode=1
+               fi
+           else
+               echo "xmllint not found. install libxml2-utils"
+               ecode=1
+           fi
+        fi
+       
+        if test -z "$noxml"; then
+           ORIGINAL=${f}
+           f=$OLD
+           # compare with original (binary) marc record.
+           OLD=${f}.marc
+           NEW=`basename ${f}`.new.marc
+           DIFF=`basename ${f}`.diff
+           #echo "../util/yaz-marcdump -f utf-8 -t utf-8 -i ${REVERT_FORMAT} -o marc $f > $NEW" 
+           ../util/yaz-marcdump -f utf-8 -t utf-8 -i ${REVERT_FORMAT} -o marc $f > $NEW
+           if test $? != "0"; then
+               echo "Failed decode of $f"
+               ecode=1
+           elif test -f $OLD; then
+               if diff $OLD $NEW >$DIFF; then
+                   rm $DIFF
+                   rm $NEW
+               else
+                   echo "$f: $NEW and $OLD Differ"
+                   ecode=1
+               fi
+           else
+               echo "$f: Making test result $OLD for the first time"
+               mv $NEW $OLD
+           fi
+           # check with original
+           REVERT=`basename ${f}`.marc.revert
+           #../util/yaz-marcdump -f utf-8 -t $CHR  -i ${REVERT_FORMAT} -o marc $f > $REVERT
+           #hexdump -cx $REVERT   > $REVERT.hex  
+           #hexdump -cx $ORIGINAL > $ORIGINAL.hex
+           #diff $REVERT.hex $ORIGINAL.hex > $REVERT.diff
+        fi
+    done
+    return $ecode
+}
+
+binmarc_convert "marcxml"  "marcxml" "" 
+echo "binmarc -> marcxml: $?" 
+
+binmarc_convert "xml,marcxml" "marcxml" "xml2" 
+echo "binmarc -> marcxml(libxml2): $?" 
+
+binmarc_convert "tmarcxml"  "tmarcxml" "t" 
+echo "binmarc -> tmarcxml: $?" 
+
+binmarc_convert "xml,tmarcxml"  "tmarcxml" "xml2t" 
+echo "binmarc -> tmarcxml(libxml2): $?" 
 
-    if test -z "$noxml"; then
-       f=$OLD
-       OLD=${f}.marc
-       NEW=`basename ${f}`.new.marc
-       DIFF=`basename ${f}`.diff
-       ../util/yaz-marcdump -f utf-8 -t utf-8 -i marcxml -o marc $f > $NEW
-       if test $? != "0"; then
-           echo "Failed decode of $f"
-           ecode=1
-       elif test -f $OLD; then
-           if diff $OLD $NEW >$DIFF; then
-               rm $DIFF
-               rm $NEW
-           else
-               echo "$f: $NEW and $OLD Differ"
-               ecode=1
-           fi
-       else
-           echo "$f: Making test result $OLD for the first time"
-           mv $NEW $OLD
-       fi
-    fi
-    
-done
 exit $ecode
 
 # Local Variables:
diff --git a/test/xml2marc1.xml b/test/xml2marc1.xml
new file mode 100644 (file)
index 0000000..b355e9f
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<record xmlns="http://www.loc.gov/MARC21/slim"><!--Length implementation at offset 22 should hold a digit. Assuming 0--><leader>00988nam0a32003011  450 </leader><datafield tag="001" ind1="0" ind2="0" ind3="0"><subfield code="a">9 181 423 4</subfield><subfield code="b">710100</subfield><subfield code="f">a</subfield></datafield><datafield tag="004" ind1="0" ind2="0" ind3="0"><subfield code="r">n</subfield><subfield code="a">e</subfield></datafield><datafield tag="008" ind1="0" ind2="0" ind3="0"><subfield code="t">m</subfield><subfield code="u">u</subfield><subfield code="a">2002</subfield><subfield code="b">us</subfield><subfield code="l">eng</subfield><subfield code="v">0</subfield></datafield><datafield tag="009" ind1="0" ind2="0" ind3="0"><subfield code="a">a</subfield><subfield code="g">xx</subfield></datafield><datafield tag="021" ind1="0" ind2="0" ind3="0"><subfield code="a">1-4000-4596-7</subfield><subfield code="d">$14,00</subfield></datafield><datafield tag="032" ind1="0" ind2="0" ind3="0"><subfield code="&amp;">DBC200439</subfield></datafield><datafield tag="100" ind1="0" ind2="0" ind3="0"><subfield code="0"></subfield><subfield code="a">Sloman</subfield><subfield code="h">Larry</subfield></datafield><datafield tag="245" ind1="0" ind2="0" ind3="0"><subfield code="a">On the road with Bob Dylan</subfield><subfield code="e">Larry "Ratso" Sloman</subfield></datafield><datafield tag="250" ind1="0" ind2="0" ind3="0"><subfield code="a">Revised edition</subfield><subfield code="b">Three Rivers Press</subfield></datafield><datafield tag="260" ind1="0" ind2="0" ind3="0"><subfield code="a">New York</subfield><subfield code="b">Three Rivers Press</subfield><subfield code="c">2002</subfield></datafield><datafield tag="300" ind1="0" ind2="0" ind3="0"><subfield code="a">xv, 464 sider, tavler</subfield></datafield><datafield tag="504" ind1="0" ind2="0" ind3="0"><subfield code="a">Larry "Ratso" Slomans meget personlige beretning om Bob Dylans koncertturne i USA i 1975: "The Rolling Thunder revue"</subfield></datafield><datafield tag="512" ind1="0" ind2="0" ind3="0"><subfield code="a">P&#xE5; omslaget: With a new introduction by Kinky Friedman</subfield></datafield><datafield tag="520" ind1="0" ind2="0" ind3="0"><subfield code="a">Tidligere: 1. udgave. New York, Bantam, 1978</subfield></datafield><datafield tag="652" ind1="0" ind2="0" ind3="0"><subfield code="0"></subfield><subfield code="m">99.4</subfield><subfield code="a">Dylan</subfield><subfield code="h">Bob</subfield></datafield><datafield tag="652" ind1="0" ind2="0" ind3="0"><subfield code="p">78.9064</subfield><subfield code="v">5</subfield></datafield><datafield tag="666" ind1="0" ind2="0" ind3="0"><subfield code="f">folkemusik</subfield></datafield><datafield tag="666" ind1="0" ind2="0" ind3="0"><subfield code="f">folkemusikere</subfield></datafield><datafield tag="666" ind1="0" ind2="0" ind3="0"><subfield code="f">rockmusik</subfield></datafield><datafield tag="666" ind1="0" ind2="0" ind3="0"><subfield code="f">rockmusikere</subfield></datafield><datafield tag="666" ind1="0" ind2="0" ind3="0"><subfield code="f">rockkoncerter</subfield></datafield><datafield tag="666" ind1="0" ind2="0" ind3="0"><subfield code="e">USA</subfield></datafield><datafield tag="666" ind1="0" ind2="0" ind3="0"><subfield code="i">1970-1979</subfield></datafield></record>
diff --git a/test/xml2marc1.xml.marc b/test/xml2marc1.xml.marc
new file mode 100644 (file)
index 0000000..efc7bdf
--- /dev/null
@@ -0,0 +1 @@
+00989nam0a32003011  450 001002800000004001000028008002800038009001100066021002700077032001500104100002100119245005400140250004100194260004000235300002700275504012300302512006100425520005000486652002400536652001600560666001600576666001900592666001500611666001800626666001900644666000900663666001500672\1e000\1fa9 181 423 4\1fb710100\1ffa\1e000\1frn\1fae\1e000\1ftm\1fuu\1fa2002\1fbus\1fleng\1fv0\1e000\1faa\1fgxx\1e000\1fa1-4000-4596-7\1fd$14,00\1e000\1f&DBC200439\1e000\1f0\1faSloman\1fhLarry\1e000\1faOn the road with Bob Dylan\1feLarry "Ratso" Sloman\1e000\1faRevised edition\1fbThree Rivers Press\1e000\1faNew York\1fbThree Rivers Press\1fc2002\1e000\1faxv, 464 sider, tavler\1e000\1faLarry "Ratso" Slomans meget personlige beretning om Bob Dylans koncertturne i USA i 1975: "The Rolling Thunder revue"\1e000\1faPå omslaget: With a new introduction by Kinky Friedman\1e000\1faTidligere: 1. udgave. New York, Bantam, 1978\1e000\1f0\1fm99.4\1faDylan\1fhBob\1e000\1fp78.9064\1fv5\1e000\1fffolkemusik\1e000\1fffolkemusikere\1e000\1ffrockmusik\1e000\1ffrockmusikere\1e000\1ffrockkoncerter\1e000\1feUSA\1e000\1fi1970-1979\1e\1d
\ No newline at end of file
diff --git a/test/xml2marc2.xml b/test/xml2marc2.xml
new file mode 100644 (file)
index 0000000..9252e5c
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<record xmlns="http://www.loc.gov/MARC21/slim"><!--Length implementation at offset 22 should hold a digit. Assuming 0--><leader>01116nam0a32002171  450 </leader><datafield tag="001" ind1="0" ind2="0" ind3="0"><subfield code="a">9 182 502 3</subfield><subfield code="b">710100</subfield><subfield code="f">a</subfield></datafield><datafield tag="004" ind1="0" ind2="0" ind3="0"><subfield code="r">c</subfield><subfield code="a">e</subfield></datafield><datafield tag="008" ind1="0" ind2="0" ind3="0"><subfield code="t">s</subfield><subfield code="u">f</subfield><subfield code="a">1995</subfield><subfield code="b">gb</subfield><subfield code="l">eng</subfield><subfield code="v">0</subfield></datafield><datafield tag="009" ind1="0" ind2="0" ind3="0"><subfield code="a">s</subfield><subfield code="g">xc</subfield></datafield><datafield tag="039" ind1="0" ind2="0" ind3="0"><subfield code="a">bef</subfield></datafield><datafield tag="100" ind1="0" ind2="0" ind3="0"><subfield code="a">Mimms</subfield><subfield code="h">Garnet</subfield></datafield><datafield tag="245" ind1="0" ind2="0" ind3="0"><subfield code="a">Cry baby</subfield><subfield code="a">Warm and soulful</subfield><subfield code="e">Garnet Mimms ... [et al.]</subfield></datafield><datafield tag="260" ind1="0" ind2="0" ind3="0"><subfield code="a">Bury St. Edmunds</subfield><subfield code="b">BGO</subfield><subfield code="c">1995</subfield></datafield><datafield tag="300" ind1="0" ind2="0" ind3="0"><subfield code="n">1 cd</subfield></datafield><datafield tag="512" ind1="0" ind2="0" ind3="0"><subfield code="a">Indspilninger publiceret 1963 (Cry baby) og 1965 (Warm and soulful)</subfield></datafield><datafield tag="531" ind1="0" ind2="0" ind3="0"><subfield code="a">Indhold:</subfield></datafield><datafield tag="538" ind1="0" ind2="0" ind3="0"><subfield code="f">BGO</subfield><subfield code="g">BGOCD268</subfield></datafield><datafield tag="652" ind1="0" ind2="0" ind3="0"><subfield code="m">78.794</subfield><subfield code="v">4</subfield></datafield><datafield tag="666" ind1="0" ind2="0" ind3="0"><subfield code="m">soul</subfield><subfield code="m">rhythm &amp; blues</subfield><subfield code="n">vokal</subfield><subfield code="p">1960-1969</subfield><subfield code="l">USA</subfield></datafield><datafield tag="795" ind1="0" ind2="0" ind3="0"><subfield code="&#xE5;">11</subfield><subfield code="a">Cry baby</subfield><subfield code="a">Nobody but you</subfield><subfield code="a">Until you were gone</subfield><subfield code="a">Anytime you want me</subfield><subfield code="a">So close</subfield><subfield code="a">For your precious love</subfield><subfield code="a">Baby don't you weep</subfield><subfield code="a">A &#xA4;quiet place</subfield><subfield code="a">Cry to me</subfield><subfield code="a">Don't change your heart</subfield><subfield code="a">Wanting you</subfield><subfield code="a">The &#xA4;truth hurts</subfield><subfield code="a">I'll take good care of you</subfield><subfield code="a">Looking for you</subfield><subfield code="a">It won't hurt (half as much)</subfield><subfield code="a">It was easier to hurt her</subfield><subfield code="a">Thinkin'</subfield><subfield code="a">Prove it to me</subfield><subfield code="a">More than a miracle</subfield><subfield code="a">As long as I have you</subfield><subfield code="a">One girl</subfield><subfield code="a">There goes my baby</subfield><subfield code="a">It's just a matter of time</subfield><subfield code="a">A &#xA4;little bit of soap</subfield><subfield code="a">Look away</subfield><subfield code="a">I'll make it up to you</subfield></datafield><datafield tag="795" ind1="0" ind2="0" ind3="0"><subfield code="&#xE5;">40</subfield><subfield code="y">0</subfield><subfield code="a">1 girl</subfield></datafield></record>
diff --git a/test/xml2marc2.xml.marc b/test/xml2marc2.xml.marc
new file mode 100644 (file)
index 0000000..106fce3
--- /dev/null
@@ -0,0 +1 @@
+01121nam0a32002171  450 001002800000004001000028008002800038009001100066039000900077100001900086245005900105260003300164300001000197512007300207531001400280538001900294652001500313666004900328795050600377795002000883\1e000\1fa9 182 502 3\1fb710100\1ffa\1e000\1frc\1fae\1e000\1fts\1fuf\1fa1995\1fbgb\1fleng\1fv0\1e000\1fas\1fgxc\1e000\1fabef\1e000\1faMimms\1fhGarnet\1e000\1faCry baby\1faWarm and soulful\1feGarnet Mimms ... [et al.]\1e000\1faBury St. Edmunds\1fbBGO\1fc1995\1e000\1fn1 cd\1e000\1faIndspilninger publiceret 1963 (Cry baby) og 1965 (Warm and soulful)\1e000\1faIndhold:\1e000\1ffBGO\1fgBGOCD268\1e000\1fm78.794\1fv4\1e000\1fmsoul\1fmrhythm & blues\1fnvokal\1fp1960-1969\1flUSA\1e000\1få11\1faCry baby\1faNobody but you\1faUntil you were gone\1faAnytime you want me\1faSo close\1faFor your precious love\1faBaby don't you weep\1faA ¤quiet place\1faCry to me\1faDon't change your heart\1faWanting you\1faThe ¤truth hurts\1faI'll take good care of you\1faLooking for you\1faIt won't hurt (half as much)\1faIt was easier to hurt her\1faThinkin'\1faProve it to me\1faMore than a miracle\1faAs long as I have you\1faOne girl\1faThere goes my baby\1faIt's just a matter of time\1faA ¤little bit of soap\1faLook away\1faI'll make it up to you\1e000\1få40\1fy0\1fa1 girl\1e\1d
\ No newline at end of file
diff --git a/test/xml2marc3.xml b/test/xml2marc3.xml
new file mode 100644 (file)
index 0000000..74de296
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<record xmlns="http://www.loc.gov/MARC21/slim"><!--Length implementation at offset 22 should hold a digit. Assuming 0--><leader>00914naa a2200337   450 </leader><datafield tag="001" ind1=" " ind2=" "><subfield code="a">a00001508</subfield><subfield code="f">a</subfield></datafield><datafield tag="004" ind1=" " ind2=" "><subfield code="a">i</subfield><subfield code="r">n</subfield></datafield><datafield tag="008" ind1=" " ind2=" "><subfield code="a">1991</subfield><subfield code="b">xx</subfield><subfield code="l">nor</subfield><subfield code="t">a</subfield><subfield code="v">9</subfield></datafield><datafield tag="009" ind1=" " ind2=" "><subfield code="a">a</subfield><subfield code="g">xx</subfield></datafield><datafield tag="041" ind1=" " ind2=" "><subfield code="a">nor</subfield></datafield><datafield tag="041" ind1=" " ind2=" "><subfield code="d">eng</subfield></datafield><datafield tag="097" ind1="0" ind2="0"><subfield code="a">06</subfield></datafield><datafield tag="245" ind1=" " ind2=" "><subfield code="a">Byfornyelse ved Ibsen-Ringen</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="b">farvefoto</subfield><subfield code="b">plan</subfield><subfield code="b">snit</subfield></datafield><datafield tag="557" ind1=" " ind2=" "><subfield code="a">Byggekunst</subfield><subfield code="j">1991</subfield><subfield code="v">1/2</subfield><subfield code="k">41-45</subfield></datafield><datafield tag="630" ind1=" " ind2=" "><subfield code="f">byfornyelse</subfield></datafield><datafield tag="630" ind1=" " ind2=" "><subfield code="f">sanering</subfield></datafield><datafield tag="633" ind1=" " ind2=" "><subfield code="f">Norge</subfield></datafield><datafield tag="633" ind1=" " ind2=" "><subfield code="f">Oslo</subfield></datafield><datafield tag="648" ind1=" " ind2=" "><subfield code="a">Telje Torp Aasen Arkitektkontor</subfield><subfield code="c">Kristian Augustsgate 7B</subfield></datafield><datafield tag="648" ind1=" " ind2=" "><subfield code="a">Eng, Dagfin</subfield></datafield><datafield tag="648" ind1=" " ind2=" "><subfield code="r">anlund, Tom</subfield><subfield code="c">Kristian Augustsgate</subfield><subfield code="c">Pilestredet 19</subfield></datafield><datafield tag="J01" ind1=" " ind2=" "><subfield code="a">a</subfield></datafield><datafield tag="BAS" ind1=" " ind2=" "><subfield code="0"></subfield></datafield><datafield tag="LKR" ind1=" " ind2=" "><subfield code="a">ITM</subfield><subfield code="l">ARK50</subfield><subfield code="b">0000145</subfield><subfield code="y">1991</subfield><subfield code="i">1/2</subfield><subfield code="k">41-45</subfield></datafield><datafield tag="CAT" ind1=" " ind2=" "><subfield code="a"></subfield><subfield code="b"></subfield><subfield code="c">20020111</subfield><subfield code="l">ARK01</subfield><subfield code="h">2002</subfield></datafield><datafield tag="CAT" ind1=" " ind2=" "><subfield code="a"></subfield><subfield code="b"></subfield><subfield code="c">20020111</subfield><subfield code="l">ARK01</subfield><subfield code="h">2116</subfield></datafield><datafield tag="CAT" ind1=" " ind2=" "><subfield code="a"></subfield><subfield code="b"></subfield><subfield code="c">20021002</subfield><subfield code="l">ARK01</subfield><subfield code="h">1000</subfield></datafield><datafield tag="CAT" ind1=" " ind2=" "><subfield code="a">ICLLOAD</subfield><subfield code="b">00</subfield><subfield code="c">20021122</subfield><subfield code="l">ARK01</subfield><subfield code="h">1948</subfield></datafield><datafield tag="CAT" ind1=" " ind2=" "><subfield code="c">20030618</subfield><subfield code="l">ARK01</subfield><subfield code="h">1330</subfield></datafield><datafield tag="UID" ind1=" " ind2=" "><subfield code="a">a00001508</subfield></datafield></record>
diff --git a/test/xml2marc3.xml.marc b/test/xml2marc3.xml.marc
new file mode 100644 (file)
index 0000000..64f2cef
--- /dev/null
@@ -0,0 +1 @@
+00914naa a2200337   450 001001700000004000900017008002400026009001000050041000800060041000800068097000700076245003300083300002600116557003300142630001600175630001300191633001000204633000900214648006100223648001600284648005400300J01000600354BAS000500360LKR004200365CAT003000407CAT003000437CAT003000467CAT003900497CAT002600536UID001400562\1e  \1faa00001508\1ffa\1e  \1fai\1frn\1e  \1fa1991\1fbxx\1flnor\1fta\1fv9\1e  \1faa\1fgxx\1e  \1fanor\1e  \1fdeng\1e00\1fa06\1e  \1faByfornyelse ved Ibsen-Ringen\1e  \1fbfarvefoto\1fbplan\1fbsnit\1e  \1faByggekunst\1fj1991\1fv1/2\1fk41-45\1e  \1ffbyfornyelse\1e  \1ffsanering\1e  \1ffNorge\1e  \1ffOslo\1e  \1faTelje Torp Aasen Arkitektkontor\1fcKristian Augustsgate 7B\1e  \1faEng, Dagfin\1e  \1franlund, Tom\1fcKristian Augustsgate\1fcPilestredet 19\1e  \1faa\1e  \1f0\1e  \1faITM\1flARK50\1fb0000145\1fy1991\1fi1/2\1fk41-45\1e  \1fa\1fb\1fc20020111\1flARK01\1fh2002\1e  \1fa\1fb\1fc20020111\1flARK01\1fh2116\1e  \1fa\1fb\1fc20021002\1flARK01\1fh1000\1e  \1faICLLOAD\1fb00\1fc20021122\1flARK01\1fh1948\1e  \1fc20030618\1flARK01\1fh1330\1e  \1faa00001508\1e\1d
\ No newline at end of file
diff --git a/test/xml2marc4.xml b/test/xml2marc4.xml
new file mode 100644 (file)
index 0000000..198946a
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<record xmlns="http://www.loc.gov/MARC21/slim"><!--Indicator length at offset 10 should hold a digit. Assuming 2--><!--Identifier length at offset 11 should hold a digit. Assuming 2--><!--Base address at offsets 12..16 should hold a number. Assuming 0--><!--Length implementation at offset 22 should hold a digit. Assuming 0--><leader>009140091a22a  22003370 </leader><!--Directory offset 24: Bad value for data length and/or length starting--><!--Base address not at end of directory, base 0, end 25--></record>
diff --git a/test/xml2marc4.xml.marc b/test/xml2marc4.xml.marc
new file mode 100644 (file)
index 0000000..9b3d907
--- /dev/null
@@ -0,0 +1 @@
+000260091a2200025003370 \1e\1d
\ No newline at end of file
diff --git a/test/xml2marc5.xml b/test/xml2marc5.xml
new file mode 100644 (file)
index 0000000..3202f12
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<record xmlns="http://www.loc.gov/MARC21/slim"><leader>00492nam a22001455a 4500</leader><controlfield tag="001">000277485</controlfield><controlfield tag="005">20051026111436.0</controlfield><controlfield tag="008">050413s1894    gr            000 0 gre d</controlfield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">&#x39C;&#x3B1;&#x3C1;&#x3BF;&#x3CD;&#x3B4;&#x3B7;&#x3C2;, &#x39A;&#x3C9;&#x3BD;&#x3C3;&#x3C4;&#x3B1;&#x3BD;&#x3C4;&#x3AF;&#x3BD;&#x3BF;&#x3C2; &#x399;&#x3C9;</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">&#x395;&#x3BB;&#x3BB;&#x3B7;&#x3BD;&#x3B9;&#x3BA;&#x3CC;&#x3BD; &#x3BA;&#x3C1;&#x3C5;&#x3C0;&#x3C4;&#x3BF;&#x3B3;&#x3C1;&#x3B1;&#x3C6;&#x3B9;&#x3BA;&#x3CC;&#x3BD; &#x3BB;&#x3B5;&#x3BE;&#x3B9;&#x3BA;&#x3CC;&#x3BD; /</subfield><subfield code="c">&#x39A;&#x3C9;&#x3BD;&#x3C3;&#x3C4;. &#x399;. &#x39C;&#x3B1;&#x3C1;&#x3BF;&#x3CD;&#x3B4;&#x3B7;&#x3C2;.</subfield></datafield><datafield tag="250" ind1=" " ind2=" "><subfield code="&#x3B7;"> &#x3B5;&#x3BA;&#x3B4;.</subfield></datafield><datafield tag="260" ind1=" " ind2=" "><subfield code="a">&#x391;&#x3B8;&#x3AE;&#x3BD;&#x3B1;,</subfield><subfield code="c">1894.</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">248 &#x3C3;&#x3B5;&#x3BB;.</subfield></datafield><datafield tag="650" ind1=" " ind2="0"><subfield code="a">Greek language, Modern</subfield><subfield code="x">Dialects</subfield><subfield code="v">Dictionaries</subfield></datafield><datafield tag="650" ind1=" " ind2="0"><subfield code="a">Cryptography.</subfield></datafield></record>
diff --git a/test/xml2marc5.xml.marc b/test/xml2marc5.xml.marc
new file mode 100644 (file)
index 0000000..50102a7
--- /dev/null
@@ -0,0 +1 @@
+00492nam a22001455a 4500001001000000005001700010008004100027100005200068245010400120250001400224260002300238300001600261650005100277650001800328\1e000277485\1e20051026111436.0\1e050413s1894    gr            000 0 gre d\1e\1faΜαρούδης, Κωνσταντίνος Ιω\1e10\1faΕλληνικόν κρυπτογραφικόν λεξικόν /\1fcΚωνστ. Ι. Μαρούδης.\1e  \1fη εκδ.\1e  \1faΑθήνα,\1fc1894.\1e  \1fa248 σελ.\1e 0\1faGreek language, Modern\1fxDialects\1fvDictionaries\1e 0\1faCryptography.\1e\1d
\ No newline at end of file
diff --git a/test/xml2marc6.xml b/test/xml2marc6.xml
new file mode 100644 (file)
index 0000000..911e2a5
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<record xmlns="http://www.loc.gov/MARC21/slim"><leader>00366nam a22001698a 4500</leader><controlfield tag="001">   11224466 </controlfield><controlfield tag="003">DLC</controlfield><controlfield tag="005">00000000000000.0</controlfield><controlfield tag="008">910710c19910701nju           00010 eng  </controlfield><datafield tag="010" ind1=" " ind2=" "><subfield code="a">   11224466 </subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">DLC</subfield><subfield code="c">DLC</subfield></datafield><datafield tag="050" ind1="0" ind2="0"><subfield code="a">123-xyz</subfield></datafield><datafield tag="100" ind1="1" ind2="0"><subfield code="a">Jack Collins</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">How to program a computer</subfield></datafield><datafield tag="260" ind1="1" ind2=" "><subfield code="a">Penguin</subfield></datafield><datafield tag="263" ind1=" " ind2=" "><subfield code="a">8710</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">p. cm.</subfield></datafield></record>
diff --git a/test/xml2marc6.xml.marc b/test/xml2marc6.xml.marc
new file mode 100644 (file)
index 0000000..400a01a
--- /dev/null
@@ -0,0 +1 @@
+00366nam a22001698a 4500001001300000003000400013005001700017008004100034010001700075040001300092050001200105100001700117245003000134260001200164263000900176300001100185\1e   11224466 \1eDLC\1e00000000000000.0\1e910710c19910701nju           00010 eng  \1e  \1fa   11224466 \1e  \1faDLC\1fcDLC\1e00\1fa123-xyz\1e10\1faJack Collins\1e10\1faHow to program a computer\1e\1faPenguin\1e  \1fa8710\1e  \1fap. cm.\1e\1d
\ No newline at end of file
diff --git a/test/xml2marc7.xml b/test/xml2marc7.xml
new file mode 100644 (file)
index 0000000..9c11aa6
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<record xmlns="http://www.loc.gov/MARC21/slim"><leader>03114cam a2200349 i 4500</leader><controlfield tag="001">   77123332 </controlfield><controlfield tag="003">DLC</controlfield><controlfield tag="005">20051218154744.0</controlfield><controlfield tag="008">981008b2001    ilu           000 0 eng  </controlfield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">57779</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">90490</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">93202</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">DLC</subfield><subfield code="c">DLC</subfield></datafield><datafield tag="906" ind1=" " ind2=" "><subfield code="a">0</subfield><subfield code="b">und</subfield><subfield code="c">orignew</subfield><subfield code="d">u</subfield><subfield code="e">ncip</subfield><subfield code="f">19</subfield><subfield code="g">y-gencatlg</subfield></datafield><datafield tag="010" ind1=" " ind2=" "><subfield code="a">   77123332 </subfield></datafield><datafield tag="245" ind1="0" ind2="0"><subfield code="a">Voyager Diacritic test -- New input 001 (SBIE).</subfield></datafield><datafield tag="260" ind1=" " ind2=" "><subfield code="a">ny :</subfield><subfield code="b">ny,</subfield><subfield code="c">2001.</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">100 p. ;</subfield><subfield code="c">12 cm.</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">New copy imported from file (8/12/99).</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">VOYAGER COLUMN 0  (NEW):  Degree sign (&#xB0;);  Phono Copyright mark (&#x2117;);  Copyright mark (&#xA9;);  Sharp (&#x266F;);  Inverted Question mark (&#xBF;);  Inverted Exclamation mark (&#xA1;).</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">VOYAGER COLUMN 1:  Script L (&#x2113;);  Polish L (&#x141;);  Scandanavian O (&#xD8;);  D with Crossbar (&#x110;);  Icelandic Thorn (&#xDE;);  AE Digraph (&#xC6;); OE Digraph (&#x152;);  Miagkii Znak (&#x2B9;);  Dot at Midline (&#xB7;).</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">VOYAGER COLUMN 2:  Musical Flat (&#x266D;);  Patent Mark (&#xAE;);  Plus or Minus (&#xB1;);  O Hook (&#x1A0;);  U Hook (&#x1AF;);  Alif (&#x2BC;);  alpha &#x3B1;;  Ayn (&#x2BB;);  Polish l (&#x142;).</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">VOYAGER COLUMN 3:  Scandanavian o (&#xF8;);  d with crossbar (&#x111;);  Icelandic Thorn (&#xFE;);  ae Digraph (&#xE6;);  oe Digraph (&#x153;);  Tverdii Znak (&#x2BA;);  Turkish i (&#x131;);  British Pound (&#xA3;);  eth (&#xF0;).</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">VOYAGER COLUMN 4:  Dagger (DO NOT USE);  o Hook (&#x1A1;);  u Hook (&#x1B0;);  Beta &#x3B2;;  Gamma &#x3B3;;  Superscript 0 (&#x2070;);  Superscript 1 (&#xB9;);  Superscript 2 (&#xB2;);  Superscript 3 (&#xB3;).</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">VOYAGER COLUMN 5:  Superscript 4 (&#x2074;);  Superscript 5 (&#x2075;);  Superscript 6 (&#x2076;);  Superscript 7 (&#x2077;);  Superscript 8 (&#x2078;);  Superscript 9 (&#x2079;);  Superscript + (&#x207A;);  Superscript - (&#x207B;);  Superscript ( (&#x207D;).</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">VOYAGER COLUMN 6:  Superscript ) (&#x207E;);  Subscript 0 (&#x2080;);  Subscript  1 (&#x2081;);  Subscript 2 (&#x2082;);  Subscript 3 (&#x2083;);  Subscript 4 (&#x2084;);  Subscript 5 (&#x2085;);  Subscript 6 (&#x2086;);  Subscript 7 (&#x2087;).</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">VOYAGER COLUMN 7:  Subscript 8 (&#x2088;);  Subscript 9 (&#x2089;);  Subscript + (&#x208A;);  Subscript - (&#x208B;);  Subscript ( (&#x208D;);  Subscript ) (&#x208E;);  Pseudo Question Mark (o&#x309;);  Grave (o&#x300;);  Acute (o&#x301;).</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">VOYAGER COLUMN 8:  Circumflex (o&#x302;);  Tilde (o&#x303;);  Macron (o&#x304;);  Breve (o&#x306;);  Superior Dot (o&#x307;);  Umlaut (o&#x308;);  Hacek (o&#x30C;);  Circle Above (o&#x30A;);  Ligature left (o&#x361;).</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">VOYAGER COLUMN 9:  Ligature right (o) ;  High Comma off center (o&#x315;);  Double Acute (o&#x30B;);  Candrabindu (o&#x310;);  Cedilla (o&#x327;);  Right Hook (o&#x328;);  Dot Below (o&#x323;);  Double Dot Below (o&#x324;);  Circle Below (o&#x325;).</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">VOYAGER COLUMN 10:  Double Underscore (o&#x333;);  Underscore (o&#x332;);  Left Hook (o&#x326;);  Right Cedilla (o&#x31C;);  Upadhmaniya (o&#x32E;);  Double Tilde 1st half (o&#x360;);  Double Tilde 2nd half (o) ;  High Comma centered (o&#x313;).</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">VOYAGER PC Keyboard:  Spacing Circumflex (^); Spacing Underscore (_); Spacing Grave (`); Open Curly Bracket ({); Close Curly Bracket (}); Spacing Tilde (~).</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">Standard PC Keyboard:   1234567890-=   !@#$%^&amp;*()_+   qwertyuiop[]\   QWERTYUIOP{}|   asdfghjkl;'  ASDFGHJKL:"   zxcvbnm,./   ZXCVBNM&lt;&gt;?</subfield></datafield></record>
diff --git a/test/xml2marc7.xml.marc b/test/xml2marc7.xml.marc
new file mode 100644 (file)
index 0000000..e6315df
--- /dev/null
@@ -0,0 +1 @@
+03109cam a2200349 i 4500001001300000003000400013005001700017008004100034035001000075035001000085035001000095040001300105906004500118010001700163245005200180260002100232300002100253500004300274500017600317500020000493500016100693500019500854500017801049500022001227500020501447500019901652500017701851500021402028500021502242500016102457500014102618\1e   77123332 \1eDLC\1e20051218154744.0\1e981008b2001    ilu           000 0 eng  \1e  \1fa57779\1e  \1fa90490\1e  \1fa93202\1e  \1faDLC\1fcDLC\1e  \1fa0\1fbund\1fcorignew\1fdu\1fencip\1ff19\1fgy-gencatlg\1e  \1fa   77123332 \1e00\1faVoyager Diacritic test -- New input 001 (SBIE).\1e  \1fany :\1fbny,\1fc2001.\1e  \1fa100 p. ;\1fc12 cm.\1e  \1faNew copy imported from file (8/12/99).\1e  \1faVOYAGER COLUMN 0  (NEW):  Degree sign (°);  Phono Copyright mark (℗);  Copyright mark (©);  Sharp (♯);  Inverted Question mark (¿);  Inverted Exclamation mark (¡).\1e  \1faVOYAGER COLUMN 1:  Script L (ℓ);  Polish L (Ł);  Scandanavian O (Ø);  D with Crossbar (Đ);  Icelandic Thorn (Þ);  AE Digraph (Æ); OE Digraph (Œ);  Miagkii Znak (ʹ);  Dot at Midline (·).\1e  \1faVOYAGER COLUMN 2:  Musical Flat (♭);  Patent Mark (®);  Plus or Minus (±);  O Hook (Ơ);  U Hook (Ư);  Alif (ʼ);  alpha α;  Ayn (ʻ);  Polish l (ł).\1e  \1faVOYAGER COLUMN 3:  Scandanavian o (ø);  d with crossbar (đ);  Icelandic Thorn (þ);  ae Digraph (æ);  oe Digraph (œ);  Tverdii Znak (ʺ);  Turkish i (ı);  British Pound (£);  eth (ð).\1e  \1faVOYAGER COLUMN 4:  Dagger (DO NOT USE);  o Hook (ơ);  u Hook (ư);  Beta β;  Gamma γ;  Superscript 0 (⁰);  Superscript 1 (¹);  Superscript 2 (²);  Superscript 3 (³).\1e  \1faVOYAGER COLUMN 5:  Superscript 4 (⁴);  Superscript 5 (⁵);  Superscript 6 (⁶);  Superscript 7 (⁷);  Superscript 8 (⁸);  Superscript 9 (⁹);  Superscript + (⁺);  Superscript - (⁻);  Superscript ( (⁽).\1e  \1faVOYAGER COLUMN 6:  Superscript ) (⁾);  Subscript 0 (₀);  Subscript  1 (₁);  Subscript 2 (₂);  Subscript 3 (₃);  Subscript 4 (₄);  Subscript 5 (₅);  Subscript 6 (₆);  Subscript 7 (₇).\1e  \1faVOYAGER COLUMN 7:  Subscript 8 (₈);  Subscript 9 (₉);  Subscript + (₊);  Subscript - (₋);  Subscript ( (₍);  Subscript ) (₎);  Pseudo Question Mark (ỏ);  Grave (ò);  Acute (ó).\1e  \1faVOYAGER COLUMN 8:  Circumflex (ô);  Tilde (õ);  Macron (ō);  Breve (ŏ);  Superior Dot (ȯ);  Umlaut (ö);  Hacek (ǒ);  Circle Above (o̊);  Ligature left (o͡).\1e  \1faVOYAGER COLUMN 9:  Ligature right (o) ;  High Comma off center (o̕);  Double Acute (ő);  Candrabindu (o̐);  Cedilla (o̧);  Right Hook (ǫ);  Dot Below (ọ);  Double Dot Below (o̤);  Circle Below (o̥).\1e  \1faVOYAGER COLUMN 10:  Double Underscore (o̳);  Underscore (o̲);  Left Hook (o̦);  Right Cedilla (o̜);  Upadhmaniya (o̮);  Double Tilde 1st half (o͠);  Double Tilde 2nd half (o) ;  High Comma centered (o̓).\1e  \1faVOYAGER PC Keyboard:  Spacing Circumflex (^); Spacing Underscore (_); Spacing Grave (`); Open Curly Bracket ({); Close Curly Bracket (}); Spacing Tilde (~).\1e  \1faStandard PC Keyboard:   1234567890-=   !@#$%^&*()_+   qwertyuiop[]\   QWERTYUIOP{}|   asdfghjkl;'  ASDFGHJKL:"   zxcvbnm,./   ZXCVBNM<>?\1e\1d
\ No newline at end of file
diff --git a/test/xml2marc8.xml b/test/xml2marc8.xml
new file mode 100644 (file)
index 0000000..721adc4
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<record xmlns="http://www.loc.gov/MARC21/slim"><leader>02647nam^a2200469^^^4500</leader><controlfield tag="001">UCD-002592301</controlfield><controlfield tag="005">20061209034435.0</controlfield><controlfield tag="006">m        d        </controlfield><controlfield tag="007">cr bn |||a|bb|</controlfield><controlfield tag="008">920330s1583    enk     s     000 0 eng d</controlfield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">99851339eo</subfield></datafield><datafield tag="037" ind1=" " ind2=" "><subfield code="a">CL0036000039</subfield><subfield code="b">ProQuest Information and Learning. 300 N. Zeeb Rd., Ann Arbor, MI 48106</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">Cu-RivES</subfield><subfield code="c">Cu-RivES</subfield><subfield code="d">CStRLIN</subfield><subfield code="e">dcrb</subfield><subfield code="d">WaOLN</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Clinton, Atkinson.</subfield></datafield><datafield tag="245" ind1="0" ind2="0"><subfield code="a">Clinton, Purser &amp; Arnold, to their countreymen wheresoeuer</subfield><subfield code="h">[electronic resource] :</subfield><subfield code="b">Wherein is described by their own hands their vnfeigned penitence for their offences past: their patience in welcoming their death, &amp; their duetiful minds towardes her most excellent Maiestie</subfield></datafield><datafield tag="246" ind1="2" ind2=" "><subfield code="a">Clinton, Purser &amp; Arnold, to their countreymen wheresoever</subfield></datafield><datafield tag="246" ind1="2" ind2=" "><subfield code="a">Clinton, Purser &amp; Arnold, to their countreymen wheresoever</subfield></datafield><datafield tag="260" ind1=" " ind2=" "><subfield code="a">London :</subfield><subfield code="b">Imprinted by Iohn Wolfe and are to be sold [by W. Wright] at the middle shop in the Poultry, ioyning S. Mildreds Church,</subfield><subfield code="c">[1583?]</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">[12] p</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">In verse</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">The first poem is signed: Thomas Walton alias Purser</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">Clinton's full name and bookseller's name from, and publication date conjectured by, STC</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">Signatures: A&#x2074; B&#xB2;</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">Reproduction of the original in the Bodleian Library</subfield></datafield><datafield tag="510" ind1="4" ind2=" "><subfield code="a">STC (2nd ed.)</subfield><subfield code="c">5431</subfield></datafield><datafield tag="530" ind1=" " ind2=" "><subfield code="a">Also issued in print and on microform</subfield></datafield><datafield tag="533" ind1=" " ind2=" "><subfield code="a">Electronic reproduction.</subfield><subfield code="n">Mode of access: World Wide Web.</subfield><subfield code="n">Restricted to UC campuses</subfield></datafield><datafield tag="655" ind1=" " ind2="7"><subfield code="a">Electronic texts.</subfield><subfield code="2">local</subfield></datafield><datafield tag="650" ind1=" " ind2="0"><subfield code="a">Pirates</subfield><subfield code="z">England</subfield><subfield code="v">Early works to 1800.</subfield></datafield><datafield tag="700" ind1="1" ind2=" "><subfield code="a">Walton, Thomas,</subfield><subfield code="d">fl. 1583.</subfield><subfield code="4">aut</subfield></datafield><datafield tag="700" ind1="1" ind2=" "><subfield code="a">Arnold,</subfield><subfield code="d">fl. 1583.</subfield><subfield code="4">aut</subfield></datafield><datafield tag="793" ind1="0" ind2=" "><subfield code="a">Early English books online</subfield></datafield><datafield tag="852" ind1=" " ind2=" "><subfield code="a">MER</subfield><subfield code="b">kmain</subfield></datafield><datafield tag="852" ind1=" " ind2=" "><subfield code="a">SCB</subfield><subfield code="b">nnet</subfield></datafield><datafield tag="856" ind1="4" ind2="0"><subfield code="z">Restricted to UC campuses</subfield><subfield code="x">SCP UCSD</subfield><subfield code="u">http://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&amp;res_id=xri:eebo&amp;rft_val_fmt=&amp;rft_id=xri:eebo:image:16610</subfield></datafield><datafield tag="856" ind1="4" ind2="0"><subfield code="z">Restricted to UC campuses</subfield><subfield code="x">SCP UCSD</subfield><subfield code="u">http://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&amp;res_id=xri:eebo&amp;rft_val_fmt=&amp;rft_id=xri:eebo:image:16610</subfield></datafield><datafield tag="852" ind1=" " ind2=" "><subfield code="a">DVXL</subfield><subfield code="b">ELECT-GEN</subfield><subfield code="h">Internet</subfield></datafield><datafield tag="852" ind1=" " ind2=" "><subfield code="a">LAGE</subfield><subfield code="b">in</subfield><subfield code="3">Online access</subfield></datafield><datafield tag="856" ind1="4" ind2="0"><subfield code="z">Restricted to UC campuses</subfield><subfield code="x">SCP UCSD</subfield><subfield code="u">http://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&amp;res_id=xri:eebo&amp;rft_val_fmt=&amp;rft_id=xri:eebo:image:16610</subfield></datafield><datafield tag="856" ind1="4" ind2="0"><subfield code="z">Restricted to UC campuses</subfield><subfield code="u">http://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&amp;res_id=xri:eebo&amp;rft_val_fmt=&amp;rft_id=xri:eebo:image:16610</subfield><subfield code="x">CDL</subfield></datafield><datafield tag="830" ind1=" " ind2="0"><subfield code="a">Early English books, 1475-1640 ;</subfield><subfield code="v">1406:13.</subfield></datafield><datafield tag="901" ind1=" " ind2=" "><subfield code="a">DVXL</subfield><subfield code="b">002592301</subfield></datafield></record>
diff --git a/test/xml2marc8.xml.marc b/test/xml2marc8.xml.marc
new file mode 100644 (file)
index 0000000..7a433b0
--- /dev/null
@@ -0,0 +1 @@
+02643nam^a2200469^^^4500001001400000005001700014006001900031007001500050008004100065035001500106037009000121040004500211100002300256245028100279246006300560246006300623260014400686300001100830500001300841500005700854500009300911500002501004500005701029510002401086530004201110533008901152655002901241650004301270700003601313700002801349793003101377852001501408852001401423856015401437856015401591852003001745852002801775856015401803856014901957830004702106901002002153\1eUCD-002592301\1e20061209034435.0\1em        d        \1ecr bn |||a|bb|\1e920330s1583    enk     s     000 0 eng d\1e  \1fa99851339eo\1e  \1faCL0036000039\1fbProQuest Information and Learning. 300 N. Zeeb Rd., Ann Arbor, MI 48106\1e  \1faCu-RivES\1fcCu-RivES\1fdCStRLIN\1fedcrb\1fdWaOLN\1e\1faClinton, Atkinson.\1e00\1faClinton, Purser & Arnold, to their countreymen wheresoeuer\1fh[electronic resource] :\1fbWherein is described by their own hands their vnfeigned penitence for their offences past: their patience in welcoming their death, & their duetiful minds towardes her most excellent Maiestie\1e\1faClinton, Purser & Arnold, to their countreymen wheresoever\1e\1faClinton, Purser & Arnold, to their countreymen wheresoever\1e  \1faLondon :\1fbImprinted by Iohn Wolfe and are to be sold [by W. Wright] at the middle shop in the Poultry, ioyning S. Mildreds Church,\1fc[1583?]\1e  \1fa[12] p\1e  \1faIn verse\1e  \1faThe first poem is signed: Thomas Walton alias Purser\1e  \1faClinton's full name and bookseller's name from, and publication date conjectured by, STC\1e  \1faSignatures: A⁴ B²\1e  \1faReproduction of the original in the Bodleian Library\1e\1faSTC (2nd ed.)\1fc5431\1e  \1faAlso issued in print and on microform\1e  \1faElectronic reproduction.\1fnMode of access: World Wide Web.\1fnRestricted to UC campuses\1e 7\1faElectronic texts.\1f2local\1e 0\1faPirates\1fzEngland\1fvEarly works to 1800.\1e\1faWalton, Thomas,\1fdfl. 1583.\1f4aut\1e\1faArnold,\1fdfl. 1583.\1f4aut\1e\1faEarly English books online\1e  \1faMER\1fbkmain\1e  \1faSCB\1fbnnet\1e40\1fzRestricted to UC campuses\1fxSCP UCSD\1fuhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610\1e40\1fzRestricted to UC campuses\1fxSCP UCSD\1fuhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610\1e  \1faDVXL\1fbELECT-GEN\1fhInternet\1e  \1faLAGE\1fbin\1f3Online access\1e40\1fzRestricted to UC campuses\1fxSCP UCSD\1fuhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610\1e40\1fzRestricted to UC campuses\1fuhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610\1fxCDL\1e 0\1faEarly English books, 1475-1640 ;\1fv1406:13.\1e  \1faDVXL\1fb002592301\1e\1d
\ No newline at end of file
diff --git a/test/xml2marc9.xml b/test/xml2marc9.xml
new file mode 100644 (file)
index 0000000..05b2236
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<record xmlns="http://www.loc.gov/MARC21/slim"><leader>02075cas a22005055a 4500</leader><controlfield tag="001">  2005336282</controlfield><controlfield tag="003">DLC</controlfield><controlfield tag="005">20070911033614.0</controlfield><controlfield tag="008">070910c20059999mr uu p      f0    0ara  </controlfield><datafield tag="010" ind1=" " ind2=" "><subfield code="a">  2005336282</subfield></datafield><datafield tag="012" ind1=" " ind2=" "><subfield code="a">-3-7-0709110002-p-----    </subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)170490164</subfield></datafield><datafield tag="906" ind1=" " ind2=" "><subfield code="a">7</subfield><subfield code="b">und</subfield><subfield code="c">serials</subfield><subfield code="d">u</subfield><subfield code="e">ncip</subfield><subfield code="f">19</subfield><subfield code="g">n-oclcserc</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">DLC</subfield><subfield code="c">DLC</subfield><subfield code="d">DLC</subfield></datafield><datafield tag="041" ind1="0" ind2=" "><subfield code="a">ara</subfield><subfield code="a">fre</subfield></datafield><datafield tag="042" ind1=" " ind2=" "><subfield code="a">lc</subfield></datafield><datafield tag="043" ind1=" " ind2=" "><subfield code="a">f-mr---</subfield></datafield><datafield tag="050" ind1="0" ind2="0"><subfield code="a">IN PROCESS</subfield></datafield><datafield tag="066" ind1=" " ind2=" "><subfield code="c">(3</subfield></datafield><datafield tag="245" ind1="0" ind2="0"><subfield code="6">880-01</subfield><subfield code="a">Qad&#x323;a&#x304;&#x2BC; al-usrah :</subfield><subfield code="b">majallah mutakhas&#x323;s&#x323;is&#x323;ah /</subfield><subfield code="c">Wiza&#x304;rat al-&#x2BB;Adl.</subfield></datafield><datafield tag="246" ind1="1" ind2="3"><subfield code="a">Justice de la famille</subfield></datafield><datafield tag="246" ind1="1" ind2="3"><subfield code="6">880-02</subfield><subfield code="a">Majallat Qad&#x323;a&#x304;&#x2BC; al-usrah</subfield><subfield code="f">&lt;2006&gt;</subfield></datafield><datafield tag="260" ind1=" " ind2=" "><subfield code="6">880-03</subfield><subfield code="a">al-Raba&#x304;t&#x323; :</subfield><subfield code="b">Jam&#x2BB;i&#x304;yat Nashr al-Ma&#x2BB;lu&#x304;mah al-Qa&#x304;nu&#x304;ni&#x304;yah wa-al-Qad&#x323;a&#x304;&#x2BC;i&#x304;yah,</subfield><subfield code="c">2005-</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">v. :</subfield><subfield code="b">ill. ;</subfield><subfield code="c">24 cm.</subfield></datafield><datafield tag="310" ind1=" " ind2=" "><subfield code="a">Irregular (semiannual)</subfield></datafield><datafield tag="362" ind1="0" ind2=" "><subfield code="6">880-04</subfield><subfield code="a">al-&#x2BB;Adad 1. (Yu&#x304;lyu&#x304;z 2005)-</subfield></datafield><datafield tag="490" ind1="0" ind2=" "><subfield code="6">880-05</subfield><subfield code="a">Manshu&#x304;ra&#x304;t Jam&#x2BB;i&#x304;yat Nashr al-Ma&#x2BB;lu&#x304;mah al-Qa&#x304;nu&#x304;ni&#x304;yah wa-al-Qad&#x323;a&#x304;&#x2BC;i&#x304;yah</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">Some issues have also a distinctive title.</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">Latest issue consulted: al-&#x2BB;Adad 3. (Dujanbir 2006).</subfield></datafield><datafield tag="546" ind1=" " ind2=" "><subfield code="a">Chiefly in Arabic; some French.</subfield></datafield><datafield tag="650" ind1=" " ind2="0"><subfield code="a">Domestic relations (Islamic law)</subfield><subfield code="z">Morocco.</subfield></datafield><datafield tag="650" ind1=" " ind2="0"><subfield code="a">Divorce (Islamic law)</subfield></datafield><datafield tag="650" ind1=" " ind2="0"><subfield code="a">Marriage law</subfield><subfield code="z">Morocco.</subfield></datafield><datafield tag="650" ind1=" " ind2="0"><subfield code="a">Law reports, digests, etc.</subfield><subfield code="z">Morocco.</subfield></datafield><datafield tag="710" ind1="2" ind2=" "><subfield code="6">880-06</subfield><subfield code="a">Jam&#x2BB;i&#x304;yat Nashr al-Ma&#x2BB;lu&#x304;mah al-Qa&#x304;nu&#x304;ni&#x304;yah wa-al-Qad&#x323;a&#x304;&#x2BC;i&#x304;yah.</subfield></datafield><datafield tag="710" ind1="1" ind2=" "><subfield code="6">880-07</subfield><subfield code="a">Morocco.</subfield><subfield code="b">Wiza&#x304;rat al-&#x2BB;Adl.</subfield></datafield><datafield tag="850" ind1=" " ind2=" "><subfield code="a">DLC</subfield></datafield><datafield tag="880" ind1="0" ind2="0"><subfield code="6">245-01/(3/r</subfield><subfield code="a">&#x642;&#x636;&#x627;&#x621; &#x627;&#x644;&#x623;&#x633;&#x631;&#x629; :</subfield><subfield code="b">&#x645;&#x62C;&#x644;&#x629; &#x645;&#x62A;&#x62E;&#x635;&#x635;&#x629; /</subfield><subfield code="c">&#x648;&#x632;&#x627;&#x631;&#x629; &#x627;&#x644;&#x639;&#x62F;&#x644;.</subfield></datafield><datafield tag="880" ind1="1" ind2="3"><subfield code="6">246-02/(3/r</subfield><subfield code="a">&#x645;&#x62C;&#x644;&#x629; &#x642;&#x636;&#x627;&#x621; &#x627;&#x644;&#x623;&#x633;&#x631;&#x629;</subfield><subfield code="f">&lt;2006&gt;</subfield></datafield><datafield tag="880" ind1=" " ind2=" "><subfield code="6">260-03/(3/r</subfield><subfield code="a">&#x627;&#x644;&#x631;&#x628;&#x627;&#x637; :</subfield><subfield code="b">&#x62C;&#x645;&#x639;&#x64A;&#x629; &#x646;&#x634;&#x631; &#x627;&#x644;&#x645;&#x639;&#x644;&#x648;&#x645;&#x629; &#x627;&#x644;&#x642;&#x627;&#x646;&#x648;&#x646;&#x64A;&#x629; &#x648;&#x627;&#x644;&#x642;&#x636;&#x627;&#x626;&#x64A;&#x629;&#x60C;</subfield><subfield code="c">2005-</subfield></datafield><datafield tag="880" ind1="0" ind2=" "><subfield code="6">362-04/(3/r</subfield><subfield code="a">&#x627;&#x644;&#x639;&#x62F;&#x62F; 1. (&#x64A;&#x648;&#x644;&#x64A;&#x648;&#x632; 2005)-</subfield></datafield><datafield tag="880" ind1="0" ind2=" "><subfield code="6">490-05/(3/r</subfield><subfield code="a">&#x645;&#x646;&#x634;&#x648;&#x631;&#x627;&#x62A; &#x62C;&#x645;&#x639;&#x64A;&#x629; &#x646;&#x634;&#x631; &#x627;&#x644;&#x645;&#x639;&#x644;&#x648;&#x645;&#x629; &#x627;&#x644;&#x642;&#x627;&#x646;&#x648;&#x646;&#x64A;&#x629; &#x648;&#x627;&#x644;&#x642;&#x636;&#x627;&#x626;&#x64A;&#x629;</subfield></datafield><datafield tag="880" ind1="2" ind2=" "><subfield code="6">710-06/(3/r</subfield><subfield code="a">&#x62C;&#x645;&#x639;&#x64A;&#x629; &#x646;&#x634;&#x631; &#x627;&#x644;&#x645;&#x639;&#x644;&#x648;&#x645;&#x629; &#x627;&#x644;&#x642;&#x627;&#x646;&#x648;&#x646;&#x64A;&#x629; &#x648;&#x627;&#x644;&#x642;&#x636;&#x627;&#x626;&#x64A;&#x629;.</subfield></datafield><datafield tag="880" ind1="1" ind2=" "><subfield code="6">710-07/(3/r</subfield><subfield code="a">Morocco.</subfield><subfield code="b">&#x648;&#x632;&#x627;&#x631;&#x629; &#x627;&#x644;&#x639;&#x62F;&#x644;.</subfield></datafield><datafield tag="936" ind1=" " ind2=" "><subfield code="a">LC Cairo Office [we 45]</subfield></datafield></record>
diff --git a/test/xml2marc9.xml.marc b/test/xml2marc9.xml.marc
new file mode 100644 (file)
index 0000000..9880e30
--- /dev/null
@@ -0,0 +1 @@
+02244cas a22005055a 4500001001300000003000400013005001700017008004100034010001700075012003100092035002100123906004500144040001800189041001300207042000700220043001200227050001500239066000700254245008700261246002600348246004900374260011100423300002500534310002700559362004400586490010100630500004700731500005800778546003600836650004700872650002600919650002700945650004100972710008801013710004201101850000801143880009001151880005601241880011501297880005201412880010501464880009101569880005001660936002801710\1e  2005336282\1eDLC\1e20070911033614.0\1e070910c20059999mr uu p      f0    0ara  \1e  \1fa  2005336282\1e  \1fa-3-7-0709110002-p-----    \1e  \1fa(OCoLC)170490164\1e  \1fa7\1fbund\1fcserials\1fdu\1fencip\1ff19\1fgn-oclcserc\1e  \1faDLC\1fcDLC\1fdDLC\1e\1faara\1fafre\1e  \1falc\1e  \1faf-mr---\1e00\1faIN PROCESS\1e  \1fc(3\1e00\1f6880-01\1faQaḍāʼ al-usrah :\1fbmajallah mutakhaṣṣiṣah /\1fcWizārat al-ʻAdl.\1e13\1faJustice de la famille\1e13\1f6880-02\1faMajallat Qaḍāʼ al-usrah\1ff<2006>\1e  \1f6880-03\1faal-Rabāṭ :\1fbJamʻīyat Nashr al-Maʻlūmah al-Qānūnīyah wa-al-Qaḍāʼīyah,\1fc2005-\1e  \1fav. :\1fbill. ;\1fc24 cm.\1e  \1faIrregular (semiannual)\1e\1f6880-04\1faal-ʻAdad 1. (Yūlyūz 2005)-\1e\1f6880-05\1faManshūrāt Jamʻīyat Nashr al-Maʻlūmah al-Qānūnīyah wa-al-Qaḍāʼīyah\1e  \1faSome issues have also a distinctive title.\1e  \1faLatest issue consulted: al-ʻAdad 3. (Dujanbir 2006).\1e  \1faChiefly in Arabic; some French.\1e 0\1faDomestic relations (Islamic law)\1fzMorocco.\1e 0\1faDivorce (Islamic law)\1e 0\1faMarriage law\1fzMorocco.\1e 0\1faLaw reports, digests, etc.\1fzMorocco.\1e\1f6880-06\1faJamʻīyat Nashr al-Maʻlūmah al-Qānūnīyah wa-al-Qaḍāʼīyah.\1e\1f6880-07\1faMorocco.\1fbWizārat al-ʻAdl.\1e  \1faDLC\1e00\1f6245-01/(3/r\1faقضاء الأسرة :\1fbمجلة متخصصة /\1fcوزارة العدل.\1e13\1f6246-02/(3/r\1faمجلة قضاء الأسرة\1ff<2006>\1e  \1f6260-03/(3/r\1faالرباط :\1fbجمعية نشر المعلومة القانونية والقضائية،\1fc2005-\1e\1f6362-04/(3/r\1faالعدد 1. (يوليوز 2005)-\1e\1f6490-05/(3/r\1faمنشورات جمعية نشر المعلومة القانونية والقضائية\1e\1f6710-06/(3/r\1faجمعية نشر المعلومة القانونية والقضائية.\1e\1f6710-07/(3/r\1faMorocco.\1fbوزارة العدل.\1e  \1faLC Cairo Office [we 45]\1e\1d
\ No newline at end of file
diff --git a/test/xml2tmarc1.xml b/test/xml2tmarc1.xml
new file mode 100644 (file)
index 0000000..b7a3def
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<r xmlns="http://www.indexdata.com/MARC21/turboxml"><!--Length implementation at offset 22 should hold a digit. Assuming 0--><l>00988nam0a32003011  450 </l><d001 i1="0" i2="0" i3="0"><sa>9 181 423 4</sa><sb>710100</sb><sf>a</sf></d001><d004 i1="0" i2="0" i3="0"><sr>n</sr><sa>e</sa></d004><d008 i1="0" i2="0" i3="0"><st>m</st><su>u</su><sa>2002</sa><sb>us</sb><sl>eng</sl><sv>0</sv></d008><d009 i1="0" i2="0" i3="0"><sa>a</sa><sg>xx</sg></d009><d021 i1="0" i2="0" i3="0"><sa>1-4000-4596-7</sa><sd>$14,00</sd></d021><d032 i1="0" i2="0" i3="0"><s code="&amp;">DBC200439</s></d032><d100 i1="0" i2="0" i3="0"><s0></s0><sa>Sloman</sa><sh>Larry</sh></d100><d245 i1="0" i2="0" i3="0"><sa>On the road with Bob Dylan</sa><se>Larry "Ratso" Sloman</se></d245><d250 i1="0" i2="0" i3="0"><sa>Revised edition</sa><sb>Three Rivers Press</sb></d250><d260 i1="0" i2="0" i3="0"><sa>New York</sa><sb>Three Rivers Press</sb><sc>2002</sc></d260><d300 i1="0" i2="0" i3="0"><sa>xv, 464 sider, tavler</sa></d300><d504 i1="0" i2="0" i3="0"><sa>Larry "Ratso" Slomans meget personlige beretning om Bob Dylans koncertturne i USA i 1975: "The Rolling Thunder revue"</sa></d504><d512 i1="0" i2="0" i3="0"><sa>P&#xE5; omslaget: With a new introduction by Kinky Friedman</sa></d512><d520 i1="0" i2="0" i3="0"><sa>Tidligere: 1. udgave. New York, Bantam, 1978</sa></d520><d652 i1="0" i2="0" i3="0"><s0></s0><sm>99.4</sm><sa>Dylan</sa><sh>Bob</sh></d652><d652 i1="0" i2="0" i3="0"><sp>78.9064</sp><sv>5</sv></d652><d666 i1="0" i2="0" i3="0"><sf>folkemusik</sf></d666><d666 i1="0" i2="0" i3="0"><sf>folkemusikere</sf></d666><d666 i1="0" i2="0" i3="0"><sf>rockmusik</sf></d666><d666 i1="0" i2="0" i3="0"><sf>rockmusikere</sf></d666><d666 i1="0" i2="0" i3="0"><sf>rockkoncerter</sf></d666><d666 i1="0" i2="0" i3="0"><se>USA</se></d666><d666 i1="0" i2="0" i3="0"><si>1970-1979</si></d666></r>
diff --git a/test/xml2tmarc1.xml.marc b/test/xml2tmarc1.xml.marc
new file mode 100644 (file)
index 0000000..efc7bdf
--- /dev/null
@@ -0,0 +1 @@
+00989nam0a32003011  450 001002800000004001000028008002800038009001100066021002700077032001500104100002100119245005400140250004100194260004000235300002700275504012300302512006100425520005000486652002400536652001600560666001600576666001900592666001500611666001800626666001900644666000900663666001500672\1e000\1fa9 181 423 4\1fb710100\1ffa\1e000\1frn\1fae\1e000\1ftm\1fuu\1fa2002\1fbus\1fleng\1fv0\1e000\1faa\1fgxx\1e000\1fa1-4000-4596-7\1fd$14,00\1e000\1f&DBC200439\1e000\1f0\1faSloman\1fhLarry\1e000\1faOn the road with Bob Dylan\1feLarry "Ratso" Sloman\1e000\1faRevised edition\1fbThree Rivers Press\1e000\1faNew York\1fbThree Rivers Press\1fc2002\1e000\1faxv, 464 sider, tavler\1e000\1faLarry "Ratso" Slomans meget personlige beretning om Bob Dylans koncertturne i USA i 1975: "The Rolling Thunder revue"\1e000\1faPå omslaget: With a new introduction by Kinky Friedman\1e000\1faTidligere: 1. udgave. New York, Bantam, 1978\1e000\1f0\1fm99.4\1faDylan\1fhBob\1e000\1fp78.9064\1fv5\1e000\1fffolkemusik\1e000\1fffolkemusikere\1e000\1ffrockmusik\1e000\1ffrockmusikere\1e000\1ffrockkoncerter\1e000\1feUSA\1e000\1fi1970-1979\1e\1d
\ No newline at end of file
diff --git a/test/xml2tmarc2.xml b/test/xml2tmarc2.xml
new file mode 100644 (file)
index 0000000..bb448af
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<r xmlns="http://www.indexdata.com/MARC21/turboxml"><!--Length implementation at offset 22 should hold a digit. Assuming 0--><l>01116nam0a32002171  450 </l><d001 i1="0" i2="0" i3="0"><sa>9 182 502 3</sa><sb>710100</sb><sf>a</sf></d001><d004 i1="0" i2="0" i3="0"><sr>c</sr><sa>e</sa></d004><d008 i1="0" i2="0" i3="0"><st>s</st><su>f</su><sa>1995</sa><sb>gb</sb><sl>eng</sl><sv>0</sv></d008><d009 i1="0" i2="0" i3="0"><sa>s</sa><sg>xc</sg></d009><d039 i1="0" i2="0" i3="0"><sa>bef</sa></d039><d100 i1="0" i2="0" i3="0"><sa>Mimms</sa><sh>Garnet</sh></d100><d245 i1="0" i2="0" i3="0"><sa>Cry baby</sa><sa>Warm and soulful</sa><se>Garnet Mimms ... [et al.]</se></d245><d260 i1="0" i2="0" i3="0"><sa>Bury St. Edmunds</sa><sb>BGO</sb><sc>1995</sc></d260><d300 i1="0" i2="0" i3="0"><sn>1 cd</sn></d300><d512 i1="0" i2="0" i3="0"><sa>Indspilninger publiceret 1963 (Cry baby) og 1965 (Warm and soulful)</sa></d512><d531 i1="0" i2="0" i3="0"><sa>Indhold:</sa></d531><d538 i1="0" i2="0" i3="0"><sf>BGO</sf><sg>BGOCD268</sg></d538><d652 i1="0" i2="0" i3="0"><sm>78.794</sm><sv>4</sv></d652><d666 i1="0" i2="0" i3="0"><sm>soul</sm><sm>rhythm &amp; blues</sm><sn>vokal</sn><sp>1960-1969</sp><sl>USA</sl></d666><d795 i1="0" i2="0" i3="0"><s code="&#xE5;">11</s><sa>Cry baby</sa><sa>Nobody but you</sa><sa>Until you were gone</sa><sa>Anytime you want me</sa><sa>So close</sa><sa>For your precious love</sa><sa>Baby don't you weep</sa><sa>A &#xA4;quiet place</sa><sa>Cry to me</sa><sa>Don't change your heart</sa><sa>Wanting you</sa><sa>The &#xA4;truth hurts</sa><sa>I'll take good care of you</sa><sa>Looking for you</sa><sa>It won't hurt (half as much)</sa><sa>It was easier to hurt her</sa><sa>Thinkin'</sa><sa>Prove it to me</sa><sa>More than a miracle</sa><sa>As long as I have you</sa><sa>One girl</sa><sa>There goes my baby</sa><sa>It's just a matter of time</sa><sa>A &#xA4;little bit of soap</sa><sa>Look away</sa><sa>I'll make it up to you</sa></d795><d795 i1="0" i2="0" i3="0"><s code="&#xE5;">40</s><sy>0</sy><sa>1 girl</sa></d795></r>
diff --git a/test/xml2tmarc2.xml.marc b/test/xml2tmarc2.xml.marc
new file mode 100644 (file)
index 0000000..106fce3
--- /dev/null
@@ -0,0 +1 @@
+01121nam0a32002171  450 001002800000004001000028008002800038009001100066039000900077100001900086245005900105260003300164300001000197512007300207531001400280538001900294652001500313666004900328795050600377795002000883\1e000\1fa9 182 502 3\1fb710100\1ffa\1e000\1frc\1fae\1e000\1fts\1fuf\1fa1995\1fbgb\1fleng\1fv0\1e000\1fas\1fgxc\1e000\1fabef\1e000\1faMimms\1fhGarnet\1e000\1faCry baby\1faWarm and soulful\1feGarnet Mimms ... [et al.]\1e000\1faBury St. Edmunds\1fbBGO\1fc1995\1e000\1fn1 cd\1e000\1faIndspilninger publiceret 1963 (Cry baby) og 1965 (Warm and soulful)\1e000\1faIndhold:\1e000\1ffBGO\1fgBGOCD268\1e000\1fm78.794\1fv4\1e000\1fmsoul\1fmrhythm & blues\1fnvokal\1fp1960-1969\1flUSA\1e000\1få11\1faCry baby\1faNobody but you\1faUntil you were gone\1faAnytime you want me\1faSo close\1faFor your precious love\1faBaby don't you weep\1faA ¤quiet place\1faCry to me\1faDon't change your heart\1faWanting you\1faThe ¤truth hurts\1faI'll take good care of you\1faLooking for you\1faIt won't hurt (half as much)\1faIt was easier to hurt her\1faThinkin'\1faProve it to me\1faMore than a miracle\1faAs long as I have you\1faOne girl\1faThere goes my baby\1faIt's just a matter of time\1faA ¤little bit of soap\1faLook away\1faI'll make it up to you\1e000\1få40\1fy0\1fa1 girl\1e\1d
\ No newline at end of file
diff --git a/test/xml2tmarc3.xml b/test/xml2tmarc3.xml
new file mode 100644 (file)
index 0000000..beff0bc
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<r xmlns="http://www.indexdata.com/MARC21/turboxml"><!--Length implementation at offset 22 should hold a digit. Assuming 0--><l>00914naa a2200337   450 </l><d001 i1=" " i2=" "><sa>a00001508</sa><sf>a</sf></d001><d004 i1=" " i2=" "><sa>i</sa><sr>n</sr></d004><d008 i1=" " i2=" "><sa>1991</sa><sb>xx</sb><sl>nor</sl><st>a</st><sv>9</sv></d008><d009 i1=" " i2=" "><sa>a</sa><sg>xx</sg></d009><d041 i1=" " i2=" "><sa>nor</sa></d041><d041 i1=" " i2=" "><sd>eng</sd></d041><d097 i1="0" i2="0"><sa>06</sa></d097><d245 i1=" " i2=" "><sa>Byfornyelse ved Ibsen-Ringen</sa></d245><d300 i1=" " i2=" "><sb>farvefoto</sb><sb>plan</sb><sb>snit</sb></d300><d557 i1=" " i2=" "><sa>Byggekunst</sa><sj>1991</sj><sv>1/2</sv><sk>41-45</sk></d557><d630 i1=" " i2=" "><sf>byfornyelse</sf></d630><d630 i1=" " i2=" "><sf>sanering</sf></d630><d633 i1=" " i2=" "><sf>Norge</sf></d633><d633 i1=" " i2=" "><sf>Oslo</sf></d633><d648 i1=" " i2=" "><sa>Telje Torp Aasen Arkitektkontor</sa><sc>Kristian Augustsgate 7B</sc></d648><d648 i1=" " i2=" "><sa>Eng, Dagfin</sa></d648><d648 i1=" " i2=" "><sr>anlund, Tom</sr><sc>Kristian Augustsgate</sc><sc>Pilestredet 19</sc></d648><dJ01 i1=" " i2=" "><sa>a</sa></dJ01><dBAS i1=" " i2=" "><s0></s0></dBAS><dLKR i1=" " i2=" "><sa>ITM</sa><sl>ARK50</sl><sb>0000145</sb><sy>1991</sy><si>1/2</si><sk>41-45</sk></dLKR><dCAT i1=" " i2=" "><sa></sa><sb></sb><sc>20020111</sc><sl>ARK01</sl><sh>2002</sh></dCAT><dCAT i1=" " i2=" "><sa></sa><sb></sb><sc>20020111</sc><sl>ARK01</sl><sh>2116</sh></dCAT><dCAT i1=" " i2=" "><sa></sa><sb></sb><sc>20021002</sc><sl>ARK01</sl><sh>1000</sh></dCAT><dCAT i1=" " i2=" "><sa>ICLLOAD</sa><sb>00</sb><sc>20021122</sc><sl>ARK01</sl><sh>1948</sh></dCAT><dCAT i1=" " i2=" "><sc>20030618</sc><sl>ARK01</sl><sh>1330</sh></dCAT><dUID i1=" " i2=" "><sa>a00001508</sa></dUID></r>
diff --git a/test/xml2tmarc3.xml.marc b/test/xml2tmarc3.xml.marc
new file mode 100644 (file)
index 0000000..64f2cef
--- /dev/null
@@ -0,0 +1 @@
+00914naa a2200337   450 001001700000004000900017008002400026009001000050041000800060041000800068097000700076245003300083300002600116557003300142630001600175630001300191633001000204633000900214648006100223648001600284648005400300J01000600354BAS000500360LKR004200365CAT003000407CAT003000437CAT003000467CAT003900497CAT002600536UID001400562\1e  \1faa00001508\1ffa\1e  \1fai\1frn\1e  \1fa1991\1fbxx\1flnor\1fta\1fv9\1e  \1faa\1fgxx\1e  \1fanor\1e  \1fdeng\1e00\1fa06\1e  \1faByfornyelse ved Ibsen-Ringen\1e  \1fbfarvefoto\1fbplan\1fbsnit\1e  \1faByggekunst\1fj1991\1fv1/2\1fk41-45\1e  \1ffbyfornyelse\1e  \1ffsanering\1e  \1ffNorge\1e  \1ffOslo\1e  \1faTelje Torp Aasen Arkitektkontor\1fcKristian Augustsgate 7B\1e  \1faEng, Dagfin\1e  \1franlund, Tom\1fcKristian Augustsgate\1fcPilestredet 19\1e  \1faa\1e  \1f0\1e  \1faITM\1flARK50\1fb0000145\1fy1991\1fi1/2\1fk41-45\1e  \1fa\1fb\1fc20020111\1flARK01\1fh2002\1e  \1fa\1fb\1fc20020111\1flARK01\1fh2116\1e  \1fa\1fb\1fc20021002\1flARK01\1fh1000\1e  \1faICLLOAD\1fb00\1fc20021122\1flARK01\1fh1948\1e  \1fc20030618\1flARK01\1fh1330\1e  \1faa00001508\1e\1d
\ No newline at end of file
diff --git a/test/xml2tmarc4.xml b/test/xml2tmarc4.xml
new file mode 100644 (file)
index 0000000..e14a717
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<r xmlns="http://www.indexdata.com/MARC21/turboxml"><!--Indicator length at offset 10 should hold a digit. Assuming 2--><!--Identifier length at offset 11 should hold a digit. Assuming 2--><!--Base address at offsets 12..16 should hold a number. Assuming 0--><!--Length implementation at offset 22 should hold a digit. Assuming 0--><l>009140091a22a  22003370 </l><!--Directory offset 24: Bad value for data length and/or length starting--><!--Base address not at end of directory, base 0, end 25--></r>
diff --git a/test/xml2tmarc4.xml.marc b/test/xml2tmarc4.xml.marc
new file mode 100644 (file)
index 0000000..9b3d907
--- /dev/null
@@ -0,0 +1 @@
+000260091a2200025003370 \1e\1d
\ No newline at end of file
diff --git a/test/xml2tmarc5.xml b/test/xml2tmarc5.xml
new file mode 100644 (file)
index 0000000..ce6cbfe
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<r xmlns="http://www.indexdata.com/MARC21/turboxml"><l>00492nam a22001455a 4500</l><c001>000277485</c001><c005>20051026111436.0</c005><c008>050413s1894    gr            000 0 gre d</c008><d100 i1="1" i2=" "><sa>&#x39C;&#x3B1;&#x3C1;&#x3BF;&#x3CD;&#x3B4;&#x3B7;&#x3C2;, &#x39A;&#x3C9;&#x3BD;&#x3C3;&#x3C4;&#x3B1;&#x3BD;&#x3C4;&#x3AF;&#x3BD;&#x3BF;&#x3C2; &#x399;&#x3C9;</sa></d100><d245 i1="1" i2="0"><sa>&#x395;&#x3BB;&#x3BB;&#x3B7;&#x3BD;&#x3B9;&#x3BA;&#x3CC;&#x3BD; &#x3BA;&#x3C1;&#x3C5;&#x3C0;&#x3C4;&#x3BF;&#x3B3;&#x3C1;&#x3B1;&#x3C6;&#x3B9;&#x3BA;&#x3CC;&#x3BD; &#x3BB;&#x3B5;&#x3BE;&#x3B9;&#x3BA;&#x3CC;&#x3BD; /</sa><sc>&#x39A;&#x3C9;&#x3BD;&#x3C3;&#x3C4;. &#x399;. &#x39C;&#x3B1;&#x3C1;&#x3BF;&#x3CD;&#x3B4;&#x3B7;&#x3C2;.</sc></d245><d250 i1=" " i2=" "><s code="&#x3B7;"> &#x3B5;&#x3BA;&#x3B4;.</s></d250><d260 i1=" " i2=" "><sa>&#x391;&#x3B8;&#x3AE;&#x3BD;&#x3B1;,</sa><sc>1894.</sc></d260><d300 i1=" " i2=" "><sa>248 &#x3C3;&#x3B5;&#x3BB;.</sa></d300><d650 i1=" " i2="0"><sa>Greek language, Modern</sa><sx>Dialects</sx><sv>Dictionaries</sv></d650><d650 i1=" " i2="0"><sa>Cryptography.</sa></d650></r>
diff --git a/test/xml2tmarc5.xml.marc b/test/xml2tmarc5.xml.marc
new file mode 100644 (file)
index 0000000..50102a7
--- /dev/null
@@ -0,0 +1 @@
+00492nam a22001455a 4500001001000000005001700010008004100027100005200068245010400120250001400224260002300238300001600261650005100277650001800328\1e000277485\1e20051026111436.0\1e050413s1894    gr            000 0 gre d\1e\1faΜαρούδης, Κωνσταντίνος Ιω\1e10\1faΕλληνικόν κρυπτογραφικόν λεξικόν /\1fcΚωνστ. Ι. Μαρούδης.\1e  \1fη εκδ.\1e  \1faΑθήνα,\1fc1894.\1e  \1fa248 σελ.\1e 0\1faGreek language, Modern\1fxDialects\1fvDictionaries\1e 0\1faCryptography.\1e\1d
\ No newline at end of file
diff --git a/test/xml2tmarc6.xml b/test/xml2tmarc6.xml
new file mode 100644 (file)
index 0000000..8ff71ef
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<r xmlns="http://www.indexdata.com/MARC21/turboxml"><l>00366nam a22001698a 4500</l><c001>   11224466 </c001><c003>DLC</c003><c005>00000000000000.0</c005><c008>910710c19910701nju           00010 eng  </c008><d010 i1=" " i2=" "><sa>   11224466 </sa></d010><d040 i1=" " i2=" "><sa>DLC</sa><sc>DLC</sc></d040><d050 i1="0" i2="0"><sa>123-xyz</sa></d050><d100 i1="1" i2="0"><sa>Jack Collins</sa></d100><d245 i1="1" i2="0"><sa>How to program a computer</sa></d245><d260 i1="1" i2=" "><sa>Penguin</sa></d260><d263 i1=" " i2=" "><sa>8710</sa></d263><d300 i1=" " i2=" "><sa>p. cm.</sa></d300></r>
diff --git a/test/xml2tmarc6.xml.marc b/test/xml2tmarc6.xml.marc
new file mode 100644 (file)
index 0000000..400a01a
--- /dev/null
@@ -0,0 +1 @@
+00366nam a22001698a 4500001001300000003000400013005001700017008004100034010001700075040001300092050001200105100001700117245003000134260001200164263000900176300001100185\1e   11224466 \1eDLC\1e00000000000000.0\1e910710c19910701nju           00010 eng  \1e  \1fa   11224466 \1e  \1faDLC\1fcDLC\1e00\1fa123-xyz\1e10\1faJack Collins\1e10\1faHow to program a computer\1e\1faPenguin\1e  \1fa8710\1e  \1fap. cm.\1e\1d
\ No newline at end of file
diff --git a/test/xml2tmarc7.xml b/test/xml2tmarc7.xml
new file mode 100644 (file)
index 0000000..35674e9
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<r xmlns="http://www.indexdata.com/MARC21/turboxml"><l>03114cam a2200349 i 4500</l><c001>   77123332 </c001><c003>DLC</c003><c005>20051218154744.0</c005><c008>981008b2001    ilu           000 0 eng  </c008><d035 i1=" " i2=" "><sa>57779</sa></d035><d035 i1=" " i2=" "><sa>90490</sa></d035><d035 i1=" " i2=" "><sa>93202</sa></d035><d040 i1=" " i2=" "><sa>DLC</sa><sc>DLC</sc></d040><d906 i1=" " i2=" "><sa>0</sa><sb>und</sb><sc>orignew</sc><sd>u</sd><se>ncip</se><sf>19</sf><sg>y-gencatlg</sg></d906><d010 i1=" " i2=" "><sa>   77123332 </sa></d010><d245 i1="0" i2="0"><sa>Voyager Diacritic test -- New input 001 (SBIE).</sa></d245><d260 i1=" " i2=" "><sa>ny :</sa><sb>ny,</sb><sc>2001.</sc></d260><d300 i1=" " i2=" "><sa>100 p. ;</sa><sc>12 cm.</sc></d300><d500 i1=" " i2=" "><sa>New copy imported from file (8/12/99).</sa></d500><d500 i1=" " i2=" "><sa>VOYAGER COLUMN 0  (NEW):  Degree sign (&#xB0;);  Phono Copyright mark (&#x2117;);  Copyright mark (&#xA9;);  Sharp (&#x266F;);  Inverted Question mark (&#xBF;);  Inverted Exclamation mark (&#xA1;).</sa></d500><d500 i1=" " i2=" "><sa>VOYAGER COLUMN 1:  Script L (&#x2113;);  Polish L (&#x141;);  Scandanavian O (&#xD8;);  D with Crossbar (&#x110;);  Icelandic Thorn (&#xDE;);  AE Digraph (&#xC6;); OE Digraph (&#x152;);  Miagkii Znak (&#x2B9;);  Dot at Midline (&#xB7;).</sa></d500><d500 i1=" " i2=" "><sa>VOYAGER COLUMN 2:  Musical Flat (&#x266D;);  Patent Mark (&#xAE;);  Plus or Minus (&#xB1;);  O Hook (&#x1A0;);  U Hook (&#x1AF;);  Alif (&#x2BC;);  alpha &#x3B1;;  Ayn (&#x2BB;);  Polish l (&#x142;).</sa></d500><d500 i1=" " i2=" "><sa>VOYAGER COLUMN 3:  Scandanavian o (&#xF8;);  d with crossbar (&#x111;);  Icelandic Thorn (&#xFE;);  ae Digraph (&#xE6;);  oe Digraph (&#x153;);  Tverdii Znak (&#x2BA;);  Turkish i (&#x131;);  British Pound (&#xA3;);  eth (&#xF0;).</sa></d500><d500 i1=" " i2=" "><sa>VOYAGER COLUMN 4:  Dagger (DO NOT USE);  o Hook (&#x1A1;);  u Hook (&#x1B0;);  Beta &#x3B2;;  Gamma &#x3B3;;  Superscript 0 (&#x2070;);  Superscript 1 (&#xB9;);  Superscript 2 (&#xB2;);  Superscript 3 (&#xB3;).</sa></d500><d500 i1=" " i2=" "><sa>VOYAGER COLUMN 5:  Superscript 4 (&#x2074;);  Superscript 5 (&#x2075;);  Superscript 6 (&#x2076;);  Superscript 7 (&#x2077;);  Superscript 8 (&#x2078;);  Superscript 9 (&#x2079;);  Superscript + (&#x207A;);  Superscript - (&#x207B;);  Superscript ( (&#x207D;).</sa></d500><d500 i1=" " i2=" "><sa>VOYAGER COLUMN 6:  Superscript ) (&#x207E;);  Subscript 0 (&#x2080;);  Subscript  1 (&#x2081;);  Subscript 2 (&#x2082;);  Subscript 3 (&#x2083;);  Subscript 4 (&#x2084;);  Subscript 5 (&#x2085;);  Subscript 6 (&#x2086;);  Subscript 7 (&#x2087;).</sa></d500><d500 i1=" " i2=" "><sa>VOYAGER COLUMN 7:  Subscript 8 (&#x2088;);  Subscript 9 (&#x2089;);  Subscript + (&#x208A;);  Subscript - (&#x208B;);  Subscript ( (&#x208D;);  Subscript ) (&#x208E;);  Pseudo Question Mark (o&#x309;);  Grave (o&#x300;);  Acute (o&#x301;).</sa></d500><d500 i1=" " i2=" "><sa>VOYAGER COLUMN 8:  Circumflex (o&#x302;);  Tilde (o&#x303;);  Macron (o&#x304;);  Breve (o&#x306;);  Superior Dot (o&#x307;);  Umlaut (o&#x308;);  Hacek (o&#x30C;);  Circle Above (o&#x30A;);  Ligature left (o&#x361;).</sa></d500><d500 i1=" " i2=" "><sa>VOYAGER COLUMN 9:  Ligature right (o) ;  High Comma off center (o&#x315;);  Double Acute (o&#x30B;);  Candrabindu (o&#x310;);  Cedilla (o&#x327;);  Right Hook (o&#x328;);  Dot Below (o&#x323;);  Double Dot Below (o&#x324;);  Circle Below (o&#x325;).</sa></d500><d500 i1=" " i2=" "><sa>VOYAGER COLUMN 10:  Double Underscore (o&#x333;);  Underscore (o&#x332;);  Left Hook (o&#x326;);  Right Cedilla (o&#x31C;);  Upadhmaniya (o&#x32E;);  Double Tilde 1st half (o&#x360;);  Double Tilde 2nd half (o) ;  High Comma centered (o&#x313;).</sa></d500><d500 i1=" " i2=" "><sa>VOYAGER PC Keyboard:  Spacing Circumflex (^); Spacing Underscore (_); Spacing Grave (`); Open Curly Bracket ({); Close Curly Bracket (}); Spacing Tilde (~).</sa></d500><d500 i1=" " i2=" "><sa>Standard PC Keyboard:   1234567890-=   !@#$%^&amp;*()_+   qwertyuiop[]\   QWERTYUIOP{}|   asdfghjkl;'  ASDFGHJKL:"   zxcvbnm,./   ZXCVBNM&lt;&gt;?</sa></d500></r>
diff --git a/test/xml2tmarc7.xml.marc b/test/xml2tmarc7.xml.marc
new file mode 100644 (file)
index 0000000..e6315df
--- /dev/null
@@ -0,0 +1 @@
+03109cam a2200349 i 4500001001300000003000400013005001700017008004100034035001000075035001000085035001000095040001300105906004500118010001700163245005200180260002100232300002100253500004300274500017600317500020000493500016100693500019500854500017801049500022001227500020501447500019901652500017701851500021402028500021502242500016102457500014102618\1e   77123332 \1eDLC\1e20051218154744.0\1e981008b2001    ilu           000 0 eng  \1e  \1fa57779\1e  \1fa90490\1e  \1fa93202\1e  \1faDLC\1fcDLC\1e  \1fa0\1fbund\1fcorignew\1fdu\1fencip\1ff19\1fgy-gencatlg\1e  \1fa   77123332 \1e00\1faVoyager Diacritic test -- New input 001 (SBIE).\1e  \1fany :\1fbny,\1fc2001.\1e  \1fa100 p. ;\1fc12 cm.\1e  \1faNew copy imported from file (8/12/99).\1e  \1faVOYAGER COLUMN 0  (NEW):  Degree sign (°);  Phono Copyright mark (℗);  Copyright mark (©);  Sharp (♯);  Inverted Question mark (¿);  Inverted Exclamation mark (¡).\1e  \1faVOYAGER COLUMN 1:  Script L (ℓ);  Polish L (Ł);  Scandanavian O (Ø);  D with Crossbar (Đ);  Icelandic Thorn (Þ);  AE Digraph (Æ); OE Digraph (Œ);  Miagkii Znak (ʹ);  Dot at Midline (·).\1e  \1faVOYAGER COLUMN 2:  Musical Flat (♭);  Patent Mark (®);  Plus or Minus (±);  O Hook (Ơ);  U Hook (Ư);  Alif (ʼ);  alpha α;  Ayn (ʻ);  Polish l (ł).\1e  \1faVOYAGER COLUMN 3:  Scandanavian o (ø);  d with crossbar (đ);  Icelandic Thorn (þ);  ae Digraph (æ);  oe Digraph (œ);  Tverdii Znak (ʺ);  Turkish i (ı);  British Pound (£);  eth (ð).\1e  \1faVOYAGER COLUMN 4:  Dagger (DO NOT USE);  o Hook (ơ);  u Hook (ư);  Beta β;  Gamma γ;  Superscript 0 (⁰);  Superscript 1 (¹);  Superscript 2 (²);  Superscript 3 (³).\1e  \1faVOYAGER COLUMN 5:  Superscript 4 (⁴);  Superscript 5 (⁵);  Superscript 6 (⁶);  Superscript 7 (⁷);  Superscript 8 (⁸);  Superscript 9 (⁹);  Superscript + (⁺);  Superscript - (⁻);  Superscript ( (⁽).\1e  \1faVOYAGER COLUMN 6:  Superscript ) (⁾);  Subscript 0 (₀);  Subscript  1 (₁);  Subscript 2 (₂);  Subscript 3 (₃);  Subscript 4 (₄);  Subscript 5 (₅);  Subscript 6 (₆);  Subscript 7 (₇).\1e  \1faVOYAGER COLUMN 7:  Subscript 8 (₈);  Subscript 9 (₉);  Subscript + (₊);  Subscript - (₋);  Subscript ( (₍);  Subscript ) (₎);  Pseudo Question Mark (ỏ);  Grave (ò);  Acute (ó).\1e  \1faVOYAGER COLUMN 8:  Circumflex (ô);  Tilde (õ);  Macron (ō);  Breve (ŏ);  Superior Dot (ȯ);  Umlaut (ö);  Hacek (ǒ);  Circle Above (o̊);  Ligature left (o͡).\1e  \1faVOYAGER COLUMN 9:  Ligature right (o) ;  High Comma off center (o̕);  Double Acute (ő);  Candrabindu (o̐);  Cedilla (o̧);  Right Hook (ǫ);  Dot Below (ọ);  Double Dot Below (o̤);  Circle Below (o̥).\1e  \1faVOYAGER COLUMN 10:  Double Underscore (o̳);  Underscore (o̲);  Left Hook (o̦);  Right Cedilla (o̜);  Upadhmaniya (o̮);  Double Tilde 1st half (o͠);  Double Tilde 2nd half (o) ;  High Comma centered (o̓).\1e  \1faVOYAGER PC Keyboard:  Spacing Circumflex (^); Spacing Underscore (_); Spacing Grave (`); Open Curly Bracket ({); Close Curly Bracket (}); Spacing Tilde (~).\1e  \1faStandard PC Keyboard:   1234567890-=   !@#$%^&*()_+   qwertyuiop[]\   QWERTYUIOP{}|   asdfghjkl;'  ASDFGHJKL:"   zxcvbnm,./   ZXCVBNM<>?\1e\1d
\ No newline at end of file
diff --git a/test/xml2tmarc8.xml b/test/xml2tmarc8.xml
new file mode 100644 (file)
index 0000000..8dc0550
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<r xmlns="http://www.indexdata.com/MARC21/turboxml"><l>02647nam^a2200469^^^4500</l><c001>UCD-002592301</c001><c005>20061209034435.0</c005><c006>m        d        </c006><c007>cr bn |||a|bb|</c007><c008>920330s1583    enk     s     000 0 eng d</c008><d035 i1=" " i2=" "><sa>99851339eo</sa></d035><d037 i1=" " i2=" "><sa>CL0036000039</sa><sb>ProQuest Information and Learning. 300 N. Zeeb Rd., Ann Arbor, MI 48106</sb></d037><d040 i1=" " i2=" "><sa>Cu-RivES</sa><sc>Cu-RivES</sc><sd>CStRLIN</sd><se>dcrb</se><sd>WaOLN</sd></d040><d100 i1="1" i2=" "><sa>Clinton, Atkinson.</sa></d100><d245 i1="0" i2="0"><sa>Clinton, Purser &amp; Arnold, to their countreymen wheresoeuer</sa><sh>[electronic resource] :</sh><sb>Wherein is described by their own hands their vnfeigned penitence for their offences past: their patience in welcoming their death, &amp; their duetiful minds towardes her most excellent Maiestie</sb></d245><d246 i1="2" i2=" "><sa>Clinton, Purser &amp; Arnold, to their countreymen wheresoever</sa></d246><d246 i1="2" i2=" "><sa>Clinton, Purser &amp; Arnold, to their countreymen wheresoever</sa></d246><d260 i1=" " i2=" "><sa>London :</sa><sb>Imprinted by Iohn Wolfe and are to be sold [by W. Wright] at the middle shop in the Poultry, ioyning S. Mildreds Church,</sb><sc>[1583?]</sc></d260><d300 i1=" " i2=" "><sa>[12] p</sa></d300><d500 i1=" " i2=" "><sa>In verse</sa></d500><d500 i1=" " i2=" "><sa>The first poem is signed: Thomas Walton alias Purser</sa></d500><d500 i1=" " i2=" "><sa>Clinton's full name and bookseller's name from, and publication date conjectured by, STC</sa></d500><d500 i1=" " i2=" "><sa>Signatures: A&#x2074; B&#xB2;</sa></d500><d500 i1=" " i2=" "><sa>Reproduction of the original in the Bodleian Library</sa></d500><d510 i1="4" i2=" "><sa>STC (2nd ed.)</sa><sc>5431</sc></d510><d530 i1=" " i2=" "><sa>Also issued in print and on microform</sa></d530><d533 i1=" " i2=" "><sa>Electronic reproduction.</sa><sn>Mode of access: World Wide Web.</sn><sn>Restricted to UC campuses</sn></d533><d655 i1=" " i2="7"><sa>Electronic texts.</sa><s2>local</s2></d655><d650 i1=" " i2="0"><sa>Pirates</sa><sz>England</sz><sv>Early works to 1800.</sv></d650><d700 i1="1" i2=" "><sa>Walton, Thomas,</sa><sd>fl. 1583.</sd><s4>aut</s4></d700><d700 i1="1" i2=" "><sa>Arnold,</sa><sd>fl. 1583.</sd><s4>aut</s4></d700><d793 i1="0" i2=" "><sa>Early English books online</sa></d793><d852 i1=" " i2=" "><sa>MER</sa><sb>kmain</sb></d852><d852 i1=" " i2=" "><sa>SCB</sa><sb>nnet</sb></d852><d856 i1="4" i2="0"><sz>Restricted to UC campuses</sz><sx>SCP UCSD</sx><su>http://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&amp;res_id=xri:eebo&amp;rft_val_fmt=&amp;rft_id=xri:eebo:image:16610</su></d856><d856 i1="4" i2="0"><sz>Restricted to UC campuses</sz><sx>SCP UCSD</sx><su>http://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&amp;res_id=xri:eebo&amp;rft_val_fmt=&amp;rft_id=xri:eebo:image:16610</su></d856><d852 i1=" " i2=" "><sa>DVXL</sa><sb>ELECT-GEN</sb><sh>Internet</sh></d852><d852 i1=" " i2=" "><sa>LAGE</sa><sb>in</sb><s3>Online access</s3></d852><d856 i1="4" i2="0"><sz>Restricted to UC campuses</sz><sx>SCP UCSD</sx><su>http://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&amp;res_id=xri:eebo&amp;rft_val_fmt=&amp;rft_id=xri:eebo:image:16610</su></d856><d856 i1="4" i2="0"><sz>Restricted to UC campuses</sz><su>http://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&amp;res_id=xri:eebo&amp;rft_val_fmt=&amp;rft_id=xri:eebo:image:16610</su><sx>CDL</sx></d856><d830 i1=" " i2="0"><sa>Early English books, 1475-1640 ;</sa><sv>1406:13.</sv></d830><d901 i1=" " i2=" "><sa>DVXL</sa><sb>002592301</sb></d901></r>
diff --git a/test/xml2tmarc8.xml.marc b/test/xml2tmarc8.xml.marc
new file mode 100644 (file)
index 0000000..7a433b0
--- /dev/null
@@ -0,0 +1 @@
+02643nam^a2200469^^^4500001001400000005001700014006001900031007001500050008004100065035001500106037009000121040004500211100002300256245028100279246006300560246006300623260014400686300001100830500001300841500005700854500009300911500002501004500005701029510002401086530004201110533008901152655002901241650004301270700003601313700002801349793003101377852001501408852001401423856015401437856015401591852003001745852002801775856015401803856014901957830004702106901002002153\1eUCD-002592301\1e20061209034435.0\1em        d        \1ecr bn |||a|bb|\1e920330s1583    enk     s     000 0 eng d\1e  \1fa99851339eo\1e  \1faCL0036000039\1fbProQuest Information and Learning. 300 N. Zeeb Rd., Ann Arbor, MI 48106\1e  \1faCu-RivES\1fcCu-RivES\1fdCStRLIN\1fedcrb\1fdWaOLN\1e\1faClinton, Atkinson.\1e00\1faClinton, Purser & Arnold, to their countreymen wheresoeuer\1fh[electronic resource] :\1fbWherein is described by their own hands their vnfeigned penitence for their offences past: their patience in welcoming their death, & their duetiful minds towardes her most excellent Maiestie\1e\1faClinton, Purser & Arnold, to their countreymen wheresoever\1e\1faClinton, Purser & Arnold, to their countreymen wheresoever\1e  \1faLondon :\1fbImprinted by Iohn Wolfe and are to be sold [by W. Wright] at the middle shop in the Poultry, ioyning S. Mildreds Church,\1fc[1583?]\1e  \1fa[12] p\1e  \1faIn verse\1e  \1faThe first poem is signed: Thomas Walton alias Purser\1e  \1faClinton's full name and bookseller's name from, and publication date conjectured by, STC\1e  \1faSignatures: A⁴ B²\1e  \1faReproduction of the original in the Bodleian Library\1e\1faSTC (2nd ed.)\1fc5431\1e  \1faAlso issued in print and on microform\1e  \1faElectronic reproduction.\1fnMode of access: World Wide Web.\1fnRestricted to UC campuses\1e 7\1faElectronic texts.\1f2local\1e 0\1faPirates\1fzEngland\1fvEarly works to 1800.\1e\1faWalton, Thomas,\1fdfl. 1583.\1f4aut\1e\1faArnold,\1fdfl. 1583.\1f4aut\1e\1faEarly English books online\1e  \1faMER\1fbkmain\1e  \1faSCB\1fbnnet\1e40\1fzRestricted to UC campuses\1fxSCP UCSD\1fuhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610\1e40\1fzRestricted to UC campuses\1fxSCP UCSD\1fuhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610\1e  \1faDVXL\1fbELECT-GEN\1fhInternet\1e  \1faLAGE\1fbin\1f3Online access\1e40\1fzRestricted to UC campuses\1fxSCP UCSD\1fuhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610\1e40\1fzRestricted to UC campuses\1fuhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610\1fxCDL\1e 0\1faEarly English books, 1475-1640 ;\1fv1406:13.\1e  \1faDVXL\1fb002592301\1e\1d
\ No newline at end of file
diff --git a/test/xml2tmarc9.xml b/test/xml2tmarc9.xml
new file mode 100644 (file)
index 0000000..a93e026
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<r xmlns="http://www.indexdata.com/MARC21/turboxml"><l>02075cas a22005055a 4500</l><c001>  2005336282</c001><c003>DLC</c003><c005>20070911033614.0</c005><c008>070910c20059999mr uu p      f0    0ara  </c008><d010 i1=" " i2=" "><sa>  2005336282</sa></d010><d012 i1=" " i2=" "><sa>-3-7-0709110002-p-----    </sa></d012><d035 i1=" " i2=" "><sa>(OCoLC)170490164</sa></d035><d906 i1=" " i2=" "><sa>7</sa><sb>und</sb><sc>serials</sc><sd>u</sd><se>ncip</se><sf>19</sf><sg>n-oclcserc</sg></d906><d040 i1=" " i2=" "><sa>DLC</sa><sc>DLC</sc><sd>DLC</sd></d040><d041 i1="0" i2=" "><sa>ara</sa><sa>fre</sa></d041><d042 i1=" " i2=" "><sa>lc</sa></d042><d043 i1=" " i2=" "><sa>f-mr---</sa></d043><d050 i1="0" i2="0"><sa>IN PROCESS</sa></d050><d066 i1=" " i2=" "><sc>(3</sc></d066><d245 i1="0" i2="0"><s6>880-01</s6><sa>Qad&#x323;a&#x304;&#x2BC; al-usrah :</sa><sb>majallah mutakhas&#x323;s&#x323;is&#x323;ah /</sb><sc>Wiza&#x304;rat al-&#x2BB;Adl.</sc></d245><d246 i1="1" i2="3"><sa>Justice de la famille</sa></d246><d246 i1="1" i2="3"><s6>880-02</s6><sa>Majallat Qad&#x323;a&#x304;&#x2BC; al-usrah</sa><sf>&lt;2006&gt;</sf></d246><d260 i1=" " i2=" "><s6>880-03</s6><sa>al-Raba&#x304;t&#x323; :</sa><sb>Jam&#x2BB;i&#x304;yat Nashr al-Ma&#x2BB;lu&#x304;mah al-Qa&#x304;nu&#x304;ni&#x304;yah wa-al-Qad&#x323;a&#x304;&#x2BC;i&#x304;yah,</sb><sc>2005-</sc></d260><d300 i1=" " i2=" "><sa>v. :</sa><sb>ill. ;</sb><sc>24 cm.</sc></d300><d310 i1=" " i2=" "><sa>Irregular (semiannual)</sa></d310><d362 i1="0" i2=" "><s6>880-04</s6><sa>al-&#x2BB;Adad 1. (Yu&#x304;lyu&#x304;z 2005)-</sa></d362><d490 i1="0" i2=" "><s6>880-05</s6><sa>Manshu&#x304;ra&#x304;t Jam&#x2BB;i&#x304;yat Nashr al-Ma&#x2BB;lu&#x304;mah al-Qa&#x304;nu&#x304;ni&#x304;yah wa-al-Qad&#x323;a&#x304;&#x2BC;i&#x304;yah</sa></d490><d500 i1=" " i2=" "><sa>Some issues have also a distinctive title.</sa></d500><d500 i1=" " i2=" "><sa>Latest issue consulted: al-&#x2BB;Adad 3. (Dujanbir 2006).</sa></d500><d546 i1=" " i2=" "><sa>Chiefly in Arabic; some French.</sa></d546><d650 i1=" " i2="0"><sa>Domestic relations (Islamic law)</sa><sz>Morocco.</sz></d650><d650 i1=" " i2="0"><sa>Divorce (Islamic law)</sa></d650><d650 i1=" " i2="0"><sa>Marriage law</sa><sz>Morocco.</sz></d650><d650 i1=" " i2="0"><sa>Law reports, digests, etc.</sa><sz>Morocco.</sz></d650><d710 i1="2" i2=" "><s6>880-06</s6><sa>Jam&#x2BB;i&#x304;yat Nashr al-Ma&#x2BB;lu&#x304;mah al-Qa&#x304;nu&#x304;ni&#x304;yah wa-al-Qad&#x323;a&#x304;&#x2BC;i&#x304;yah.</sa></d710><d710 i1="1" i2=" "><s6>880-07</s6><sa>Morocco.</sa><sb>Wiza&#x304;rat al-&#x2BB;Adl.</sb></d710><d850 i1=" " i2=" "><sa>DLC</sa></d850><d880 i1="0" i2="0"><s6>245-01/(3/r</s6><sa>&#x642;&#x636;&#x627;&#x621; &#x627;&#x644;&#x623;&#x633;&#x631;&#x629; :</sa><sb>&#x645;&#x62C;&#x644;&#x629; &#x645;&#x62A;&#x62E;&#x635;&#x635;&#x629; /</sb><sc>&#x648;&#x632;&#x627;&#x631;&#x629; &#x627;&#x644;&#x639;&#x62F;&#x644;.</sc></d880><d880 i1="1" i2="3"><s6>246-02/(3/r</s6><sa>&#x645;&#x62C;&#x644;&#x629; &#x642;&#x636;&#x627;&#x621; &#x627;&#x644;&#x623;&#x633;&#x631;&#x629;</sa><sf>&lt;2006&gt;</sf></d880><d880 i1=" " i2=" "><s6>260-03/(3/r</s6><sa>&#x627;&#x644;&#x631;&#x628;&#x627;&#x637; :</sa><sb>&#x62C;&#x645;&#x639;&#x64A;&#x629; &#x646;&#x634;&#x631; &#x627;&#x644;&#x645;&#x639;&#x644;&#x648;&#x645;&#x629; &#x627;&#x644;&#x642;&#x627;&#x646;&#x648;&#x646;&#x64A;&#x629; &#x648;&#x627;&#x644;&#x642;&#x636;&#x627;&#x626;&#x64A;&#x629;&#x60C;</sb><sc>2005-</sc></d880><d880 i1="0" i2=" "><s6>362-04/(3/r</s6><sa>&#x627;&#x644;&#x639;&#x62F;&#x62F; 1. (&#x64A;&#x648;&#x644;&#x64A;&#x648;&#x632; 2005)-</sa></d880><d880 i1="0" i2=" "><s6>490-05/(3/r</s6><sa>&#x645;&#x646;&#x634;&#x648;&#x631;&#x627;&#x62A; &#x62C;&#x645;&#x639;&#x64A;&#x629; &#x646;&#x634;&#x631; &#x627;&#x644;&#x645;&#x639;&#x644;&#x648;&#x645;&#x629; &#x627;&#x644;&#x642;&#x627;&#x646;&#x648;&#x646;&#x64A;&#x629; &#x648;&#x627;&#x644;&#x642;&#x636;&#x627;&#x626;&#x64A;&#x629;</sa></d880><d880 i1="2" i2=" "><s6>710-06/(3/r</s6><sa>&#x62C;&#x645;&#x639;&#x64A;&#x629; &#x646;&#x634;&#x631; &#x627;&#x644;&#x645;&#x639;&#x644;&#x648;&#x645;&#x629; &#x627;&#x644;&#x642;&#x627;&#x646;&#x648;&#x646;&#x64A;&#x629; &#x648;&#x627;&#x644;&#x642;&#x636;&#x627;&#x626;&#x64A;&#x629;.</sa></d880><d880 i1="1" i2=" "><s6>710-07/(3/r</s6><sa>Morocco.</sa><sb>&#x648;&#x632;&#x627;&#x631;&#x629; &#x627;&#x644;&#x639;&#x62F;&#x644;.</sb></d880><d936 i1=" " i2=" "><sa>LC Cairo Office [we 45]</sa></d936></r>
diff --git a/test/xml2tmarc9.xml.marc b/test/xml2tmarc9.xml.marc
new file mode 100644 (file)
index 0000000..9880e30
--- /dev/null
@@ -0,0 +1 @@
+02244cas a22005055a 4500001001300000003000400013005001700017008004100034010001700075012003100092035002100123906004500144040001800189041001300207042000700220043001200227050001500239066000700254245008700261246002600348246004900374260011100423300002500534310002700559362004400586490010100630500004700731500005800778546003600836650004700872650002600919650002700945650004100972710008801013710004201101850000801143880009001151880005601241880011501297880005201412880010501464880009101569880005001660936002801710\1e  2005336282\1eDLC\1e20070911033614.0\1e070910c20059999mr uu p      f0    0ara  \1e  \1fa  2005336282\1e  \1fa-3-7-0709110002-p-----    \1e  \1fa(OCoLC)170490164\1e  \1fa7\1fbund\1fcserials\1fdu\1fencip\1ff19\1fgn-oclcserc\1e  \1faDLC\1fcDLC\1fdDLC\1e\1faara\1fafre\1e  \1falc\1e  \1faf-mr---\1e00\1faIN PROCESS\1e  \1fc(3\1e00\1f6880-01\1faQaḍāʼ al-usrah :\1fbmajallah mutakhaṣṣiṣah /\1fcWizārat al-ʻAdl.\1e13\1faJustice de la famille\1e13\1f6880-02\1faMajallat Qaḍāʼ al-usrah\1ff<2006>\1e  \1f6880-03\1faal-Rabāṭ :\1fbJamʻīyat Nashr al-Maʻlūmah al-Qānūnīyah wa-al-Qaḍāʼīyah,\1fc2005-\1e  \1fav. :\1fbill. ;\1fc24 cm.\1e  \1faIrregular (semiannual)\1e\1f6880-04\1faal-ʻAdad 1. (Yūlyūz 2005)-\1e\1f6880-05\1faManshūrāt Jamʻīyat Nashr al-Maʻlūmah al-Qānūnīyah wa-al-Qaḍāʼīyah\1e  \1faSome issues have also a distinctive title.\1e  \1faLatest issue consulted: al-ʻAdad 3. (Dujanbir 2006).\1e  \1faChiefly in Arabic; some French.\1e 0\1faDomestic relations (Islamic law)\1fzMorocco.\1e 0\1faDivorce (Islamic law)\1e 0\1faMarriage law\1fzMorocco.\1e 0\1faLaw reports, digests, etc.\1fzMorocco.\1e\1f6880-06\1faJamʻīyat Nashr al-Maʻlūmah al-Qānūnīyah wa-al-Qaḍāʼīyah.\1e\1f6880-07\1faMorocco.\1fbWizārat al-ʻAdl.\1e  \1faDLC\1e00\1f6245-01/(3/r\1faقضاء الأسرة :\1fbمجلة متخصصة /\1fcوزارة العدل.\1e13\1f6246-02/(3/r\1faمجلة قضاء الأسرة\1ff<2006>\1e  \1f6260-03/(3/r\1faالرباط :\1fbجمعية نشر المعلومة القانونية والقضائية،\1fc2005-\1e\1f6362-04/(3/r\1faالعدد 1. (يوليوز 2005)-\1e\1f6490-05/(3/r\1faمنشورات جمعية نشر المعلومة القانونية والقضائية\1e\1f6710-06/(3/r\1faجمعية نشر المعلومة القانونية والقضائية.\1e\1f6710-07/(3/r\1faMorocco.\1fbوزارة العدل.\1e  \1faLC Cairo Office [we 45]\1e\1d
\ No newline at end of file
index d9732be..edacc07 100644 (file)
@@ -133,7 +133,7 @@ static void marcdump_read_xml(yaz_marc_t mt, const char *fname)
             {
                 const char *name = (const char *) 
                     xmlTextReaderLocalName(reader);
-                if (!strcmp(name, "record"))
+                if (!strcmp(name, "record") || !strcmp(name, "r"))
                 {
                     xmlNodePtr ptr = xmlTextReaderExpand(reader);
         
@@ -142,7 +142,9 @@ static void marcdump_read_xml(yaz_marc_t mt, const char *fname)
                         fprintf(stderr, "yaz_marc_read_xml failed\n");
                     else
                     {
-                        yaz_marc_write_mode(mt, wrbuf);
+                        int write_rc = yaz_marc_write_mode(mt, wrbuf);
+                                               if (write_rc)
+                                                       yaz_log(YLOG_WARN, "yaz_marc_write_mode: write error: %d", write_rc);
                         
                         fputs(wrbuf_cstr(wrbuf), stdout);
                         wrbuf_rewind(wrbuf);
@@ -165,7 +167,8 @@ static void marcdump_read_xml(yaz_marc_t mt, const char *fname)
                     ptr = ptr->children;
                     continue;
                 }
-                if (!strcmp((const char *) ptr->name, "record"))
+                if (!strcmp((const char *) ptr->name, "record") ||
+                       !strcmp((const char *) ptr->name, "r"))
                 {
                     int r = yaz_marc_read_xml(mt, ptr);
                     if (r)
@@ -215,12 +218,13 @@ static void dump(const char *fname, const char *from, const char *to,
         }
         yaz_marc_iconv(mt, cd);
     }
-    yaz_marc_xml(mt, output_format);
     yaz_marc_enable_collection(mt);
+    yaz_marc_set_read_format(mt, input_format);
+    yaz_marc_set_write_format(mt, output_format);
     yaz_marc_write_using_libxml2(mt, write_using_libxml2);
     yaz_marc_debug(mt, verbose);
 
-    if (input_format == YAZ_MARC_MARCXML || input_format == YAZ_MARC_XCHANGE)
+    if (input_format == YAZ_MARC_MARCXML || input_format == YAZ_MARC_TMARCXML || input_format == YAZ_MARC_XCHANGE)
     {
 #if YAZ_HAVE_XML2
         marcdump_read_xml(mt, fname);