root/livinglogic.python.xist/src/ll/xist/ns/atom.py @ 3691:4af6e4e1cf02

Revision 3691:4af6e4e1cf02, 5.9 KB (checked in by Walter Doerwald <walter@…>, 11 years ago)

Bump copyright year.

Line 
1# -*- coding: utf-8 -*-
2
3## Copyright 2007-2009 by LivingLogic AG, Bayreuth/Germany
4## Copyright 2007-2009 by Walter Dörwald
5##
6## All Rights Reserved
7##
8## See ll/__init__.py for the license
9
10
11"""
12This namespace module implements Atom 1.0 as specified by :rfc:`4287`.
13"""
14
15
16from ll.xist import xsc, sims
17from ll.xist.ns import html
18
19
20__docformat__ = "reStructuredText"
21
22
23xmlns = "http://www.w3.org/2005/Atom"
24
25
26class feed(xsc.Element):
27    """
28    The :class:`feed` element is the document (i.e., top-level) element of an
29    Atom Feed Document, acting as a container for metadata and data associated
30    with the feed.
31    """
32    xmlns = xmlns
33
34
35class entry(xsc.Element):
36    """
37    The :class:`entry` element represents an individual entry, acting as a
38    container for metadata and data associated with the entry.
39    """
40    xmlns = xmlns
41
42
43class content(xsc.Element):
44    """
45    The :class:`content` element either contains or links to the content of
46    the :class:`entry`.
47    """
48    xmlns = xmlns
49    class Attrs(xsc.Element.Attrs):
50        class type(xsc.TextAttr): pass
51        class src(xsc.URLAttr): pass
52
53
54class author(xsc.Element):
55    """
56    The :class:`author` element indicates the author of the
57    :class:`entry` or :class:`feed`.
58    """
59    xmlns = xmlns
60
61
62class category(xsc.Element):
63    """
64    The :class:`category` element conveys information about a category
65    associated with an :class:`entry` or :class:`feed`.
66    """
67    xmlns = xmlns
68    class Attrs(xsc.Element.Attrs):
69        class term(xsc.TextAttr): required = True
70        class scheme(xsc.URLAttr): pass
71        class label(xsc.TextAttr): pass
72
73
74class contributor(xsc.Element):
75    """
76    The :class:`contributor` element indicates a person or other entity
77    who contributed :class:`entry` or :class:`feed`.
78    """
79    xmlns = xmlns
80
81
82class generator(xsc.Element):
83    """
84    The :class:`generator` element's content identifies the agent used to
85    generate a feed, for debugging and other purposes.
86    """
87    xmlns = xmlns
88    class Attrs(xsc.Element.Attrs):
89        class uri(xsc.URLAttr): pass
90        class version(xsc.TextAttr): pass
91
92
93class icon(xsc.Element):
94    """
95    The :class:`icon` element's content is an IRI reference that identifies
96    an image that provides iconic visual identification for a feed.
97    """
98    xmlns = xmlns
99
100
101class id(xsc.Element):
102    """
103    The :class:`id` element conveys a permanent, universally unique identifier
104    for an :class:`entry` or :class:`feed`.
105    """
106    xmlns = xmlns
107
108
109class link(xsc.Element):
110    """
111    The :class:`link` element defines a reference from an
112    :class:`entry` or :class:`feed` to a Web resource.
113    """
114    xmlns = xmlns
115    class Attrs(xsc.Element.Attrs):
116        class href(xsc.URLAttr): required = True
117        class rel(xsc.TextAttr): pass
118        class type(xsc.TextAttr): pass
119        class hreflang(xsc.TextAttr): pass
120        class title(xsc.TextAttr): pass
121        class length(xsc.TextAttr): pass
122
123
124class logo(xsc.Element):
125    """
126    The :class:`logo` element's content is an IRI reference that identifies
127    an image that provides visual identification for a :class:`feed`.
128    """
129    xmlns = xmlns
130
131
132class published(xsc.Element):
133    """
134    The :class:`published` element indicatesg an instant in time associated
135    with an event early in the life cycle of the :class:`entry`.
136    """
137    xmlns = xmlns
138
139
140class rights(xsc.Element):
141    """
142    The :class:`rights` element contains text that conveys information about
143    rights held in and over an :class:`entry` or :class:`feed`.
144    """
145    xmlns = xmlns
146    class Attrs(xsc.Element.Attrs):
147        class type(xsc.TextAttr): pass
148
149
150class source(xsc.Element):
151    """
152    If an :class:`entry` is copied from one :class:`feed` into another
153    :class:`feed`, then the source :class:`feed`'s metadata (all child elements
154    of :class:`feed` other than the :class:`entry` elements) may be preserved
155    within the copied entry by adding a :class:`source` child element, if it is
156    not already present in the :class:`entry`, and including some or all of the
157    source :class:`feed`'s Metadata elements as the :class:`source` element's
158    children.
159    """
160    xmlns = xmlns
161
162
163class subtitle(xsc.Element):
164    """
165    The :class:`subtitle` element contains text that conveys a human-readable
166    description or subtitle for a :class:`feed`.
167    """
168    xmlns = xmlns
169    class Attrs(xsc.Element.Attrs):
170        class type(xsc.TextAttr): pass
171
172
173class summary(xsc.Element):
174    """
175    The :class:`summary` element contains text that conveys a short summary,
176    abstract, or excerpt of an entry.
177    """
178    xmlns = xmlns
179    class Attrs(xsc.Element.Attrs):
180        class type(xsc.TextAttr): pass
181
182
183class title(xsc.Element):
184    """
185    The :class:`title` element contains text that conveys a human-readable
186    title for an :class:`entry` or :class:`feed`.
187    """
188    xmlns = xmlns
189    class Attrs(xsc.Element.Attrs):
190        class type(xsc.TextAttr): pass
191
192
193class updated(xsc.Element):
194    """
195    The :class:`updated` element contains a date indicating the most recent
196    instant in time when an :class:`entry` or :class:`feed` was modified in a
197    way the publisher considers significant.
198    """
199    xmlns = xmlns
200
201
202class email(xsc.Element):
203    """
204    The :class:`email` element's content conveys an e-mail address associated
205    with the person.
206    """
207    xmlns = xmlns
208
209
210class uri(xsc.Element):
211    """
212    The :class:`uri` element's content conveys an IRI associated with the person.
213    """
214    xmlns = xmlns
215
216
217class name(xsc.Element):
218    """
219    The :class:`name` element's content conveys a human-readable name for the
220    person.
221    """
222    xmlns = xmlns
223
224
225link.model = \
226category.model = sims.Empty()
227content.model = sims.ElementsOrText(html.div)
228source.model = sims.ElementsOrText(author, category, contributor, generator, icon, id, link, logo, rights, subtitle, title, updated)
229feed.model = sims.Elements(author, category, contributor, generator, icon, logo, id, link, rights, subtitle, title, updated, entry)
230entry.model = sims.Elements(author, category, content, contributor, id, link, published, rights, source, summary, title, updated)
231contributor.model = \
232author.model = sims.Elements(name, uri, email)
233title.model = \
234summary.model = \
235subtitle.model = \
236rights.model = sims.ElementsOrText(html.div)
237updated.model = \
238published.model = \
239logo.model = \
240id.model = \
241icon.model = \
242generator.model = \
243email.model = \
244uri.model = \
245name.model = sims.NoElements()
Note: See TracBrowser for help on using the browser.