Skip to content

Commit

Permalink
Remove outer fileGrp element
Browse files Browse the repository at this point in the history
  • Loading branch information
lrosenstrom committed Mar 26, 2021
1 parent d47307c commit aca2129
Showing 1 changed file with 19 additions and 21 deletions.
40 changes: 19 additions & 21 deletions fgsMetsMods/templates/record.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -145,27 +145,25 @@
</mdWrap>
</dmdSec>
<fileSec>
<fileGrp>
{foreach $fileGroups as $fileGroup}
<fileGrp>
{foreach $fileGroup as $fileInfo}
{assign var=file value=$fileInfo.file}
<file ID="{"FILE"|cat: $file->getId()|escape}" MIMETYPE="{$file->getdata('mimetype')|escape}"
{if $file->getdata('mimetype') == "application/pdf"}
USE="Portable document format (PDF)"
{elseif $file->getdata('mimetype') == "text/xml" or $file->getdata('mimetype') == "application/xml"}
USE="Extensible markup language (XML)"
{else}
USE="{$file->getdata('mimetype')|regex_replace:"#.*/#":""|upper|escape}"
{/if}
SIZE="{$fileInfo.fileSize|escape}"
CREATED="{$file->getDateModified()|strftime|date_format:'c'|escape}">
<FLocat LOCTYPE="URL" xlink:type="simple" xlink:href="{$fileInfo.url|escape}"/>
</file>
{/foreach}
</fileGrp>
{/foreach}
</fileGrp>
{foreach $fileGroups as $fileGroup}
<fileGrp>
{foreach $fileGroup as $fileInfo}
{assign var=file value=$fileInfo.file}
<file ID="{"FILE"|cat: $file->getId()|escape}" MIMETYPE="{$file->getdata('mimetype')|escape}"
{if $file->getdata('mimetype') == "application/pdf"}
USE="Portable document format (PDF)"
{elseif $file->getdata('mimetype') == "text/xml" or $file->getdata('mimetype') == "application/xml"}
USE="Extensible markup language (XML)"
{else}
USE="{$file->getdata('mimetype')|regex_replace:"#.*/#":""|upper|escape}"
{/if}
SIZE="{$fileInfo.fileSize|escape}"
CREATED="{$file->getDateModified()|strftime|date_format:'c'|escape}">
<FLocat LOCTYPE="URL" xlink:type="simple" xlink:href="{$fileInfo.url|escape}"/>
</file>
{/foreach}
</fileGrp>
{/foreach}
</fileSec>
<structMap TYPE="physical">
<div TYPE="files">
Expand Down

0 comments on commit aca2129

Please sign in to comment.