diff --git a/app/apps/api/serializers.py b/app/apps/api/serializers.py index e69add839008d6dc165a8575f89a6b53b472510a..081a3cf0c5b6919bc2282b334289f17d6dbb57df 100644 --- a/app/apps/api/serializers.py +++ b/app/apps/api/serializers.py @@ -133,7 +133,8 @@ class PartSerializer(serializers.ModelSerializer): 'workflow', 'order', 'recoverable', - 'transcription_progress' + 'transcription_progress', + 'source' ) def create(self, data): diff --git a/app/escriptorium/templates/export/alto.xml b/app/escriptorium/templates/export/alto.xml index ed28bb0e81b8cc6b01fdc868ec76cd11740c2e7e..80b0afbab80e820df539b3e032c8a7bbf8b6e665 100644 --- a/app/escriptorium/templates/export/alto.xml +++ b/app/escriptorium/templates/export/alto.xml @@ -1,11 +1,12 @@ {% load export_tags %}<?xml version="1.0" encoding="UTF-8"?> <alto xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.loc.gov/standards/alto/ns-v4#" - xsi:schemaLocation="http://www.loc.gov/standards/alto/ns-v4# https://gitlab.inria.fr/scripta/escriptorium/-/raw/develop/app/escriptorium/static/alto-4-1-baselines.xsd"> + xsi:schemaLocation="http://www.loc.gov/standards/alto/ns-v4# http://www.loc.gov/standards/alto/v4/alto-4-2.xsd"> <Description> <MeasurementUnit>pixel</MeasurementUnit> <sourceImageInformation> <fileName>{{ part.filename }}</fileName> + {% if part.source %}<fileIdentifier>{{ part.source }}</fileIdentifier>{% endif %} </sourceImageInformation> </Description> {% if valid_block_types or valid_line_types %} diff --git a/app/escriptorium/templates/export/pagexml.xml b/app/escriptorium/templates/export/pagexml.xml index f0be96718103b82a48bed29cefaaa2b8f6f4cdb9..73ded4ccf75b09cd5f0d11aecafaf9dffd502ed8 100644 --- a/app/escriptorium/templates/export/pagexml.xml +++ b/app/escriptorium/templates/export/pagexml.xml @@ -1,9 +1,10 @@ {% load export_tags %}<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <PcGts xmlns="http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15 http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15/pagecontent.xsd"> - <Metadata> + <Metadata{% if part.source %} externalRef="{{part.source}}"{% endif %}> <Creator>escriptorium</Creator> <Created>{% current_time %}</Created> - <LastChange>{% current_time %}</LastChange> + <LastChange>{% current_time %}</LastChange> + </Metadata> <Page imageFilename="{{ part.filename }}" imageWidth="{{ part.image.width }}" imageHeight="{{ part.image.height }}">