Thank you all for chiming in. I will adopt the solution of printing zeros by default, but I will retain the record length from an original MARC21 file, assuming the record was actually read from a MARC21 record and no changes have occurred in memory since.
Thanks again!
Mark V Sullivan
Digital Development and Web Coordinator
Technology and Support Services
University of Florida Libraries
352-273-2907 (office)
352-682-9692 (mobile)
[log in to unmask]
________________________________________
From: Code for Libraries [[log in to unmask]] on behalf of Reese, Terry [[log in to unmask]]
Sent: Friday, June 29, 2012 10:14 AM
To: [log in to unmask]
Subject: Re: [CODE4LIB] Leader in MarcXML Files ( Record Length )
If im writing marcxml from scratch, I agree. If I'm converting it from marc, i print out the length value from the record more for historical purposes.
Tr
*************************************
Terry Reese, Associate Professor
Gray Family Chair for
Innovative Library Services
121 Valley Library
Corvallis, OR 97331
541.737.6384
************************************
________________________________
From: Devon
Sent: 6/29/2012 7:09 AM
To: [log in to unmask]
Subject: Re: [CODE4LIB] Leader in MarcXML Files ( Record Length )
When writing MARC XML, you should use zeros. The following document
[1] says you can use blanks, but the schema [2] uses a pattern that
indicates digits should be used. When reading MARC XML, you should
just ignore whatever is in those positions.
[1] http://www.loc.gov/standards/marcxml/marcxml-design.html
[2] http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd
/dev
On Fri, Jun 29, 2012 at 9:51 AM, Sullivan, Mark V <[log in to unmask]> wrote:
> All,
>
>
>
> I received a question regarding a software library I have created and released as open source. The record length in the leader ( positions 0-4 ) was not being calculated correctly when writing as MarcXML. However, this raises a more philosophical and larger question. What is the point of the first five digits of the leader, outside of a ISO2709 / MARC21 encoded record? Should I calculate the record length AS IF it would be encoded in ISO2709? This would be computationally non-trivial and would likely double the time necessary for my software to write a MarcXML file. Should I just make the first five digits of the leader '00000', since it means nothing in the context of a MarcXML file?
>
>
>
> Has anyone else pondered this question or have any input on how current systems work?
>
>
>
> Keep in mind I could be writing a MarcXML record for a record created or modified in memory, so just using a pre-existing record length is not an option.
>
>
>
> Many thanks for your consideration.
>
>
> Mark V Sullivan
> Digital Development and Web Coordinator
> Technology and Support Services
> University of Florida Libraries
> 352-273-2907 (office)
> 352-682-9692 (mobile)
> [log in to unmask]<mailto:[log in to unmask]>
--
Sent from my GMail account.
|