voc / schedule

http://c3voc.de/wiki/schedule
14 stars 18 forks source link

Mandatory start and end attributes in day node #87

Closed johnjohndoe closed 3 years ago

johnjohndoe commented 3 years ago

I wonder if the start and end attributes should be mandatory in the day node. Currently, an XML document as the following does not fail the validation with regards to these missing attributes:

Please ignore the slug validation error - I couldn't figure out what's wrong here.

Tested here

Example without start and end attributes

<?xml version='1.0' encoding='utf-8' ?>
<schedule>
    <generator name="frab" version="0.7"/>
    <version>1.7</version>
    <conference>
        <acronym>test</acronym>
        <title>Remote Chaos Experience</title>
        <start>2020-12-27</start>
        <end>2020-12-27</end>
        <days>1</days>
        <timeslot_duration>00:10</timeslot_duration>
        <time_zone_name>Europe/Berlin</time_zone_name>
        <base_url>https://fahrplan.events.ccc.de/rc3/2020/Fahrplan/</base_url>
    </conference>
    <day date="2020-12-27" index="1">
        <room name="rC1">
            <event guid="090c24b4-34c9-432c-a848-41150439f8c9" id="11583">
                <date>2020-12-27T12:20:00+01:00</date>
                <start>12:20</start>
                <duration>00:30</duration>
                <room>rC1</room>
                <slug>testslug</slug>
                <url>https://fahrplan.events.ccc.de/rc3/2020/Fahrplan/events/11583.html</url>
                <recording>
                    <license/>
                    <optout>false</optout>
                </recording>
                <title>#rC3 Eröffnung</title>
                <subtitle/>
                <track>Community</track>
                <type>lecture</type>
                <language>de</language>
                <abstract>Willkommen zur ersten und hoffentlich einzigen Remote Chaos Experience!</abstract>
                <description/>
                <logo/>
                <persons>
                    <person id="14151">blubbel</person>
                </persons>
                <links/>
                <attachments/>
            </event>
        </room>
    </day>
</schedule>

Example with start and end

<?xml version='1.0' encoding='utf-8' ?>
<schedule>
    <generator name="frab" version="0.7"/>
    <version>1.7</version>
    <conference>
        <acronym>test</acronym>
        <title>Remote Chaos Experience</title>
        <start>2020-12-27</start>
        <end>2020-12-27</end>
        <days>1</days>
        <timeslot_duration>00:10</timeslot_duration>
        <time_zone_name>Europe/Berlin</time_zone_name>
        <base_url>https://fahrplan.events.ccc.de/rc3/2020/Fahrplan/</base_url>
    </conference>
    <day date="2020-12-27" end="2020-12-27T12:50:00+01:00" index="1" start="2020-12-27T12:20:00+01:00">
        <room name="rC1">
            <event guid="090c24b4-34c9-432c-a848-41150439f8c9" id="11583">
                <date>2020-12-27T12:20:00+01:00</date>
                <start>12:20</start>
                <duration>00:30</duration>
                <room>rC1</room>
                <slug>testslug</slug>
                <url>https://fahrplan.events.ccc.de/rc3/2020/Fahrplan/events/11583.html</url>
                <recording>
                    <license/>
                    <optout>false</optout>
                </recording>
                <title>#rC3 Eröffnung</title>
                <subtitle/>
                <track>Community</track>
                <type>lecture</type>
                <language>de</language>
                <abstract>Willkommen zur ersten und hoffentlich einzigen Remote Chaos Experience!</abstract>
                <description/>
                <logo/>
                <persons>
                    <person id="14151">blubbel</person>
                </persons>
                <links/>
                <attachments/>
            </event>
        </room>
    </day>
</schedule>

Context

Frab and Pretalx output these attributes while Pentabarf does not. The EventFahrplan app requires these attributes to be present.

saerdnaer commented 3 years ago

Feel free to create a PR for the XSD, and maybe the schedule python library in this repo (if it does not generate this attribute)

johnjohndoe commented 3 years ago

Can you confirm that these attributes should be mandatory and that no other consumer would break?

saerdnaer commented 3 years ago

I am currently not aware of any consumer which would break on additional attributes in an XML document.

johnjohndoe commented 3 years ago

@saerdnaer Thank you.