[XML4Lib] Question on trailing whitespace in MARCXML controlfieldelements

Houghton,Andrew houghtoa at oclc.org
Thu Jul 3 09:26:13 EDT 2008


> From: xml4lib-bounces at webjunction.org [mailto:xml4lib-
> bounces at webjunction.org] On Behalf Of Mathias Kratzer
> Sent: Thursday, July 03, 2008 5:30 AM
> To: xml4lib
> Subject: [XML4Lib] Question on trailing whitespace in MARCXML
> controlfieldelements
> 
> Dear all,
> 
> is it valid to omit trailing whitespace in MARCXML controlfield
> elements?
> 
> Example:
> 
>    <controlfield tag="008">920219s1993    caua   j      000 0
> eng</controlfield>
> 
> instead of
> 
>    <controlfield tag="008">920219s1993    caua   j      000 0 eng
> </controlfield>
> 
> 
> According to the MARCXML schema leader and controlfields are subject to
> "whitespace preservation", and for interior whitespace it is clear why
> this is vital. However, any application could easily fill any missing
> positions with whitespaces by default. IMHO it is still _not_ valid to
> omit trailing whitespace - so my real problem is that I'm not able to
> find any sort of document that states "yes, doing so will let your
> MARCXML become invalid".
> 
> I am completely aware of the fact that the LoC (as maintaining agency
> of the MARCXML standard) is the appropriate address for my question but
> the "Contact Us" link on http://www.loc.gov/standards/marcxml/// only
> led me to the general "Ask a Librarian" page. So I thought this mailing
> list is probably the more direct way to ask the experts :-)

The MARC-XML schema use whitespace preservation because whitespace is a content issue.  You could omit the whitespace and your MARC-XML would still validate.  However, the MARC 21 standards, e.g., authority, bibliographic, holdings, etc. specify what the content should be.  In those standards the 008 is exactly 40 characters long.  Which means that those trailing spaces are significant to the interpretation of the content that is serialized into any format whether it be ISO 2709 or a MARC-XML instance document.


Andy.


More information about the XML4Lib mailing list