123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- indeed, a relative default namespace. Unorthodox but useful to avoid a central server
- and still enable GRDDL.
-
- Find the RelaxNG schema at http://purl.mro.name/recorder/pbmi2003-recmod2012/broadcast.rnc
-
- About RelaxNG see http://purl.mro.name/relaxng
- -->
- <grammar ns="../../../../../assets/2013/radio-pi.rdf" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
- <start>
- <a:documentation>Copyright (c) 2013-2016 Marcus Rohrmoser, http://purl.mro.name/recorder
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
- associated documentation files (the "Software"), to deal in the Software without restriction,
- including without limitation the rights to use, copy, modify, merge, publish, distribute,
- sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- The above copyright notice and this permission notice shall be included in all copies or
- substantial portions of the Software.
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
- NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
- OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- MIT License http://opensource.org/licenses/MIT</a:documentation>
- <a:documentation>Dublin Core PBMI http://dcpapers.dublincore.org/pubs/article/view/749
- not: Ontology for Media Resources 1.0 http://www.w3.org/TR/mediaont-10/
- not: EBU http://tech.ebu.ch/lang/en/MetadataEbuCore
- use e.g.
- $ xmllint --noout --relaxng http://purl.mro.name/recorder/pbmi2003-recmod2012/broadcast.rng htdocs/stations/*/????/??/??/*.xml 2>&1 | grep fail
- </a:documentation>
- <choice>
- <ref name="broadcast">
- <a:documentation>either a single broadcast (without 'modified' attribute)</a:documentation>
- </ref>
- <element name="broadcasts">
- <attribute name="date">
- <ref name="isoDate"/>
- </attribute>
- <zeroOrMore>
- <ref name="broadcast">
- <a:documentation>or multiple broadcast elements (with 'modified' attribute each)</a:documentation>
- </ref>
- </zeroOrMore>
- </element>
- </choice>
- </start>
- <define name="isoDate">
- <a:documentation>subset of http://www.w3.org/TR/xmlschema-2/#date-lexical-representation</a:documentation>
- <data type="date">
- <param name="pattern">\d{4}-\d{2}-\d{2}</param>
- </data>
- </define>
- <define name="isoDateTime">
- <a:documentation>compliant to atom feed timestamps, http://www.faqs.org/rfcs/rfc3339.html
- Subset of http://www.w3.org/TR/xmlschema-2/#dateTime-lexical-representation</a:documentation>
- <choice>
- <data type="dateTime">
- <param name="pattern">\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+\-]\d{2}:\d{2}</param>
- </data>
- <!-- xsd:date { pattern = "\d{4}-\d{2}-\d{2}" }, -->
- <data type="string">
- <a:documentation>I want to allow 24:00:00 conforming http://www.w3.org/TR/xmlschema-2/#dateTime-lexical-representation.
- But xmllint v20900 refuses to validate. So I rather sacrifice the date check and do a mere lexical check
- than see 24:00 invalid in such cases.</a:documentation>
- <param name="pattern">\d{4}-\d{2}-\d{2}T24:00:00[+\-]\d{2}:\d{2}</param>
- </data>
- </choice>
- </define>
- <define name="broadcast">
- <element name="broadcast">
- <optional>
- <attribute name="modified">
- <ref name="isoDateTime"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="xml:lang">
- <data type="NCName">
- <param name="pattern">[a-z]{2}</param>
- <a:documentation>ISO 639-1 2-letter language code</a:documentation>
- </data>
- </attribute>
- </optional>
- <ref name="meta.DC.identifier"/>
- <ref name="meta.DC.scheme"/>
- <ref name="meta.DC.language"/>
- <ref name="meta.DC.title"/>
- <optional>
- <ref name="meta.DC.title.series"/>
- </optional>
- <optional>
- <ref name="meta.DC.title.episode"/>
- </optional>
- <optional>
- <ref name="meta.DC.subject"/>
- </optional>
- <ref name="meta.DC.format.timestart"/>
- <ref name="meta.DC.format.timeend"/>
- <ref name="meta.DC.format.duration"/>
- <optional>
- <ref name="meta.DC.image"/>
- </optional>
- <optional>
- <ref name="meta.DC.description"/>
- </optional>
- <optional>
- <ref name="meta.DC.author"/>
- </optional>
- <optional>
- <ref name="meta.DC.publisher"/>
- </optional>
- <optional>
- <ref name="meta.DC.creator"/>
- </optional>
- <optional>
- <ref name="meta.DC.copyright"/>
- </optional>
- <optional>
- <ref name="meta.DC.source"/>
- </optional>
- </element>
- </define>
- <define name="meta.DC.identifier">
- <element name="meta">
- <attribute name="name">
- <value>DC.identifier</value>
- </attribute>
- <attribute name="content">
- <data type="string">
- <a:documentation>define extremely rigid for now, may become more relaxed one day.
- internal use only.</a:documentation>
- <param name="pattern">[^/]+/\d{4}/\d{2}/\d{2}/\d{4}( .+)?</param>
- </data>
- </attribute>
- </element>
- </define>
- <define name="meta.DC.scheme">
- <element name="meta">
- <a:documentation>Dublin Core PBMI http://dcpapers.dublincore.org/pubs/article/view/749</a:documentation>
- <attribute name="name">
- <value>DC.scheme</value>
- </attribute>
- <attribute name="content">
- <value>/app/pbmi2003-recmod2012/</value>
- </attribute>
- </element>
- </define>
- <define name="meta.DC.language">
- <element name="meta">
- <attribute name="name">
- <value>DC.language</value>
- </attribute>
- <attribute name="content">
- <data type="NCName">
- <a:documentation>ISO 639-1 2-letter language code</a:documentation>
- <param name="pattern">[a-z]{2}</param>
- </data>
- </attribute>
- </element>
- </define>
- <define name="meta.DC.title">
- <element name="meta">
- <attribute name="name">
- <value>DC.title</value>
- </attribute>
- <attribute name="content"/>
- </element>
- </define>
- <define name="meta.DC.title.series">
- <element name="meta">
- <attribute name="name">
- <value>DC.title.series</value>
- </attribute>
- <attribute name="content"/>
- </element>
- </define>
- <define name="meta.DC.title.episode">
- <element name="meta">
- <attribute name="name">
- <value>DC.title.episode</value>
- </attribute>
- <attribute name="content"/>
- </element>
- </define>
- <define name="meta.DC.subject">
- <element name="meta">
- <attribute name="name">
- <value>DC.subject</value>
- </attribute>
- <attribute name="content">
- <data type="anyURI"/>
- </attribute>
- </element>
- </define>
- <define name="meta.DC.format.timestart">
- <element name="meta">
- <attribute name="name">
- <value>DC.format.timestart</value>
- </attribute>
- <attribute name="content">
- <ref name="isoDateTime"/>
- </attribute>
- </element>
- </define>
- <define name="meta.DC.format.timeend">
- <element name="meta">
- <attribute name="name">
- <value>DC.format.timeend</value>
- </attribute>
- <attribute name="content">
- <ref name="isoDateTime"/>
- </attribute>
- </element>
- </define>
- <define name="meta.DC.format.duration">
- <element name="meta">
- <attribute name="name">
- <value>DC.format.duration</value>
- </attribute>
- <attribute name="content">
- <data type="string">
- <param name="pattern">(\d+(\.0)?)|(PT\d+M)</param>
- </data>
- </attribute>
- </element>
- </define>
- <define name="meta.DC.image">
- <element name="meta">
- <attribute name="name">
- <value>DC.image</value>
- </attribute>
- <attribute name="content">
- <data type="anyURI"/>
- </attribute>
- </element>
- </define>
- <define name="meta.DC.description">
- <element name="meta">
- <attribute name="name">
- <value>DC.description</value>
- </attribute>
- <attribute name="content"/>
- </element>
- </define>
- <define name="meta.DC.author">
- <element name="meta">
- <attribute name="name">
- <value>DC.author</value>
- </attribute>
- <attribute name="content"/>
- </element>
- </define>
- <define name="meta.DC.publisher">
- <element name="meta">
- <attribute name="name">
- <value>DC.publisher</value>
- </attribute>
- <attribute name="content"/>
- </element>
- </define>
- <define name="meta.DC.creator">
- <element name="meta">
- <attribute name="name">
- <value>DC.creator</value>
- </attribute>
- <attribute name="content"/>
- </element>
- </define>
- <define name="meta.DC.copyright">
- <element name="meta">
- <attribute name="name">
- <value>DC.copyright</value>
- </attribute>
- <attribute name="content"/>
- </element>
- </define>
- <define name="meta.DC.source">
- <element name="meta">
- <attribute name="name">
- <value>DC.source</value>
- </attribute>
- <attribute name="content">
- <data type="anyURI"/>
- </attribute>
- </element>
- </define>
- </grammar>
|