amagimedia / metadata

Metadata rdf, xml schemas
1 stars 0 forks source link

schema2.xsd: why season & series prefixes for title, description & thumbnails ? #26

Open vsagarv opened 1 year ago

vsagarv commented 1 year ago

@ksridhar @shashi-banger Why does schema2.xsd have {season|series} prefixes to {Title|Description|Thumbnail} elements when those elements are already inside a season|series element?

    <xs:sequence>
      <xs:element name="seasonTitle" type="tns:myString" />
      <xs:element name="seasonDescription" type="tns:myString" />
      <xs:element name="seasonThumbnail" type="tns:myString" />
...
...
    <xs:sequence>
      <xs:element name="seriesTitle" type="tns:myString" />
      <xs:element name="seriesDescription" type="tns:myString" />
      <xs:element name="seriesThumbnail" type="tns:myString" />

Shouldn't the xsd expect plain {title|description|thumbnail} elements just as other un-prefixed elements such as keyword|broadcastDate|productionCompany ?

As a reference, see https://www.ebu.ch/metadata/schemas/EBUCore/ebucore.xsd

                        <element name="title" type="ebucore:titleType" minOccurs="0" maxOccurs="unbounded">
                <annotation>
                    <documentation>A Title is the ‘main’ name given to a resource e.g. a media item,
                        a media object, or a sequence as specified by the associated title type. It
                        corresponds for a series to the series title, for a programme to the
                        programme title, for an item to the item title, etc. Titles are recorded as
                        they appear. The Title is the name by which a resource is formally known and
                        that everyone should use to refer to or search for that particular resource.
                        The Title may be provided in several languages. If present, the date
                        attributes indicate when the Title was attributed, used and/or deprecated. </documentation>
                    <documentation> dc:title is used to provide the main title by which the resource
                        is known. The title can be provided in different languages. The language in
                        which the title is provided can be provided using dc:elementType’s lang
                        attribute. </documentation>
                </annotation>
            </element>

                        <element name="description" type="ebucore:descriptionType" minOccurs="0"
                maxOccurs="unbounded">
                <annotation>
                    <documentation>Free-form text or a narrative to report general notes, abstracts,
                        or summaries about the intellectual content of a resource. The information
                        may be in the form of a paragraph giving an individual program description,
                        anecdotal interpretations, or brief content reviews. The description may
                        also consist of outlines, lists, bullet points, edit decision lists,
                        indexes, or tables of content, a reference to a graphical representation of
                        content or even a pointer (URI, URL) to an external resource. A running
                        order can also be provided as a description. For a Radio or television
                        programme a running order can be used as description. A description can be
                        provided in different languages. </documentation>
                    <documentation> dc:description is used to provide the text of a description of
                        the resource, which can be provided in different languages. </documentation>
                </annotation>
            </element>

(I do understand ebucore#seasonNumber is an independent property.)

ksridhar commented 1 year ago

you are right. i think that @shashi-banger has already modified them as you have mentioned. see https://github.com/amagimedia/metadata/blob/main/amgrss_schemas/amgrss_xpaths_description.csv

ksridhar commented 1 year ago

The updated example https://github.com/amagimedia/metadata/blob/ks--amgrss-master-eg-1/amgrss_schemas/amgrss_master.xml (in the branch ks--amgrss-master-eg-1 reflects that).

ksridhar commented 1 year ago

@vsagarv, saar, if this makes sense please close the issue or else wait for the branch to be merged with main before you close it (after due verification).

vsagarv commented 1 year ago

@ksridhar Thank you. I should have checked the xpaths description. I will update the schema accordingly and then mark this issue as closed.

vsagarv commented 1 year ago

@ksridhar @shashi-banger On this note, should we rewrite the schema[0|1|2].xsds to be inline with https://github.com/amagimedia/metadata/blob/main/amgrss_schemas/amgrss_xpaths_description.csv

A side note: After much back and forth, I have one test input finally passing with some modifications to the existing xsls and schema2.xsd

(venv) amgrss-xslts $ amgrss-tool pubrss-2-amgrss --rss-file tests/test_input_data/e67004cc-0.xml --xslt-file xsl_transforms/e67004cc.xsl --output-file /tmp/e67.op
{"name": "amgrss_xslt.amgrss_intmd_transform", "asctime": "2023-03-30 18:33:07,805", "levelname": "INFO", "filename": "amgrss_intmd_transform.py", "lineno": 57, "message": "new process xslt job", "xslt_file": "xsl_transforms/e67004cc.xsl", "rss_file": "tests/test_input_data/e67004cc-0.xml", "output_file": "/tmp/e67_temp.xml"}
Intermediate step completed, moving for post process
Downloading skos schemas ......
No changes to the repository since the last download.
Download Complete!!
Transformation Complete, Starting Validation Step
Validated Output against xsd schema
Time for Post process step: 4.284224987030029