# RELAX NG Compact Syntax Grammar # Description: Google Spreadsheets: feed of a user's spreadsheets namespace app = "http://www.w3.org/2007/app" namespace atom = "http://www.w3.org/2005/Atom" namespace gd = "http://schemas.google.com/g/2005" namespace openSearch = "http://a9.com/-/spec/opensearch/1.1/" start = spreadsheet_spreadsheetFeed | spreadsheet_spreadsheetEntry # Describes an author atom_author = element atom:author { attribute xml:lang { xsd:string }?, ( atom_email? & atom_name & atom_uri? ) } # Value of the app:edited tag app_edited = element app:edited { (xsd:date | xsd:dateTime) } # Describes an author's email address atom_email = element atom:email { xsd:string } # 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 a spreadsheet category spreadsheet_spreadsheetCategory = element atom:category { attribute scheme { "http://schemas.google.com/spreadsheets/2006" }, attribute term { "http://schemas.google.com/spreadsheets/2006#spreadsheet" } } # Describes a spreadsheet entry in the feed of a user's spreadsheets spreadsheet_spreadsheetEntry = element atom:entry { attribute gd:etag { xsd:string }?, ( app_edited? & atom_author+ & atom_id & atom_outOfLineContent? & atom_updated & element atom:title { atom_textConstruct } & spreadsheet_spreadsheetCategory & spreadsheet_spreadsheetLink+ ) } # Describes a feed of a user's spreadsheets spreadsheet_spreadsheetFeed = element atom:feed { attribute gd:etag { xsd:string }?, ( atom_id & atom_updated & element atom:title { atom_textConstruct } & opensearch_itemsPerPage? & opensearch_startIndex? & opensearch_totalResults & spreadsheet_spreadsheetCategory & spreadsheet_spreadsheetEntry* & spreadsheet_spreadsheetLink+ ) } # Extends the base Link class with Google Spreadsheets extensions spreadsheet_spreadsheetLink = element atom:link { attribute href { xsd:string }, attribute length { xsd:long }?, attribute rel { "alternate" | "edit" | "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/spreadsheets/2006#cellsfeed" | "http://schemas.google.com/spreadsheets/2006#listfeed" | "http://schemas.google.com/spreadsheets/2006#recordsfeed" | "http://schemas.google.com/spreadsheets/2006#worksheetsfeed" | "http://schemas.google.com/visualization/2008#visualizationApi" | "next" | "previous" | "self" }, attribute title { xsd:string }?, attribute type { "application/atom+xml" | "text/html" } } # 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 total number of results associated with this feed opensearch_totalResults = element openSearch:totalResults { xsd:int } # 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 }