# RELAX NG Compact Syntax Grammar # Description: Google Calendar: read-only feed of a user's calendars namespace atom = "http://www.w3.org/2005/Atom" namespace gCal = "http://schemas.google.com/gCal/2005" namespace gd = "http://schemas.google.com/g/2005" namespace openSearch = "http://a9.com/-/spec/opensearch/1.1/" start = calendar_calendarFeed | calendar_calendarEntry # Describes how much a given user may do with an event or calendar calendar_accessLevelProperty = element gCal:accesslevel { attribute value { xsd:string } } # Describes an author atom_author = element atom:author { attribute xml:lang { xsd:string }?, ( atom_email? & atom_name & atom_uri? ) } # Describes a Calendar entry in the feed of a user's calendars calendar_calendarEntry = element atom:entry { attribute gd:etag { xsd:string }?, ( atom_author* & atom_category* & atom_contributor* & atom_id & atom_outOfLineContent? & atom_published? & atom_updated & calendar_accessLevelProperty & calendar_calendarLink+ & calendar_calendarWhere* & calendar_colorProperty & calendar_hiddenProperty & calendar_overrideNameProperty? & calendar_selectedProperty & calendar_timeZoneProperty & calendar_timesCleanedProperty? & element atom:summary { atom_textConstruct }? & element atom:title { atom_textConstruct } ) } # Describes a feed of Calendars calendar_calendarFeed = element atom:feed { attribute gd:etag { xsd:string }?, ( atom_author* & atom_category* & atom_contributor* & atom_generator? & atom_id & atom_updated & calendar_calendarEntry* & calendar_calendarLink+ & element atom:title { atom_textConstruct } & opensearch_itemsPerPage? & opensearch_startIndex? ) } # Extends the base Link class with Calendar extensions calendar_calendarLink = element atom:link { attribute href { xsd:string }, attribute length { xsd:long }?, attribute rel { "alternate" | "edit" | "http://schemas.google.com/acl/2007#accessControlList" | "http://schemas.google.com/acl/2007#controlledObject" | "http://schemas.google.com/g/2005#batch" | "http://schemas.google.com/g/2005#feed" | "http://schemas.google.com/g/2005#post" | "http://schemas.google.com/gCal/2005/webContent" | "next" | "previous" | "related" | "self" }, attribute title { xsd:string }?, attribute type { xsd:string }, calendar_webContent? } # Extends the base Where class with Calendar extensions calendar_calendarWhere = element gd:where { attribute valueString { xsd:string }? } # Describes a category atom_category = element atom:category { attribute label { xsd:string }?, attribute scheme { xsd:string }?, attribute term { xsd:string }, attribute xml:lang { xsd:string }? } # Describes the color of a calendar calendar_colorProperty = element gCal:color { attribute value { "#0D7813" | "#1B887A" | "#28754E" | "#29527A" | "#2952A3" | "#4A716C" | "#4E5D6C" | "#5229A3" | "#528800" | "#5A6986" | "#6E6E41" | "#705770" | "#7A367A" | "#865A5A" | "#88880E" | "#8D6F47" | "#A32929" | "#AB8B00" | "#B1365F" | "#B1440E" | "#BE6D00" } } # Describes a contributor atom_contributor = element atom:contributor { attribute xml:lang { xsd:string }?, ( atom_email? & atom_name & atom_uri? ) } # Describes an author's email address atom_email = element atom:email { xsd:string } # Describes the generator atom_generator = element atom:generator { attribute uri { xsd:string }?, attribute version { xsd:string }?, xsd:string } # Describes whether a calendar is hidden calendar_hiddenProperty = element gCal:hidden { attribute value { xsd:boolean } } # Describes a unique identifier atom_id = element atom:id { xsd:string } # Describes the number of items that will be returned per page for paged feeds opensearch_itemsPerPage = element openSearch:itemsPerPage { xsd:int } # Describes an author's human-readable name atom_name = element atom:name { xsd:string } # Describes an out of line content atom_outOfLineContent = element atom:content { attribute src { xsd:string }, attribute type { xsd:string }? } # Describes the override name property of a calendar calendar_overrideNameProperty = element gCal:overridename { attribute value { xsd:string } } # Describes a creation timestamp atom_published = element atom:published { (xsd:date | xsd:dateTime) } # Describes whether a calendar is selected calendar_selectedProperty = element gCal:selected { attribute value { xsd:boolean } } # Describes the starting index of the contained entries for paged feeds opensearch_startIndex = element openSearch:startIndex { xsd:int } # Describes a text construct containing either plain text, HTML, or XHTML atom_textConstruct = attribute src { xsd:string }?, attribute type { xsd:string }?, attribute xml:lang { xsd:string }?, xsd:string? # Describes the time zone of a calendar calendar_timeZoneProperty = element gCal:timezone { attribute value { xsd:string } } # Describes how many times calendar was cleaned via Manage Calendars calendar_timesCleanedProperty = element gCal:timesCleaned { attribute value { xsd:unsignedInt } } # Describes a last updated timestamp atom_updated = element atom:updated { (xsd:date | xsd:dateTime) } # Describes the URI associated with an author atom_uri = element atom:uri { xsd:string } # Describes a "web content" extension calendar_webContent = element gCal:webContent { attribute height { xsd:int }, attribute url { xsd:string }, attribute width { xsd:int }, calendar_webContentGadgetPref* } # Describes a single web content gadget preference calendar_webContentGadgetPref = element gCal:webContentGadgetPref { attribute name { xsd:string }, attribute value { xsd:string } }