-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #607 from CTPUG/frab-xml
Emit frab compatible XML
- Loading branch information
Showing
8 changed files
with
269 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
PyYAML | ||
lxml | ||
mock | ||
pep8 | ||
pyflakes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,197 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
The Frab XSD isn't versioned yet (and it seems unlikely to happen, from | ||
https://github.com/frab/schedule.xml/issues/4) | ||
So, grabbed from voc git: | ||
https://github.com/voc/schedule/commit/1e22ff63d1b03e959fdf0b9771beeee7bae1b75e | ||
--> | ||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> | ||
<xs:element name="schedule"> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element minOccurs="0" name="generator"> | ||
<xs:complexType> | ||
<xs:sequence /> | ||
<xs:attribute type="xs:string" name="name"/> | ||
<xs:attribute type="xs:string" name="version"/> | ||
</xs:complexType> | ||
</xs:element> | ||
<xs:element type="xs:string" name="version"/> | ||
<xs:element name="conference"> | ||
<xs:complexType> | ||
<xs:all> | ||
<xs:element type="xs:string" name="title"/> | ||
<xs:element type="acronym" name="acronym"/> | ||
|
||
<xs:element type="xs:date" name="start" minOccurs="0"/> | ||
<xs:element type="xs:date" name="end" minOccurs="0"/> | ||
<xs:element type="xs:integer" name="days" minOccurs="0"/> | ||
<xs:element type="duration" name="timeslot_duration" minOccurs="0"/> | ||
<xs:element type="httpURI" name="base_url" minOccurs="0"/> | ||
<xs:element type="xs:string" name="time_zone_name" minOccurs="0" maxOccurs="1"/> | ||
</xs:all> | ||
</xs:complexType> | ||
</xs:element> | ||
<xs:element type="day" name="day" maxOccurs="unbounded"/> | ||
</xs:sequence> | ||
</xs:complexType> | ||
|
||
<xs:unique name="guid_unique"> | ||
<xs:selector xpath="day/room/event" /> | ||
<xs:field xpath="@guid" /> | ||
</xs:unique> | ||
|
||
<xs:unique name="id_unique"> | ||
<xs:selector xpath="day/room/event" /> | ||
<xs:field xpath="@id" /> | ||
</xs:unique> | ||
|
||
<xs:unique name="slug_unique"> | ||
<xs:selector xpath="day/room/event/slug" /> | ||
<xs:field xpath="." /> | ||
</xs:unique> | ||
|
||
<xs:unique name="day_index_unique"> | ||
<xs:selector xpath="day" /> | ||
<xs:field xpath="@index" /> | ||
</xs:unique> | ||
</xs:element> | ||
|
||
<xs:complexType name="day"> | ||
<xs:sequence> | ||
<xs:element type="room" name="room" minOccurs="0" maxOccurs="unbounded"/> | ||
</xs:sequence> | ||
<xs:attribute type="xs:date" name="date"/> | ||
<xs:attribute type="dateTimeTZ" name="start"/> | ||
<xs:attribute type="dateTimeTZ" name="end"/> | ||
<xs:attribute type="xs:positiveInteger" name="index"/> | ||
</xs:complexType> | ||
|
||
<xs:complexType name="room"> | ||
<xs:sequence> | ||
<xs:element type="event" name="event" minOccurs="0" maxOccurs="unbounded"/> | ||
</xs:sequence> | ||
<xs:attribute type="xs:string" name="name" use="required"/> | ||
<xs:attribute name="guid" type="uuid"/> | ||
</xs:complexType> | ||
|
||
<xs:complexType name="event"> | ||
<xs:all> | ||
<xs:element type="xs:string" name="room"/> | ||
<xs:element type="xs:string" name="title"/> | ||
<xs:element type="xs:string" name="subtitle"/> | ||
<xs:element type="xs:string" name="type"/> | ||
<xs:element type="dateTimeTZ" name="date"/> | ||
<xs:element type="start" name="start"/> | ||
<xs:element type="duration" name="duration"/> | ||
<xs:element type="xs:string" name="abstract"/> | ||
<xs:element type="slug" name="slug"/> | ||
<xs:element type="xs:string" name="track"/> | ||
|
||
<xs:element type="xs:string" name="logo" minOccurs="0"/> | ||
<xs:element type="persons" name="persons" minOccurs="0"/> | ||
<xs:element type="xs:string" name="language" minOccurs="0"/> | ||
<xs:element type="xs:string" name="description" minOccurs="0"/> | ||
<xs:element type="recording" name="recording" minOccurs="0"/> | ||
<xs:element type="links" name="links" minOccurs="0"/> | ||
<xs:element type="attachments" name="attachments" minOccurs="0"/> | ||
<xs:element type="httpURI" name="video_download_url" minOccurs="0"/> | ||
<xs:element type="httpURI" name="url" minOccurs="0"/> | ||
</xs:all> | ||
<xs:attribute name="id" type="xs:positiveInteger" use="required"/> | ||
<xs:attribute name="guid" type="uuid" use="required"/> | ||
</xs:complexType> | ||
|
||
<xs:simpleType name="dateTimeTZ"> | ||
<xs:restriction base="xs:dateTime"> | ||
<xs:pattern value=".+(Z|\+[0-9]{1,2}:[0-9]{2}|-[0-9]{1,2}:[0-9]{2})"/> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
|
||
<xs:simpleType name="duration"> | ||
<xs:restriction base="xs:string"> | ||
<xs:pattern value="([0-9]{1,2}:[0-9]{2})|([0-9]{1,2}:[0-9]{2}:[0-9]{1,2})"/> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
|
||
<xs:simpleType name="start"> | ||
<xs:restriction base="xs:string"> | ||
<xs:pattern value="([0-2][0-9]:[0-5][0-9])|([0-2][0-9]:[0-5][0-9]:[0-5][0-9])"/> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
|
||
<xs:simpleType name="uuid"> | ||
<xs:restriction base="xs:string"> | ||
<xs:pattern value="[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}"/> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
|
||
<xs:simpleType name="acronym"> | ||
<xs:restriction base="xs:string"> | ||
<xs:pattern value="[a-z0-9_-]{4,}"/> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
|
||
<xs:simpleType name="slug"> | ||
<xs:restriction base="xs:string"> | ||
<xs:pattern value="[a-z0-9]{4,}-[0-9]{1,6}-[a-z0-9\-_]{4,}"/> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
|
||
<xs:simpleType name="httpURI"> | ||
<xs:restriction base="xs:anyURI"> | ||
<xs:pattern value="https?://.*"/> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
|
||
<xs:complexType name="recording"> | ||
<xs:all> | ||
<xs:element type="xs:string" name="license"/> | ||
<xs:element type="xs:boolean" name="optout"/> | ||
<xs:element type="httpURI" name="url" minOccurs="0"/> | ||
<xs:element type="httpURI" name="link" minOccurs="0"/> | ||
</xs:all> | ||
</xs:complexType> | ||
|
||
<xs:complexType name="persons"> | ||
<xs:sequence> | ||
<xs:element name="person" minOccurs="0" maxOccurs="unbounded"> | ||
<xs:complexType> | ||
<xs:simpleContent> | ||
<xs:extension base="xs:string"> | ||
<xs:attribute type="xs:positiveInteger" name="id"/> | ||
</xs:extension> | ||
</xs:simpleContent> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:sequence> | ||
</xs:complexType> | ||
|
||
<xs:complexType name="links"> | ||
<xs:sequence> | ||
<xs:element name="link" maxOccurs="unbounded" minOccurs="0"> | ||
<xs:complexType> | ||
<xs:simpleContent> | ||
<xs:extension base="xs:string"> | ||
<xs:attribute type="xs:string" name="href"/> | ||
</xs:extension> | ||
</xs:simpleContent> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:sequence> | ||
</xs:complexType> | ||
|
||
<xs:complexType name="attachments"> | ||
<xs:sequence> | ||
<xs:element name="attachment" maxOccurs="unbounded" minOccurs="0"> | ||
<xs:complexType> | ||
<xs:simpleContent> | ||
<xs:extension base="xs:string"> | ||
<xs:attribute type="xs:string" name="href"/> | ||
</xs:extension> | ||
</xs:simpleContent> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:sequence> | ||
</xs:complexType> | ||
</xs:schema> |
Oops, something went wrong.