Changeset 990

Show
Ignore:
Timestamp:
08/10/07 12:48:48 (1 year ago)
Author:
thomase
Message:

adjust top-of-mods-file directives to include invocation of in-browser transform

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • BibIt/trunk/bibchunker.py

    r985 r990  
    3131 
    3232     
    33 MODSTOP = '<?xml version="1.0" encoding="UTF-8"?>\n<mods xmlns="http://www.loc.gov/mods/v3"\n' \ 
    34     + 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\nxmlns:mods="http://www.loc.gov/mods/v3"\n' \ 
    35     + 'xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-2.xsd"\n' \ 
    36     + 'xmlns:xlink="http://www.w3.org/1999/xlink"\n' 
     33MODSTOP = '<?xml version="1.0" encoding="UTF-8"?>\n' \ 
     34    + '<?xml-stylesheet href="xmlmods.xsl" type="text/xsl"?>\n\n' \ 
     35    + '<mods xmlns="http://www.loc.gov/mods/v3"\n' \ 
     36    + '    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\n' \ 
     37    + '    xmlns:mods="http://www.loc.gov/mods/v3"\n' \ 
     38    + '    xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-2.xsd"\n' \ 
     39    + '    xmlns:xlink="http://www.w3.org/1999/xlink"\n' 
    3740 
    3841def main(argv): 
     
    8588         
    8689        modsxml = etree.tounicode(doxlinkcleanup(mods), pretty_print=1).encode('utf-8', 'xmlcharrefreplace') 
    87         modsxml = MODSTOP + modsxml[5:].strip() 
     90        modsxml = modsxml.strip().replace('<mods xmlns="http://www.loc.gov/mods/v3"', MODSTOP).strip() 
    8891        modsfilepath = os.path.join(modspath, modsfile) 
    8992        f = open(modsfilepath, 'w')