]> Git — Sourcephile - haskell/symantic-atom.git/blob - test/Golden/atom.rnc
init
[haskell/symantic-atom.git] / test / Golden / atom.rnc
1 default namespace = "http://www.w3.org/2005/Atom"
2 namespace local = ""
3 namespace atom = "http://www.w3.org/2005/Atom"
4 namespace xsd = "http://www/w3/org/2001/XMLSchema-datatypes"
5 namespace xhtml = "http://www.w3.org/1999/xhtml"
6 namespace xml = "http://www.w3.org/XML/1998/namespace"
7 anyNode = element * { ( attribute * text )*, anyNode* } | text
8 author = element author person
9 category = element category { attribute term text & ( attribute scheme uri )? & ( attribute label text )? & ( extension+ )? & common }
10 common = ( attribute xml:base uri )? & ( attribute xml:lang languageTag )? & ( undefinedAttribute+ )?
11 content = element content { common, ( attribute type "text", text ) | ( attribute type "html", text ) | ( attribute type "xhtml", divXHTML ) | ( mediaType?, attribute src uri, empty ) | ( mediaType?, text | anyNode ) }
12 contributor = element contributor person
13 dateConstruct = common, xsd:datetime
14 divXHTML = element xhtml:div { ( attribute * text )*, xhtmlNode* | text }
15 emailAddress = xsd:string { pattern = ".+@.+" }
16 entry = element entry { ( author+ )? & ( category+ )? & content? & ( contributor+ )? & id & ( link+ )? & ( element published dateConstruct )? & ( element rights textConstruct )? & source? & ( element summary textConstruct )? & element title textConstruct & element updated dateConstruct & ( extension+ )? & common }
17 extension = element * - atom:* { ( attribute * text )*, anyNode* }
18 feed = element feed { ( author+ )? & ( category+ )? & ( contributor+ )? & generator? & icon? & id & ( link+ )? & logo? & ( element rights textConstruct )? & ( element subtitle textConstruct )? & element title textConstruct & element updated dateConstruct & ( extension+ )? & ( entry+ )? & common }
19 generator = element generator { ( attribute uri uri )? & ( attribute version text )? & common & text }
20 icon = element icon { common, uri }
21 id = element id { common, uri }
22 languageTag = xsd:string { pattern = "[A-Za-z]{1,8}(-[A-Za-z0-9]{1,8})*" }
23 link = element link { attribute href uri & ( attribute rel { relName | uri } )? & ( attribute type { xsd:string { pattern = ".+/.+" } } )? & ( attribute hreflang languageTag )? & ( attribute title text )? & ( attribute length text )? & ( extension+ )? & common }
24 logo = element logo { common, uri }
25 mediaType = xsd:string { pattern = ".+/.+" }
26 person = element name text & ( element uri uri )? & ( element email emailAddress )? & ( extension+ )? & common
27 relName = xsd:string { minLength = "1" pattern = "[^: ]*" }
28 source = element source { ( author+ )? & ( category+ )? & ( contributor+ )? & generator? & icon? & id? & ( link+ )? & logo? & ( element rights textConstruct )? & ( element subtitle textConstruct )? & ( element title textConstruct )? & ( element updated dateConstruct )? & ( extension+ )? & common }
29 textConstruct = ( attribute type "html", common, text ) | ( attribute type "xhtml", common, text ) | ( ( attribute type "text" )?, common, text )
30 undefinedAttribute = attribute * - (xml:base | xml:lang | local:*) text
31 uri = text
32 xhtmlNode = element xhtml:* { ( attribute * text )*, xhtmlNode* } | text