[feedparser commit] r279 - in trunk: feedparser feedparser/docs/xml www/docs www/docs/examples

4 views
Skip to first unread message

codesite...@google.com

unread,
Mar 7, 2008, 12:26:17 AM3/7/08
to feedparse...@googlegroups.com
Author: pilgrim
Date: Thu Mar 6 21:24:55 2008
New Revision: 279

Added:
trunk/www/docs/command-line-arguments.html
trunk/www/docs/command-line-basic.html
trunk/www/docs/command-line-output-formats.html
trunk/www/docs/command-line.html
trunk/www/docs/examples/hcard.xml
Modified:
trunk/feedparser/docs/xml/feedparser.xml
trunk/feedparser/feedparser.py
trunk/www/docs/advanced.html
trunk/www/docs/annotated-atom03.html
trunk/www/docs/annotated-atom10.html
trunk/www/docs/annotated-examples.html
trunk/www/docs/annotated-rss10.html
trunk/www/docs/annotated-rss20-dc.html
trunk/www/docs/annotated-rss20.html
trunk/www/docs/bozo.html
trunk/www/docs/changes-42.html
trunk/www/docs/character-encoding.html
trunk/www/docs/common-atom-elements.html
trunk/www/docs/common-rss-elements.html
trunk/www/docs/content-normalization.html
trunk/www/docs/date-parsing.html
trunk/www/docs/html-sanitization.html
trunk/www/docs/http-etag.html
trunk/www/docs/http-other.html
trunk/www/docs/index.html
trunk/www/docs/introduction.html
trunk/www/docs/microformats.html
trunk/www/docs/namespace-handling.html
trunk/www/docs/reference-bozo.html
trunk/www/docs/reference-bozo_exception.html
trunk/www/docs/reference-encoding.html
trunk/www/docs/reference-entry-summary.html
trunk/www/docs/reference-entry-tags.html
trunk/www/docs/reference-entry.html
trunk/www/docs/reference-etag.html
trunk/www/docs/reference-feed-rights.html
trunk/www/docs/reference-feed-tags.html
trunk/www/docs/reference-feed-textinput.html
trunk/www/docs/reference-feed.html
trunk/www/docs/reference-headers.html
trunk/www/docs/reference-href.html
trunk/www/docs/reference-modified.html
trunk/www/docs/reference-namespaces.html
trunk/www/docs/reference-status.html
trunk/www/docs/reference-version.html
trunk/www/docs/reference.html
trunk/www/docs/resolving-relative-links.html
trunk/www/docs/uncommon-atom.html
trunk/www/docs/uncommon-rss.html

Log:
document RESOLVE_RELATIVE_URIS, hCard parsing, new supported namespaces

Modified: trunk/feedparser/docs/xml/feedparser.xml
==============================================================================
--- trunk/feedparser/docs/xml/feedparser.xml (original)
+++ trunk/feedparser/docs/xml/feedparser.xml Thu Mar 6 21:24:55 2008
@@ -31,6 +31,7 @@
<!ENTITY rfc3339 "&rfc; 3339">
<!ENTITY iso "<acronym>ISO</acronym>">
<!ENTITY uri "<acronym condition='Uniform Resource Identifier'>URI</acronym>">
+<!ENTITY iri "<acronym condition='International Resource Identifier'>IRI</acronym>">
<!ENTITY url "<acronym condition='Uniform Resource Locator'>URL</acronym>">
<!ENTITY cdf "<acronym condition='Channel Definition Format'>CDF</acronym>">
<!ENTITY rss "<acronym condition='Rich Site Summary'>RSS</acronym>">
@@ -39,6 +40,9 @@
<!ENTITY w3cdtf "<acronym condition='W3C Date Time Format'>W3CDTF</acronym>">
<!ENTITY soap "<acronym condition='Simple Object Access Protocol'>SOAP</acronym>">
<!ENTITY xmlbase "&xml;:Base">
+<!ENTITY xfn "<acronym condition='XHTML Friends Network'>XFN</acronym>">
+<!ENTITY hCard "hCard">
+<!ENTITY vCard "vCard">
<!ENTITY time "<filename class='headerfile'>time</filename>">
<!ENTITY urllib2 "<filename class='headerfile'>urllib2</filename>">
<!ENTITY parse "<function>parse</function>">
@@ -105,6 +109,7 @@
<!ENTITY url_example_base "&url_example;base.xml">
<!ENTITY url_example_http_base "&url_example;http_base.xml">
<!ENTITY url_example_no_base "&url_example;no_base.xml">
+<!ENTITY url_example_hcard "&url_example;hcard.xml">
<!ENTITY url_tests_sanitize "&url_feedparser;tests/wellformed/sanitize/">
<!ENTITY url_pythontime "http://docs.python.org/lib/module-time.html">
<!ENTITY url_urllib2 "http://docs.python.org/lib/module-urllib2.html">
@@ -115,6 +120,10 @@
<!ENTITY url_xmlbase "http://www.w3.org/TR/xmlbase/">
<!ENTITY url_podcasting "http://en.wikipedia.org/wiki/Podcasting">
<!ENTITY url_microformats "http://microformats.org/">
+<!ENTITY url_microformats_hcard "&url_microformats;wiki/hcard">
+<!ENTITY url_microformats_reltag "&url_microformats;wiki/rel-tag">
+<!ENTITY url_microformats_relenclosure "&url_microformats;wiki/rel-enclosure">
+<!ENTITY url_xfn "&url_microformats;wiki/XFN">
<!ENTITY url_chardet "http://chardet.feedparser.org/">
<!ENTITY chardet_name "<application>Universal Encoding Detector</application>">
<!ENTITY chardet "<ulink url='&url_chardet;'>&chardet_name;</ulink>">
@@ -973,6 +982,11 @@
<listitem><para><xref linkend="reference.entry.content"/></para></listitem>
</itemizedlist>

+<note>
+<title/>
+<para>The <ulink url="&url_tests_sanitize;">unit tests for &html; sanitizing</ulink> show many different examples of dangerous markup that &feedparser; sanitizes by default.</para>
+</note>
+
<section id="advanced.sanitization.html">
<title>&html; Sanitization</title>
<para>The following &html; elements are allowed by default (all others are stripped):
@@ -1559,7 +1573,7 @@

<note>
<title/>
-<para>The <ulink url="&url_tests_sanitize;">unit tests for &html; sanitizing</ulink> show many different examples of dangerous markup that &feedparser; sanitizes by default.</para>
+<para>Not all possible CSS values are allowed for these properties. The allowable values are restricted by a whitelist and a regular expression that allows color values and lengths. &uri;s are not allowed, to prevent <ulink url="&url_howtoconsumersssafely;">platypus attacks</ulink>. See the <classname>_HTMLSanitizer</classname> class for more details.</para>
</note>

</section>
@@ -1613,28 +1627,12 @@
<para>The more I investigate, the more cases I find where &iewin; will treat seemingly innocuous markup as code and blithely execute it. This is why &feedparser; uses a whitelist and not a blacklist. I am reasonably confident that none of the elements or attributes on the whitelist are security risks. I am not at all confident about elements or attributes that I have not explicitly investigated. And I have no confidence at all in my ability to detect strings within attribute values that &iewin; will treat as executable code.</para>
<itemizedlist role="furtherreading">
<title>Elsewhere</title>
-<listitem><para><ulink url="&url_howtoconsumersssafely;">How to consume RSS safely</ulink> is a (somewhat dated) blog post that formed the basis of my thinking about sanitizing feeds.</para></listitem>
+<listitem><para><ulink url="&url_howtoconsumersssafely;">How to consume RSS safely</ulink> explains the platypus attack.</para></listitem>
</itemizedlist>
</section>

</section>

-<section id="advanced.microformats">
-<?dbhtml filename="microformats.html"?>
-<sectioninfo>
-<abstract>
-<title/>
-<para>One emerging technology that affects feed parsing is the inclusion of <ulink url="&url_microformats;">microformats</ulink> within syndicated content. Besides the semantics defined by individual feed formats, publishers can add additional semantics using <sgmltag class="attribute">rel</sgmltag> and <sgmltag class="attribute">class</sgmltag> attributes in embedded &html; content.</para>
-</abstract>
-</sectioninfo>
-<title>Microformats</title>
-<para>TODO</para>
-<note>
-<title/>
-<para>There are a growing number of microformats, and &feedparser; does not parse all of them. However, both the <sgmltag class="attribute">rel</sgmltag> and <sgmltag class="attribute">class</sgmltag> attributes survive <link linkend="advanced.sanitization">&html; sanitizing</link>, so applications built on &feedparser; that wish to parse microformat content are free to do so.</para>
-</note>
-</section>
-
<section id="advanced.normalization">
<?dbhtml filename="content-normalization.html"?>
<sectioninfo>
@@ -1698,6 +1696,68 @@
</note>
</section>

+<section id="advanced.microformats">
+<?dbhtml filename="microformats.html"?>
+<sectioninfo>
+<abstract>
+<title/>
+<para>One emerging technology that affects feed parsing is the inclusion of <ulink url="&url_microformats;">microformats</ulink> within syndicated content. Besides the semantics defined by individual feed formats, publishers can add additional semantics using <sgmltag class="attribute">rel</sgmltag> and <sgmltag class="attribute">class</sgmltag> attributes in embedded &html; content.</para>
+</abstract>
+</sectioninfo>
+<title>Microformats</title>
+<para>TODO</para>
+
+<section id="advanced.microformats.hcard">
+<title>&hCard;</title>
+<para>TODO</para>
+<example id="example.hcard">
+<title>Parsing embedded &hCard; markup into a &vCard;</title>
+<screen>&prompt;<userinput>import feedparser</userinput>
+&prompt;<userinput>d = feedparser.parse('<ulink url="&url_example_hcard;">&url_example_hcard;</ulink>')</userinput>
+&prompt;<userinput>print d.entries[0].vcard</userinput>
+<computeroutput>BEGIN:vCard
+VERSION:3.0
+FN:Frank Dawson
+N:Dawson;Frank
+ADR;TYPE=work,postal,parcel:;;6544 Battleford Drive;Raleigh;NC;27613-3502;U
+ .S.A.
+TEL;TYPE=WORK,VOICE,MSG:+1-919-676-9515
+TEL;TYPE=WORK,FAX:+1-919-676-9564
+EMAIL;TYPE=internet,pref:Frank_Dawson at Lotus.com
+EMAIL;TYPE=internet:fdawson at earthlink.net
+ORG:Lotus Development Corporation
+URL:http://home.earthlink.net/~fdawson
+END:vCard
+BEGIN:vCard
+VERSION:3.0
+FN:Tim Howes
+N:Howes;Tim
+ADR;TYPE=work:;;501 E. Middlefield Rd.;Mountain View;CA;94043;U.S.A.
+TEL;TYPE=WORK,VOICE,MSG:+1-415-937-3419
+TEL;TYPE=WORK,FAX:+1-415-528-4164
+EMAIL;TYPE=internet:howes at netscape.com
+ORG:Netscape Communications Corp.
+END:vCard</computeroutput></screen>
+</example>
+
+<note>
+<title/>
+<para>There are a growing number of microformats, and &feedparser; does not parse all of them. However, both the <sgmltag class="attribute">rel</sgmltag> and <sgmltag class="attribute">class</sgmltag> attributes survive <link linkend="advanced.sanitization">&html; sanitizing</link>, so applications built on &feedparser; that wish to parse additional microformat content are free to do so.</para>
+</note>
+
+<itemizedlist role="furtherreading">
+<title>Elsewhere</title>
+<listitem><para><ulink url="&url_microformats;">Microformats.org</ulink></para></listitem>
+<listitem><para><ulink url="&url_microformats_hcard;">&hCard; specification</ulink></para></listitem>
+<listitem><para><ulink url="&url_microformats_reltag;"><literal>rel=tag</literal> specification</ulink></para></listitem>
+<listitem><para><ulink url="&url_microformats_relenclosure;"><literal>rel=enclosure</literal> specification</ulink></para></listitem>
+<listitem><para><ulink url="&url_microformats_reltag;"><literal>rel=tag</literal> specification</ulink></para></listitem>
+<listitem><para><ulink url="&url_xfn;">&xfn; specification</ulink></para></listitem>
+</itemizedlist>
+
+</section>
+</section>
+
<section id="advanced.namespaces">
<?dbhtml filename="namespace-handling.html"?>
<sectioninfo>
@@ -1908,6 +1968,10 @@
<entry><literal>http://purl.org/rss/1.0/modules/syndication/</literal></entry>
</row>
<row>
+<entry><literal>szf</literal></entry>
+<entry><literal>http://schemas.pocketsoap.com/rss/myDescModule/</literal></entry>
+</row>
+<row>
<entry><literal>taxo</literal></entry>
<entry><literal>http://purl.org/rss/1.0/modules/taxonomy/</literal></entry>
</row>
@@ -1936,6 +2000,10 @@
<entry><literal>http://www.w3.org/1999/xhtml</literal></entry>
</row>
<row>
+<entry><literal>xlink</literal></entry>
+<entry><literal>http://www.w3.org/1999/xlink</literal></entry>
+</row>
+<row>
<entry><literal>xml</literal></entry>
<entry><literal>http://www.w3.org/XML/1998/namespace</literal></entry>
</row>
@@ -1966,6 +2034,7 @@
</abstract>
</sectioninfo>
<title>Relative Link Resolution</title>
+
<section id="advanced.base.which">
<title>Which Values Are &uri;s</title>
<para>These feed elements are treated as &uri;s, and resolved if they are relative:</para>
@@ -2124,6 +2193,30 @@

</section>

+<section id="advanced.base.disable">
+<title>Disabling Relative &uri;s Resolution</title>
+<para>Though not recommended, it is possible to disable &feedparser;'s relative &uri; resolution by setting <literal>feedparser.RESOLVE_RELATIVE_URIS</literal> to &zero;.</para>
+
+<example id="example.base.disable">
+<title>How to disable relative &uri; resolution</title>
+<screen>&prompt;<userinput>import feedparser</userinput>
+&prompt;<userinput>d = feedparser.parse('<ulink url="&url_example_base;">&url_example_base;</ulink>')</userinput>
+&prompt;<userinput>d.entries[0].content[0].base</userinput>
+<computeroutput>u'http://example.org/archives/000001.html'</computeroutput>
+&prompt;<userinput>print d.entries[0].content[0].value</userinput>
+<computeroutput>&lt;p id="anchor1">&lt;a href="http://example.org/archives/000001.html#anchor2">skip to anchor 2&lt;/a>&lt;/p>
+ &lt;p>Some content&lt;/p>
+ &lt;p id="anchor2">This is anchor 2&lt;/p></computeroutput>
+&prompt;<userinput>feedparser.RESOLVE_RELATIVE_URIS = 0</userinput>
+&prompt;<userinput>d2 = feedparser.parse('<ulink url="&url_example_base;">&url_example_base;</ulink>')</userinput>
+&prompt;<userinput>d2.entries[0].content[0].base</userinput>
+<computeroutput>u'http://example.org/archives/000001.html'</computeroutput>
+&prompt;<userinput>print d2.entries[0].content[0].value</userinput>
+<computeroutput>&lt;p id="anchor1">&lt;a href="#anchor2">skip to anchor 2&lt;/a>&lt;/p>
+ &lt;p>Some content&lt;/p>
+ &lt;p id="anchor2">This is anchor 2&lt;/p></computeroutput></screen>
+</example>
+</section>
</section>

<!--
@@ -2278,8 +2371,7 @@
&prompt;<userinput>exc.getMessage()</userinput>
<computeroutput>"expected '>'\n"</computeroutput>
&prompt;<userinput>exc.getLineNumber()</userinput>
-<computeroutput>6</computeroutput>
-</screen>
+<computeroutput>6</computeroutput></screen>
</example>
<para>There are many reasons an &xml; document could be non-well-formed besides this example (incomplete end tags) See <xref linkend="advanced.encoding"/> for some other ways to trip the bozo bit.</para>
</section>
@@ -2572,6 +2664,48 @@
</section>
</chapter>

+<chapter id="commandline">
+<?dbhtml filename="command-line.html"?>
+<title>Command Line</title>
+
+<section id="commandline.basic">
+<?dbhtml filename="command-line-basic.html"?>
+<sectioninfo>
+<abstract>
+<title/>
+<para>TODO</para>
+</abstract>
+</sectioninfo>
+<title>Basic Command Line Usage</title>
+<para>TODO</para>
+</section>
+
+<section id="commandline.arguments">
+<?dbhtml filename="command-line-arguments.html"?>
+<sectioninfo>
+<abstract>
+<title/>
+<para>TODO</para>
+</abstract>
+</sectioninfo>
+<title>Optional Arguments</title>
+<para>TODO</para>
+</section>
+
+<section id="commandline.outputformats">
+<?dbhtml filename="command-line-output-formats.html"?>
+<sectioninfo>
+<abstract>
+<title/>
+<para>TODO</para>
+</abstract>
+</sectioninfo>
+<title>Output Formats</title>
+<para>TODO</para>
+</section>
+
+</chapter>
+
<chapter id="annotated">
<?dbhtml filename="annotated-examples.html"?>
<title>Annotated Examples</title>
@@ -2934,10 +3068,15 @@
</abstract>
<itemizedlist>
<listitem><para><xref linkend="advanced.microformats"/>.</para></listitem>
+<listitem><para>Updated the whitelist of <link linkend="advanced.sanitization.html">acceptable HTML elements and attributes</link> based on the latest draft of the &html5; specification.</para></listitem>
<listitem><para><xref linkend="advanced.sanitization.css"/>. (Previous versions of &feedparser; simply stripped all inline styles.) Many thanks to Sam Ruby for implementing this, despite my insistence that it was impossible.</para></listitem>
<listitem><para><xref linkend="advanced.sanitization.svg"/> and <xref linkend="advanced.sanitization.mathml"/>. Many thanks to Jacques Distler for patiently debugging these features.</para></listitem>
-<listitem><para>Updated the whitelist of <link linkend="advanced.sanitization.html">acceptable HTML elements and attributes</link> based on the latest draft of the &html5; specification.</para></listitem>
-<listitem><para>Better detection of HTML content in elements with ambiguous content types.</para></listitem>
+<listitem><para>&feedparser; always outputs embedded markup as wellformed &xhtml;, no matter how malformed the input. You can serve the output as <literal>application/xhtml+xml</literal>, and it will never trigger your browser's user-hostile draconian error handling.</para></listitem>
+<listitem><para>&iri; support for every element that can contain a &uri;.</para></listitem>
+<listitem><para>Ability to <link linkend="advanced.base.disable">disable relative &uri; resolution</link>.</para></listitem>
+<!--<listitem><para>Ability to <link linkend="advanced.sanitization.disable">disable &html; sanitizing</link>.</para></listitem>-->
+<listitem><para><link linkend="commandline">Command-line arguments and alternate serializers</link>, for manipulating &feedparser; from shell scripts or other non-Python sources.</para></listitem>
+<listitem><para>More robust parsing of author email addresses, misencoded win-1252 content, <literal>rel=self</literal> links, and better detection of HTML content in elements with ambiguous content types.</para></listitem>
</itemizedlist>
</section>
<section id="changes.41">

Modified: trunk/feedparser/feedparser.py
==============================================================================
--- trunk/feedparser/feedparser.py (original)
+++ trunk/feedparser/feedparser.py Thu Mar 6 21:24:55 2008
@@ -416,6 +416,7 @@
'http://hacks.benhammersley.com/rss/streaming/': 'str',
'http://purl.org/rss/1.0/modules/subscription/': 'sub',
'http://purl.org/rss/1.0/modules/syndication/': 'sy',
+ 'http://schemas.pocketsoap.com/rss/myDescModule/': 'szf',
'http://purl.org/rss/1.0/modules/taxonomy/': 'taxo',
'http://purl.org/rss/1.0/modules/threading/': 'thr',
'http://purl.org/rss/1.0/modules/textinput/': 'ti',
@@ -423,9 +424,8 @@
'http://wellformedweb.org/commentAPI/': 'wfw',
'http://purl.org/rss/1.0/modules/wiki/': 'wiki',
'http://www.w3.org/1999/xhtml': 'xhtml',
- 'http://www.w3.org/XML/1998/namespace': 'xml',
'http://www.w3.org/1999/xlink': 'xlink',
- 'http://schemas.pocketsoap.com/rss/myDescModule/': 'szf'
+ 'http://www.w3.org/XML/1998/namespace': 'xml'
}
_matchnamespaces = {}

@@ -512,14 +512,6 @@
# element declared itself as escaped markup, but it isn't really
self.contentparams['type'] = 'application/xhtml+xml'
if self.incontent and self.contentparams.get('type') == 'application/xhtml+xml':
- # Note: probably shouldn't simply recreate localname here, but
- # our namespace handling isn't actually 100% correct in cases where
- # the feed redefines the default namespace (which is actually
- # the usual case for inline content, thanks Sam), so here we
- # cheat and just reconstruct the element based on localname
- # because that compensates for the bugs in our namespace handling.
- # This will horribly munge inline content with non-empty qnames,
- # but nobody actually does that, so I'm not fixing it.
if tag.find(':') <> -1:
prefix, tag = tag.split(':', 1)
namespace = self.namespacesInUse.get(prefix, '')

Modified: trunk/www/docs/advanced.html
==============================================================================
--- trunk/www/docs/advanced.html (original)
+++ trunk/www/docs/advanced.html Thu Mar 6 21:24:55 2008
@@ -38,13 +38,16 @@
<li><span class="section"><a href="html-sanitization.html#advanced.sanitization.why">Whitelist, Don't Blacklist</a></span></li>
</ul>
</li>
-<li><span class="section"><a href="microformats.html">Microformats</a></span></li>
<li><span class="section"><a href="content-normalization.html">Content Normalization</a></span></li>
+<li>
+<span class="section"><a href="microformats.html">Microformats</a></span><ul><li><span class="section"><a href="microformats.html#advanced.microformats.hcard">hCard</a></span></li></ul>
+</li>
<li><span class="section"><a href="namespace-handling.html">Namespace Handling</a></span></li>
<li>
<span class="section"><a href="resolving-relative-links.html">Relative Link Resolution</a></span><ul>
<li><span class="section"><a href="resolving-relative-links.html#advanced.base.which">Which Values Are URIs</a></span></li>
<li><span class="section"><a href="resolving-relative-links.html#advanced.base.how">How Relative URIs Are Resolved</a></span></li>
+<li><span class="section"><a href="resolving-relative-links.html#advanced.base.disable">Disabling Relative URIs Resolution</a></span></li>
</ul>
</li>
<li><span class="section"><a href="version-detection.html">Feed Type and Version Detection</a></span></li>

Modified: trunk/www/docs/annotated-atom03.html
==============================================================================
--- trunk/www/docs/annotated-atom03.html (original)
+++ trunk/www/docs/annotated-atom03.html Thu Mar 6 21:24:55 2008
@@ -27,7 +27,7 @@
</div>
<div></div>
</div>
-<a name="id298110"></a><table class="caution" border="0" summary="">
+<a name="id298633"></a><table class="caution" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/caution.png" alt="Caution" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">Even though many of these elements are required according to the specification, real-world feeds may be missing any element. If an element is not present in the feed, it will not be present in the parsed results. You should not rely on any particular element being present.</td></tr>
</table>

Modified: trunk/www/docs/annotated-atom10.html
==============================================================================
--- trunk/www/docs/annotated-atom10.html (original)
+++ trunk/www/docs/annotated-atom10.html Thu Mar 6 21:24:55 2008
@@ -27,7 +27,7 @@
</div>
<div></div>
</div>
-<a name="id297711"></a><table class="caution" border="0" summary="">
+<a name="id298204"></a><table class="caution" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/caution.png" alt="Caution" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">Even though many of these elements are required according to the specification, real-world feeds may be missing any element. If an element is not present in the feed, it will not be present in the parsed results. You should not rely on any particular element being present.</td></tr>
</table>

Modified: trunk/www/docs/annotated-examples.html
==============================================================================
--- trunk/www/docs/annotated-examples.html (original)
+++ trunk/www/docs/annotated-examples.html Thu Mar 6 21:24:55 2008
@@ -9,7 +9,7 @@
<meta name="keywords" content="RSS, Atom, CDF, XML, feed, parser, Python">
<link rel="start" href="index.html" title="Documentation">
<link rel="up" href="index.html" title="Documentation">
-<link rel="prev" href="http-other.html" title="Other HTTP Headers">
+<link rel="prev" href="command-line-output-formats.html" title="Output Formats">
<link rel="next" href="annotated-atom10.html" title="Atom 1.0">
</head>
<body id="feedparser-org" class="docs">
@@ -29,7 +29,7 @@
<li><span class="section"><a href="annotated-rss10.html">RSS 1.0</a></span></li>
</ul></div>
</div>
-<div style="float: left">← <a class="NavigationArrow" href="http-other.html">Other HTTP Headers</a>
+<div style="float: left">← <a class="NavigationArrow" href="command-line-output-formats.html">Output Formats</a>
</div>
<div style="text-align: right">
<a class="NavigationArrow" href="annotated-atom10.html">Atom 1.0</a> →</div>

Modified: trunk/www/docs/annotated-rss10.html
==============================================================================
--- trunk/www/docs/annotated-rss10.html (original)
+++ trunk/www/docs/annotated-rss10.html Thu Mar 6 21:24:55 2008
@@ -27,7 +27,7 @@
</div>
<div></div>
</div>
-<a name="id299128"></a><table class="caution" border="0" summary="">
+<a name="id299651"></a><table class="caution" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/caution.png" alt="Caution" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">Even though many of these elements are required according to the specification, real-world feeds may be missing any element. If an element is not present in the feed, it will not be present in the parsed results. You should not rely on any particular element being present.</td></tr>
</table>

Modified: trunk/www/docs/annotated-rss20-dc.html
==============================================================================
--- trunk/www/docs/annotated-rss20-dc.html (original)
+++ trunk/www/docs/annotated-rss20-dc.html Thu Mar 6 21:24:55 2008
@@ -27,7 +27,7 @@
</div>
<div></div>
</div>
-<a name="id298909"></a><table class="caution" border="0" summary="">
+<a name="id299432"></a><table class="caution" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/caution.png" alt="Caution" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">Even though many of these elements are required according to the specification, real-world feeds may be missing any element. If an element is not present in the feed, it will not be present in the parsed results. You should not rely on any particular element being present.</td></tr>
</table>

Modified: trunk/www/docs/annotated-rss20.html
==============================================================================
--- trunk/www/docs/annotated-rss20.html (original)
+++ trunk/www/docs/annotated-rss20.html Thu Mar 6 21:24:55 2008
@@ -27,7 +27,7 @@
</div>
<div></div>
</div>
-<a name="id298541"></a><table class="caution" border="0" summary="">
+<a name="id299064"></a><table class="caution" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/caution.png" alt="Caution" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">Even though many of these elements are required according to the specification, real-world feeds may be missing any element. If an element is not present in the feed, it will not be present in the parsed results. You should not rely on any particular element being present.</td></tr>
</table>

Modified: trunk/www/docs/bozo.html
==============================================================================
--- trunk/www/docs/bozo.html (original)
+++ trunk/www/docs/bozo.html Thu Mar 6 21:24:55 2008
@@ -42,8 +42,7 @@
<tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput">exc.getMessage()</span>
<span class="computeroutput">"expected '&gt;'\n"</span>
<tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput">exc.getLineNumber()</span>
-<span class="computeroutput">6</span>
-</pre>
+<span class="computeroutput">6</span></pre>
</div>
<p>There are many reasons an <acronym title="Extensible Markup Language">XML</acronym> document could be non-well-formed besides this example (incomplete end tags) See <a href="character-encoding.html" title="Character Encoding Detection">Character Encoding Detection</a> for some other ways to trip the bozo bit.</p>
</div>

Modified: trunk/www/docs/changes-42.html
==============================================================================
--- trunk/www/docs/changes-42.html (original)
+++ trunk/www/docs/changes-42.html Thu Mar 6 21:24:55 2008
@@ -25,12 +25,19 @@
<div class="itemizedlist"><ul>
<li>
<a href="microformats.html" title="Microformats">Microformats</a>.</li>
+<li>Updated the whitelist of <a href="html-sanitization.html#advanced.sanitization.html" title="HTML Sanitization">acceptable HTML elements and attributes</a> based on the latest draft of the <acronym title="HyperText Markup Language">HTML</acronym> 5 specification.</li>
<li>
<a href="html-sanitization.html#advanced.sanitization.css" title="CSS Sanitization">CSS Sanitization</a>. (Previous versions of <span class="application">Universal Feed Parser</span> simply stripped all inline styles.) Many thanks to Sam Ruby for implementing this, despite my insistence that it was impossible.</li>
<li>
<a href="html-sanitization.html#advanced.sanitization.svg" title="SVG Sanitization">SVG Sanitization</a> and <a href="html-sanitization.html#advanced.sanitization.mathml" title="MathML Sanitization">MathML Sanitization</a>. Many thanks to Jacques Distler for patiently debugging these features.</li>
-<li>Updated the whitelist of <a href="html-sanitization.html#advanced.sanitization.html" title="HTML Sanitization">acceptable HTML elements and attributes</a> based on the latest draft of the <acronym title="HyperText Markup Language">HTML</acronym> 5 specification.</li>
-<li>Better detection of HTML content in elements with ambiguous content types.</li>
+<li>
+<span class="application">Universal Feed Parser</span> always outputs embedded markup as wellformed <acronym title="Extensible HyperText Markup Language">XHTML</acronym>, no matter how malformed the input. You can serve the output as <tt class="literal">application/xhtml+xml</tt>, and it will never trigger your browser's user-hostile draconian error handling.</li>
+<li>
+<acronym title="International Resource Identifier">IRI</acronym> support for every element that can contain a <acronym title="Uniform Resource Identifier">URI</acronym>.</li>
+<li>Ability to <a href="resolving-relative-links.html#advanced.base.disable" title="Disabling Relative URIs Resolution">disable relative <acronym title="Uniform Resource Identifier">URI</acronym> resolution</a>.</li>
+<li>
+<a href="command-line.html" title="Command Line">Command-line arguments and alternate serializers</a>, for manipulating <span class="application">Universal Feed Parser</span> from shell scripts or other non-Python sources.</li>
+<li>More robust parsing of author email addresses, misencoded win-1252 content, <tt class="literal">rel=self</tt> links, and better detection of HTML content in elements with ambiguous content types.</li>
</ul></div>
</div>
<div style="float: left">← <a class="NavigationArrow" href="history.html">Revision history</a>

Modified: trunk/www/docs/character-encoding.html
==============================================================================
--- trunk/www/docs/character-encoding.html (original)
+++ trunk/www/docs/character-encoding.html Thu Mar 6 21:24:55 2008
@@ -21,7 +21,7 @@
<a name="advanced.encoding" class="skip" href="#advanced.encoding" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> Character Encoding Detection</h2></div></div>
<div></div>
</div>
-<a name="id295405"></a><table class="tip" border="0" summary="">
+<a name="id295462"></a><table class="tip" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/tip.png" alt="Tip" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">Feeds may be published in any character encoding. <span class="application">Python</span> supports only a few character encodings by default. To support the maximum number of character encodings (and be able to parse the maximum number of feeds), you should install <tt class="filename">cjkcodecs</tt> and <tt class="filename">iconv_codec</tt>. Both are available at <a href="http://cjkpython.i18n.org/">http://cjkpython.i18n.org/</a>.</td></tr>
</table>

Added: trunk/www/docs/command-line-arguments.html
==============================================================================
--- (empty file)
+++ trunk/www/docs/command-line-arguments.html Thu Mar 6 21:24:55 2008
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Optional Arguments [Universal Feed Parser]</title>
+<link rel="stylesheet" href="../css/feedparser.css" type="text/css">
+<link rev="made" href="mailto:ma...@diveintomark.org">
+<meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
+<meta name="keywords" content="RSS, Atom, CDF, XML, feed, parser, Python">
+<link rel="start" href="index.html" title="Documentation">
+<link rel="up" href="command-line.html" title="Command Line">
+<link rel="prev" href="command-line-basic.html" title="Basic Command Line Usage">
+<link rel="next" href="command-line-output-formats.html" title="Output Formats">
+</head>
+<body id="feedparser-org" class="docs">
+<!--#include virtual="/inc/header.html"--><div id="main"><div id="mainInner">
+<p id="breadcrumb">You are here: <a href="../">Home</a> → <a href="index.html">Documentation</a> → <a href="command-line.html">Command Line</a> → <span class="thispage">Optional Arguments</span></p>
+<div class="section" lang="en">
+<div class="titlepage">
+<div>
+<div><h2 class="title">
+<a name="commandline.arguments" class="skip" href="#commandline.arguments" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> Optional Arguments</h2></div>
+<div><div class="abstract">
+<h3 class="title"></h3>
+<p>TODO</p>
+</div></div>
+</div>
+<div></div>
+</div>
+<p>TODO</p>
+</div>
+<div style="float: left">← <a class="NavigationArrow" href="command-line-basic.html">Basic Command Line Usage</a>
+</div>
+<div style="text-align: right">
+<a class="NavigationArrow" href="command-line-output-formats.html">Output Formats</a> →</div>
+<hr style="clear:both">
+<div class="footer"><p class="copyright">Copyright (c) 2004, 2005, 2006, 2007, 2008 Mark Pilgrim</p></div>
+</div></div>
+</body>
+</html>

Added: trunk/www/docs/command-line-basic.html
==============================================================================
--- (empty file)
+++ trunk/www/docs/command-line-basic.html Thu Mar 6 21:24:55 2008
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Basic Command Line Usage [Universal Feed Parser]</title>
+<link rel="stylesheet" href="../css/feedparser.css" type="text/css">
+<link rev="made" href="mailto:ma...@diveintomark.org">
+<meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
+<meta name="keywords" content="RSS, Atom, CDF, XML, feed, parser, Python">
+<link rel="start" href="index.html" title="Documentation">
+<link rel="up" href="command-line.html" title="Command Line">
+<link rel="prev" href="command-line.html" title="Command Line">
+<link rel="next" href="command-line-arguments.html" title="Optional Arguments">
+</head>
+<body id="feedparser-org" class="docs">
+<!--#include virtual="/inc/header.html"--><div id="main"><div id="mainInner">
+<p id="breadcrumb">You are here: <a href="../">Home</a> → <a href="index.html">Documentation</a> → <a href="command-line.html">Command Line</a> → <span class="thispage">Basic Command Line Usage</span></p>
+<div class="section" lang="en">
+<div class="titlepage">
+<div>
+<div><h2 class="title">
+<a name="commandline.basic" class="skip" href="#commandline.basic" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> Basic Command Line Usage</h2></div>
+<div><div class="abstract">
+<h3 class="title"></h3>
+<p>TODO</p>
+</div></div>
+</div>
+<div></div>
+</div>
+<p>TODO</p>
+</div>
+<div style="float: left">← <a class="NavigationArrow" href="command-line.html">Command Line</a>
+</div>
+<div style="text-align: right">
+<a class="NavigationArrow" href="command-line-arguments.html">Optional Arguments</a> →</div>
+<hr style="clear:both">
+<div class="footer"><p class="copyright">Copyright (c) 2004, 2005, 2006, 2007, 2008 Mark Pilgrim</p></div>
+</div></div>
+</body>
+</html>

Added: trunk/www/docs/command-line-output-formats.html
==============================================================================
--- (empty file)
+++ trunk/www/docs/command-line-output-formats.html Thu Mar 6 21:24:55 2008
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Output Formats [Universal Feed Parser]</title>
+<link rel="stylesheet" href="../css/feedparser.css" type="text/css">
+<link rev="made" href="mailto:ma...@diveintomark.org">
+<meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
+<meta name="keywords" content="RSS, Atom, CDF, XML, feed, parser, Python">
+<link rel="start" href="index.html" title="Documentation">
+<link rel="up" href="command-line.html" title="Command Line">
+<link rel="prev" href="command-line-arguments.html" title="Optional Arguments">
+<link rel="next" href="annotated-examples.html" title="Annotated Examples">
+</head>
+<body id="feedparser-org" class="docs">
+<!--#include virtual="/inc/header.html"--><div id="main"><div id="mainInner">
+<p id="breadcrumb">You are here: <a href="../">Home</a> → <a href="index.html">Documentation</a> → <a href="command-line.html">Command Line</a> → <span class="thispage">Output Formats</span></p>
+<div class="section" lang="en">
+<div class="titlepage">
+<div>
+<div><h2 class="title">
+<a name="commandline.outputformats" class="skip" href="#commandline.outputformats" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> Output Formats</h2></div>
+<div><div class="abstract">
+<h3 class="title"></h3>
+<p>TODO</p>
+</div></div>
+</div>
+<div></div>
+</div>
+<p>TODO</p>
+</div>
+<div style="float: left">← <a class="NavigationArrow" href="command-line-arguments.html">Optional Arguments</a>
+</div>
+<div style="text-align: right">
+<a class="NavigationArrow" href="annotated-examples.html">Annotated Examples</a> →</div>
+<hr style="clear:both">
+<div class="footer"><p class="copyright">Copyright (c) 2004, 2005, 2006, 2007, 2008 Mark Pilgrim</p></div>
+</div></div>
+</body>
+</html>

Added: trunk/www/docs/command-line.html
==============================================================================
--- (empty file)
+++ trunk/www/docs/command-line.html Thu Mar 6 21:24:55 2008
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Command Line [Universal Feed Parser]</title>
+<link rel="stylesheet" href="../css/feedparser.css" type="text/css">
+<link rev="made" href="mailto:ma...@diveintomark.org">
+<meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
+<meta name="keywords" content="RSS, Atom, CDF, XML, feed, parser, Python">
+<link rel="start" href="index.html" title="Documentation">
+<link rel="up" href="index.html" title="Documentation">
+<link rel="prev" href="http-other.html" title="Other HTTP Headers">
+<link rel="next" href="command-line-basic.html" title="Basic Command Line Usage">
+</head>
+<body id="feedparser-org" class="docs">
+<!--#include virtual="/inc/header.html"--><div id="main"><div id="mainInner">
+<p id="breadcrumb">You are here: <a href="../">Home</a> → <a href="index.html">Documentation</a> → <span class="thispage">Command Line</span></p>
+<div class="chapter" lang="en">
+<div class="titlepage">
+<div><div><h2 class="title">
+<a name="commandline" class="skip" href="#commandline" title="link to this chapter"><img src="images/permalink.gif" alt="[link]" title="link to this chapter" width="8" height="9"></a> Command Line</h2></div></div>
+<div></div>
+</div>
+<div class="toc"><ul>
+<li><span class="section"><a href="command-line-basic.html">Basic Command Line Usage</a></span></li>
+<li><span class="section"><a href="command-line-arguments.html">Optional Arguments</a></span></li>
+<li><span class="section"><a href="command-line-output-formats.html">Output Formats</a></span></li>
+</ul></div>
+</div>
+<div style="float: left">← <a class="NavigationArrow" href="http-other.html">Other HTTP Headers</a>
+</div>
+<div style="text-align: right">
+<a class="NavigationArrow" href="command-line-basic.html">Basic Command Line Usage</a> →</div>
+<hr style="clear:both">
+<div class="footer"><p class="copyright">Copyright (c) 2004, 2005, 2006, 2007, 2008 Mark Pilgrim</p></div>
+</div></div>
+</body>
+</html>

Modified: trunk/www/docs/common-atom-elements.html
==============================================================================
--- trunk/www/docs/common-atom-elements.html (original)
+++ trunk/www/docs/common-atom-elements.html Thu Mar 6 21:24:55 2008
@@ -116,7 +116,7 @@
'language': u'en-US',
'value': u'&lt;div&gt;Watch out for &lt;span&gt;nasty tricks&lt;/span&gt;&lt;/div&gt;'}]</span></pre>
</div>
-<a name="id286141"></a><table class="note" border="0" summary="">
+<a name="id286169"></a><table class="note" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/note.png" alt="Note" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">The parsed <tt class="sgmltag-element">summary</tt> and <tt class="sgmltag-element">content</tt> are not the same as they appear in the original feed. The original elements contained dangerous <acronym title="HyperText Markup Language">HTML</acronym> markup which was sanitized. See <a href="html-sanitization.html" title="Sanitization">Sanitization</a> for details.</td></tr>
</table>

Modified: trunk/www/docs/common-rss-elements.html
==============================================================================
--- trunk/www/docs/common-rss-elements.html (original)
+++ trunk/www/docs/common-rss-elements.html Thu Mar 6 21:24:55 2008
@@ -77,7 +77,7 @@
<tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput">d.entries[0].id</span>
<span class="computeroutput">u'http://example.org/guid/1'</span></pre>
</div>
-<a name="id285756"></a><table class="tip" border="0" summary="">
+<a name="id285783"></a><table class="tip" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/tip.png" alt="Tip" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">You can also access data from <acronym title="Rich Site Summary">RSS</acronym> feeds using Atom terminology. See <a href="content-normalization.html" title="Content Normalization">Content Normalization</a> for details.</td></tr>
</table>

Modified: trunk/www/docs/content-normalization.html
==============================================================================
--- trunk/www/docs/content-normalization.html (original)
+++ trunk/www/docs/content-normalization.html Thu Mar 6 21:24:55 2008
@@ -9,8 +9,8 @@
<meta name="keywords" content="RSS, Atom, CDF, XML, feed, parser, Python">
<link rel="start" href="index.html" title="Documentation">
<link rel="up" href="advanced.html" title="Advanced Features">
-<link rel="prev" href="microformats.html" title="Microformats">
-<link rel="next" href="namespace-handling.html" title="Namespace Handling">
+<link rel="prev" href="html-sanitization.html" title="Sanitization">
+<link rel="next" href="microformats.html" title="Microformats">
</head>
<body id="feedparser-org" class="docs">
<!--#include virtual="/inc/header.html"--><div id="main"><div id="mainInner">
@@ -75,15 +75,15 @@
<tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput">e.updated_parsed</span>
<span class="computeroutput">(2002, 9, 5, 0, 0, 1, 3, 248, 0)</span></pre>
</div>
-<a name="id292477"></a><table class="note" border="0" summary="">
+<a name="id292443"></a><table class="note" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/note.png" alt="Note" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">For more examples of how <span class="application">Universal Feed Parser</span> normalizes content from different formats, see <a href="annotated-examples.html" title="Annotated Examples">Annotated Examples</a>.</td></tr>
</table>
</div>
-<div style="float: left">← <a class="NavigationArrow" href="microformats.html">Microformats</a>
+<div style="float: left">← <a class="NavigationArrow" href="html-sanitization.html">Sanitization</a>
</div>
<div style="text-align: right">
-<a class="NavigationArrow" href="namespace-handling.html">Namespace Handling</a> →</div>
+<a class="NavigationArrow" href="microformats.html">Microformats</a> →</div>
<hr style="clear:both">
<div class="footer"><p class="copyright">Copyright (c) 2004, 2005, 2006, 2007, 2008 Mark Pilgrim</p></div>
</div></div>

Modified: trunk/www/docs/date-parsing.html
==============================================================================
--- trunk/www/docs/date-parsing.html (original)
+++ trunk/www/docs/date-parsing.html Thu Mar 6 21:24:55 2008
@@ -70,7 +70,7 @@
</div>
<p>Here is a representative list of the formats that <span class="application">Universal Feed Parser</span> can recognize in any date element:</p>
<div class="table">
-<a name="id287461" class="skip" href="#id287461" title="link to this table"><img src="images/permalink.gif" alt="[link]" title="link to this table" width="8" height="9"></a> <h3 class="title">Recognized Date Formats</h3>
+<a name="id287490" class="skip" href="#id287490" title="link to this table"><img src="images/permalink.gif" alt="[link]" title="link to this table" width="8" height="9"></a> <h3 class="title">Recognized Date Formats</h3>
<table summary="Recognized Date Formats" border="1">
<colgroup>
<col>
@@ -272,7 +272,7 @@
</div>
<p>Your newly-registered date handler will be tried before all the other date handlers built into <span class="application">Universal Feed Parser</span>. (More specifically, all date handlers are tried in "last in, first out" order; i.e. the last handler to be registered is the first one tried, and so on in reverse order of registration.)</p>
<p>If your date handler returns <tt class="constant">None</tt>, or anything other than a <span class="application">Python</span> 9-tuple date, or raises an exception of any kind, the error will be silently ignored and the other registered date handlers will be tried in order. If no date handlers succeed, then the date is not parsed, and the <tt class="sgmltag-element">*_parsed</tt> value will not be present in the results dictionary. The original date string will still be available in the appropriate element in the results dictionary.</p>
-<a name="id288168"></a><table class="tip" border="0" summary="">
+<a name="id288197"></a><table class="tip" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/tip.png" alt="Tip" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">If you write a new date handler, you are encouraged (but not required) to <a href="http://sourceforge.net/projects/feedparser/">submit a patch</a> so it can be integrated into the next version of <span class="application">Universal Feed Parser</span>.</td></tr>
</table>

Added: trunk/www/docs/examples/hcard.xml
==============================================================================
--- (empty file)
+++ trunk/www/docs/examples/hcard.xml Thu Mar 6 21:24:55 2008
@@ -0,0 +1,59 @@
+<feed xmlns="http://www.w3.org/2005/Atom">
+<title>hCard example</title>
+<entry>
+<content type="xhtml">
+<div xmlns="http://www.w3.org/1999/xhtml">
+<div class="vcard">
+<a class="url fn" href="http://home.earthlink.net/~fdawson">Frank Dawson</a>
+<div class="org">Lotus Development Corporation</div>
+<div class="adr">
+ <span class="type">work</span> address
+(<abbr class="type" title="postal">mail</abbr> and
+ <abbr class="type" title="parcel">packages</abbr>):
+ <div class="street-address">6544 Battleford Drive</div>
+ <span class="locality">Raleigh</span>
+ <span class="region">NC</span>
+ <span class="postal-code">27613-3502</span>
+ <div class="country-name">U.S.A.</div>
+</div>
+<div class="tel">
+ <span class="value">+1-919-676-9515</span>
+(<abbr class="type" title="WORK">w</abbr>,
+ <abbr class="type" title="VOICE">v</abbr><abbr class="type" title="MSG">m</abbr>)
+</div>
+<div class="tel">
+ <span class="value">+1-919-676-9564</span>
+(<abbr class="type" title="WORK">w</abbr><abbr class="type" title="FAX">f</abbr>)
+</div>
+<a class="email" href="mailto:Frank_...@Lotus.com">
+ <span class="type">pref</span>erred email
+</a>,
+<a class="email" href="mailto:fda...@earthlink.net">
+ alternate email
+</a>
+</div>
+<div class="vcard">
+<a class="email fn" href="mailto:ho...@netscape.com">Tim Howes</a>
+<div class="org">Netscape Communications Corp.</div>
+<div class="adr">
+ <span class="type">work</span> address:
+ <div class="street-address">501 E. Middlefield Rd.</div>
+ <span class="locality">Mountain View</span>,
+ <span class="region">CA</span>
+ <span class="postal-code">94043</span>
+ <div class="country-name">U.S.A.</div>
+</div>
+<div class="tel">
+ <span class="value">+1-415-937-3419</span>
+(<abbr class="type" title="WORK">w</abbr>,
+ <abbr class="type" title="VOICE">v</abbr><abbr class="type" title="MSG">m</abbr>)
+</div>
+<div class="tel">
+ <span class="value">+1-415-528-4164</span>
+(<abbr class="type" title="WORK">w</abbr><abbr class="type" title="FAX">f</abbr>)
+</div>
+</div>
+</div>
+</content>
+</entry>
+</feed>
\ No newline at end of file

Modified: trunk/www/docs/html-sanitization.html
==============================================================================
--- trunk/www/docs/html-sanitization.html (original)
+++ trunk/www/docs/html-sanitization.html Thu Mar 6 21:24:55 2008
@@ -10,7 +10,7 @@
<link rel="start" href="index.html" title="Documentation">
<link rel="up" href="advanced.html" title="Advanced Features">
<link rel="prev" href="date-parsing.html" title="Date Parsing">
-<link rel="next" href="microformats.html" title="Microformats">
+<link rel="next" href="content-normalization.html" title="Content Normalization">
</head>
<body id="feedparser-org" class="docs">
<!--#include virtual="/inc/header.html"--><div id="main"><div id="mainInner">
@@ -32,6 +32,10 @@
<li><a href="reference-entry-summary.html" title="entries[i].summary">entries[i].summary</a></li>
<li><a href="reference-entry-content.html" title="entries[i].content">entries[i].content</a></li>
</ul></div>
+<a name="id288317"></a><table class="note" border="0" summary="">
+<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/note.png" alt="Note" title="" width="24" height="24"></td></tr>
+<tr><td colspan="2" align="left" valign="top" width="99%">The <a href="http://feedparser.org/tests/wellformed/sanitize/">unit tests for <acronym title="HyperText Markup Language">HTML</acronym> sanitizing</a> show many different examples of dangerous markup that <span class="application">Universal Feed Parser</span> sanitizes by default.</td></tr>
+</table>
<div class="section" lang="en">
<div class="titlepage">
<div><div><h3 class="title">
@@ -80,9 +84,9 @@
<p>The following <acronym title="Cascading Style Sheets">CSS</acronym> properties are allowed by default in <tt class="sgmltag-attribute">style</tt> attributes (all others are stripped):
<span class="simplelist"><tt class="sgmltag-element">azimuth</tt>, <tt class="sgmltag-element">background-color</tt>, <tt class="sgmltag-element">border-bottom-color</tt>, <tt class="sgmltag-element">border-collapse</tt>, <tt class="sgmltag-element">border-color</tt>, <tt class="sgmltag-element">border-left-color</tt>, <tt class="sgmltag-element">border-right-color</tt>, <tt class="sgmltag-element">border-top-color</tt>, <tt class="sgmltag-element">clear</tt>, <tt class="sgmltag-element">color</tt>, <tt class="sgmltag-element">cursor</tt>, <tt class="sgmltag-element">direction</tt>, <tt class="sgmltag-element">display</tt>, <tt class="sgmltag-element">elevation</tt>, <tt class="sgmltag-element">float</tt>, <tt class="sgmltag-element">font</tt>, <tt class="sgmltag-element">font-family</tt>, <tt class="sgmltag-element">font-size</tt>, <tt class="sgmltag-element">font-style</tt>, <tt class="sgmltag-element">font-variant</tt>, <tt class="sgmltag-element">font-weight</tt>, <tt class="sgmltag-element">height</tt>, <tt class="sgmltag-element">letter-spacing</tt>, <tt class="sgmltag-element">line-height</tt>, <tt class="sgmltag-element">overflow</tt>, <tt class="sgmltag-element">pause</tt>, <tt class="sgmltag-element">pause-after</tt>, <tt class="sgmltag-element">pause-before</tt>, <tt class="sgmltag-element">pitch</tt>, <tt class="sgmltag-element">pitch-range</tt>, <tt class="sgmltag-element">richness</tt>, <tt class="sgmltag-element">speak</tt>, <tt class="sgmltag-element">speak-header</tt>, <tt class="sgmltag-element">speak-numeral</tt>, <tt class="sgmltag-element">speak-punctuation</tt>, <tt class="sgmltag-element">speech-rate</tt>, <tt class="sgmltag-element">stress</tt>, <tt class="sgmltag-element">text-align</tt>, <tt class="sgmltag-element">text-decoration</tt>, <tt class="sgmltag-element">text-indent</tt>, <tt class="sgmltag-element">unicode-bidi</tt>, <tt class="sgmltag-element">vertical-align</tt>, <tt class="sgmltag-element">voice-family</tt>, <tt class="sgmltag-element">volume</tt>, <tt class="sgmltag-element">white-space</tt>, <tt class="sgmltag-element">width</tt></span>
</p>
-<a name="id291712"></a><table class="note" border="0" summary="">
+<a name="id291770"></a><table class="note" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/note.png" alt="Note" title="" width="24" height="24"></td></tr>
-<tr><td colspan="2" align="left" valign="top" width="99%">The <a href="http://feedparser.org/tests/wellformed/sanitize/">unit tests for <acronym title="HyperText Markup Language">HTML</acronym> sanitizing</a> show many different examples of dangerous markup that <span class="application">Universal Feed Parser</span> sanitizes by default.</td></tr>
+<tr><td colspan="2" align="left" valign="top" width="99%">Not all possible CSS values are allowed for these properties. The allowable values are restricted by a whitelist and a regular expression that allows color values and lengths. <acronym title="Uniform Resource Identifier">URI</acronym>s are not allowed, to prevent <a href="http://diveintomark.org/archives/2003/06/12/how_to_consume_rss_safely">platypus attacks</a>. See the <tt class="classname">_HTMLSanitizer</tt> class for more details.</td></tr>
</table>
</div>
<div class="section" lang="en">
@@ -144,14 +148,14 @@
<div class="furtherreading">
<h3>Elsewhere</h3>
<ul><li>
-<a href="http://diveintomark.org/archives/2003/06/12/how_to_consume_rss_safely">How to consume RSS safely</a> is a (somewhat dated) blog post that formed the basis of my thinking about sanitizing feeds.</li></ul>
+<a href="http://diveintomark.org/archives/2003/06/12/how_to_consume_rss_safely">How to consume RSS safely</a> explains the platypus attack.</li></ul>
</div>
</div>
</div>
<div style="float: left">← <a class="NavigationArrow" href="date-parsing.html">Date Parsing</a>
</div>
<div style="text-align: right">
-<a class="NavigationArrow" href="microformats.html">Microformats</a> →</div>
+<a class="NavigationArrow" href="content-normalization.html">Content Normalization</a> →</div>
<hr style="clear:both">
<div class="footer"><p class="copyright">Copyright (c) 2004, 2005, 2006, 2007, 2008 Mark Pilgrim</p></div>
</div></div>

Modified: trunk/www/docs/http-etag.html
==============================================================================
--- trunk/www/docs/http-etag.html (original)
+++ trunk/www/docs/http-etag.html Thu Mar 6 21:24:55 2008
@@ -64,7 +64,7 @@
the server sent no data. This is a feature, not a bug!'</span></pre>
</div>
<p>Clients should support both ETag and Last-Modified headers, as some servers support one but not the other.</p>
-<a name="id296456"></a><table class="important" border="0" summary="">
+<a name="id296862"></a><table class="important" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/important.png" alt="Important" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">If you do not support ETag and Last-Modified headers, you will repeatedly download feeds that have not changed. This wastes your bandwidth and the publisher's bandwidth, and the publisher may ban you from accessing their server.</td></tr>
</table>

Modified: trunk/www/docs/http-other.html
==============================================================================
--- trunk/www/docs/http-other.html (original)
+++ trunk/www/docs/http-other.html Thu Mar 6 21:24:55 2008
@@ -10,7 +10,7 @@
<link rel="start" href="index.html" title="Documentation">
<link rel="up" href="http.html" title="HTTP Features">
<link rel="prev" href="http-authentication.html" title="Password-Protected Feeds">
-<link rel="next" href="annotated-examples.html" title="Annotated Examples">
+<link rel="next" href="command-line.html" title="Command Line">
</head>
<body id="feedparser-org" class="docs">
<!--#include virtual="/inc/header.html"--><div id="main"><div id="mainInner">
@@ -47,7 +47,7 @@
<div style="float: left">← <a class="NavigationArrow" href="http-authentication.html">Password-Protected Feeds</a>
</div>
<div style="text-align: right">
-<a class="NavigationArrow" href="annotated-examples.html">Annotated Examples</a> →</div>
+<a class="NavigationArrow" href="command-line.html">Command Line</a> →</div>
<hr style="clear:both">
<div class="footer"><p class="copyright">Copyright (c) 2004, 2005, 2006, 2007, 2008 Mark Pilgrim</p></div>
</div></div>

Modified: trunk/www/docs/index.html
==============================================================================
--- trunk/www/docs/index.html (original)
+++ trunk/www/docs/index.html Thu Mar 6 21:24:55 2008
@@ -59,13 +59,16 @@
<li><span class="section"><a href="html-sanitization.html#advanced.sanitization.why">Whitelist, Don't Blacklist</a></span></li>
</ul>
</li>
-<li><span class="section"><a href="microformats.html">Microformats</a></span></li>
<li><span class="section"><a href="content-normalization.html">Content Normalization</a></span></li>
+<li>
+<span class="section"><a href="microformats.html">Microformats</a></span><ul><li><span class="section"><a href="microformats.html#advanced.microformats.hcard">hCard</a></span></li></ul>
+</li>
<li><span class="section"><a href="namespace-handling.html">Namespace Handling</a></span></li>
<li>
<span class="section"><a href="resolving-relative-links.html">Relative Link Resolution</a></span><ul>
<li><span class="section"><a href="resolving-relative-links.html#advanced.base.which">Which Values Are URIs</a></span></li>
<li><span class="section"><a href="resolving-relative-links.html#advanced.base.how">How Relative URIs Are Resolved</a></span></li>
+<li><span class="section"><a href="resolving-relative-links.html#advanced.base.disable">Disabling Relative URIs Resolution</a></span></li>
</ul>
</li>
<li><span class="section"><a href="version-detection.html">Feed Type and Version Detection</a></span></li>
@@ -89,6 +92,13 @@
</ul>
</li>
<li>
+<span class="chapter"><a href="command-line.html">Command Line</a></span><ul>
+<li><span class="section"><a href="command-line-basic.html">Basic Command Line Usage</a></span></li>
+<li><span class="section"><a href="command-line-arguments.html">Optional Arguments</a></span></li>
+<li><span class="section"><a href="command-line-output-formats.html">Output Formats</a></span></li>
+</ul>
+</li>
+<li>
<span class="chapter"><a href="annotated-examples.html">Annotated Examples</a></span><ul>
<li><span class="section"><a href="annotated-atom10.html">Atom 1.0</a></span></li>
<li><span class="section"><a href="annotated-atom03.html">Atom 0.3</a></span></li>
@@ -197,7 +207,7 @@
<li><span class="section"><a href="reference-feed-textinput.html#reference.feed.textinput.link">feed.textinput.link</a></span></li>
<li><span class="section"><a href="reference-feed-textinput.html#reference.feed.textinput.name">feed.textinput.name</a></span></li>
<li><span class="section"><a href="reference-feed-textinput.html#reference.feed.textinput.description">feed.textinput.description</a></span></li>
-<li><span class="section"><a href="reference-feed-textinput.html#id303867">Annotated example</a></span></li>
+<li><span class="section"><a href="reference-feed-textinput.html#id304476">Annotated example</a></span></li>
</ul>
</li>
<li>

Modified: trunk/www/docs/introduction.html
==============================================================================
--- trunk/www/docs/introduction.html (original)
+++ trunk/www/docs/introduction.html Thu Mar 6 21:24:55 2008
@@ -33,7 +33,7 @@
<span class="computeroutput">u'Sample Feed'</span></pre>
</div>
<p>The following example assumes you are on Windows, and that you have saved a feed at <tt class="filename">c:\incoming\atom10.xml</tt>.</p>
-<a name="id242332"></a><table class="note" border="0" summary="">
+<a name="id242347"></a><table class="note" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/note.png" alt="Note" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">
<span class="application">Universal Feed Parser</span> works on any platform that can run <span class="application">Python</span>; use the path syntax appropriate for your platform.</td></tr>

Modified: trunk/www/docs/microformats.html
==============================================================================
--- trunk/www/docs/microformats.html (original)
+++ trunk/www/docs/microformats.html Thu Mar 6 21:24:55 2008
@@ -9,8 +9,8 @@
<meta name="keywords" content="RSS, Atom, CDF, XML, feed, parser, Python">
<link rel="start" href="index.html" title="Documentation">
<link rel="up" href="advanced.html" title="Advanced Features">
-<link rel="prev" href="html-sanitization.html" title="Sanitization">
-<link rel="next" href="content-normalization.html" title="Content Normalization">
+<link rel="prev" href="content-normalization.html" title="Content Normalization">
+<link rel="next" href="namespace-handling.html" title="Namespace Handling">
</head>
<body id="feedparser-org" class="docs">
<!--#include virtual="/inc/header.html"--><div id="main"><div id="mainInner">
@@ -28,15 +28,63 @@
<div></div>
</div>
<p>TODO</p>
-<a name="id292072"></a><table class="note" border="0" summary="">
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h3 class="title">
+<a name="advanced.microformats.hcard" class="skip" href="#advanced.microformats.hcard" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> hCard</h3></div></div>
+<div></div>
+</div>
+<p>TODO</p>
+<div class="example">
+<a name="example.hcard" class="skip" href="#example.hcard" title="link to this example"><img src="images/permalink.gif" alt="[link]" title="link to this example" width="8" height="9"></a> <h3 class="title">Example: Parsing embedded hCard markup into a vCard</h3>
+<pre class="screen"><tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput"><font color='navy'><b>import</b></font> feedparser</span>
+<tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput">d = feedparser.parse('<a href="http://feedparser.org/docs/examples/hcard.xml">http://feedparser.org/docs/examples/hcard.xml</a>')</span>
+<tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput"><font color='navy'><b>print</b></font> d.entries[0].vcard</span>
+<span class="computeroutput">BEGIN:vCard
+VERSION:3.0
+FN:Frank Dawson
+N:Dawson;Frank
+ADR;TYPE=work,postal,parcel:;;6544 Battleford Drive;Raleigh;NC;27613-3502;U
+ .S.A.
+TEL;TYPE=WORK,VOICE,MSG:+1-919-676-9515
+TEL;TYPE=WORK,FAX:+1-919-676-9564
+EMAIL;TYPE=internet,pref:Frank_Dawson at Lotus.com
+EMAIL;TYPE=internet:fdawson at earthlink.net
+ORG:Lotus Development Corporation
+URL:http://home.earthlink.net/~fdawson
+END:vCard
+BEGIN:vCard
+VERSION:3.0
+FN:Tim Howes
+N:Howes;Tim
+ADR;TYPE=work:;;501 E. Middlefield Rd.;Mountain View;CA;94043;U.S.A.
+TEL;TYPE=WORK,VOICE,MSG:+1-415-937-3419
+TEL;TYPE=WORK,FAX:+1-415-528-4164
+EMAIL;TYPE=internet:howes at netscape.com
+ORG:Netscape Communications Corp.
+END:vCard</span></pre>
+</div>
+<a name="id292549"></a><table class="note" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/note.png" alt="Note" title="" width="24" height="24"></td></tr>
-<tr><td colspan="2" align="left" valign="top" width="99%">There are a growing number of microformats, and <span class="application">Universal Feed Parser</span> does not parse all of them. However, both the <tt class="sgmltag-attribute">rel</tt> and <tt class="sgmltag-attribute">class</tt> attributes survive <a href="html-sanitization.html" title="Sanitization"><acronym title="HyperText Markup Language">HTML</acronym> sanitizing</a>, so applications built on <span class="application">Universal Feed Parser</span> that wish to parse microformat content are free to do so.</td></tr>
+<tr><td colspan="2" align="left" valign="top" width="99%">There are a growing number of microformats, and <span class="application">Universal Feed Parser</span> does not parse all of them. However, both the <tt class="sgmltag-attribute">rel</tt> and <tt class="sgmltag-attribute">class</tt> attributes survive <a href="html-sanitization.html" title="Sanitization"><acronym title="HyperText Markup Language">HTML</acronym> sanitizing</a>, so applications built on <span class="application">Universal Feed Parser</span> that wish to parse additional microformat content are free to do so.</td></tr>
</table>
+<div class="furtherreading">
+<h3>Elsewhere</h3>
+<ul>
+<li><a href="http://microformats.org/">Microformats.org</a></li>
+<li><a href="http://microformats.org/wiki/hcard">hCard specification</a></li>
+<li><a href="http://microformats.org/wiki/rel-tag"><tt class="literal">rel=tag</tt> specification</a></li>
+<li><a href="http://microformats.org/wiki/rel-enclosure"><tt class="literal">rel=enclosure</tt> specification</a></li>
+<li><a href="http://microformats.org/wiki/rel-tag"><tt class="literal">rel=tag</tt> specification</a></li>
+<li><a href="http://microformats.org/wiki/XFN"><acronym title="XHTML Friends Network">XFN</acronym> specification</a></li>
+</ul>
+</div>
+</div>
</div>
-<div style="float: left">← <a class="NavigationArrow" href="html-sanitization.html">Sanitization</a>
+<div style="float: left">← <a class="NavigationArrow" href="content-normalization.html">Content Normalization</a>
</div>
<div style="text-align: right">
-<a class="NavigationArrow" href="content-normalization.html">Content Normalization</a> →</div>
+<a class="NavigationArrow" href="namespace-handling.html">Namespace Handling</a> →</div>
<hr style="clear:both">
<div class="footer"><p class="copyright">Copyright (c) 2004, 2005, 2006, 2007, 2008 Mark Pilgrim</p></div>
</div></div>

Modified: trunk/www/docs/namespace-handling.html
==============================================================================
--- trunk/www/docs/namespace-handling.html (original)
+++ trunk/www/docs/namespace-handling.html Thu Mar 6 21:24:55 2008
@@ -9,7 +9,7 @@
<meta name="keywords" content="RSS, Atom, CDF, XML, feed, parser, Python">
<link rel="start" href="index.html" title="Documentation">
<link rel="up" href="advanced.html" title="Advanced Features">
-<link rel="prev" href="content-normalization.html" title="Content Normalization">
+<link rel="prev" href="microformats.html" title="Microformats">
<link rel="next" href="resolving-relative-links.html" title="Relative Link Resolution">
</head>
<body id="feedparser-org" class="docs">
@@ -63,7 +63,7 @@
</div>
<p>This is the complete list of namespaces that <span class="application">Universal Feed Parser</span> recognizes and uses to construct the variable names for data in these namespaces:</p>
<div class="table">
-<a name="id292795" class="skip" href="#id292795" title="link to this table"><img src="images/permalink.gif" alt="[link]" title="link to this table" width="8" height="9"></a> <h3 class="title">Recognized Namespaces</h3>
+<a name="id293004" class="skip" href="#id293004" title="link to this table"><img src="images/permalink.gif" alt="[link]" title="link to this table" width="8" height="9"></a> <h3 class="title">Recognized Namespaces</h3>
<table summary="Recognized Namespaces" border="1">
<colgroup>
<col>
@@ -223,6 +223,10 @@
<td><tt class="literal">http://purl.org/rss/1.0/modules/syndication/</tt></td>
</tr>
<tr>
+<td><tt class="literal">szf</tt></td>
+<td><tt class="literal">http://schemas.pocketsoap.com/rss/myDescModule/</tt></td>
+</tr>
+<tr>
<td><tt class="literal">taxo</tt></td>
<td><tt class="literal">http://purl.org/rss/1.0/modules/taxonomy/</tt></td>
</tr>
@@ -251,6 +255,10 @@
<td><tt class="literal">http://www.w3.org/1999/xhtml</tt></td>
</tr>
<tr>
+<td><tt class="literal">xlink</tt></td>
+<td><tt class="literal">http://www.w3.org/1999/xlink</tt></td>
+</tr>
+<tr>
<td><tt class="literal">xml</tt></td>
<td><tt class="literal">http://www.w3.org/XML/1998/namespace</tt></td>
</tr>
@@ -258,17 +266,17 @@
</table>
</div>
<p></p>
-<a name="id293533"></a><table class="note" border="0" summary="">
+<a name="id293774"></a><table class="note" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/note.png" alt="Note" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">
<span class="application">Universal Feed Parser</span> treats namespaces as case-insensitive to match the behavior of certain versions of <span class="application">iTunes</span>.</td></tr>
</table>
-<a name="id293551"></a><table class="caution" border="0" summary="">
+<a name="id293792"></a><table class="caution" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/caution.png" alt="Caution" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">Data from namespaced elements is not <a href="html-sanitization.html" title="Sanitization">sanitized</a> (even if it contains <acronym title="HyperText Markup Language">HTML</acronym> markup).</td></tr>
</table>
</div>
-<div style="float: left">← <a class="NavigationArrow" href="content-normalization.html">Content Normalization</a>
+<div style="float: left">← <a class="NavigationArrow" href="microformats.html">Microformats</a>
</div>
<div style="text-align: right">
<a class="NavigationArrow" href="resolving-relative-links.html">Relative Link Resolution</a> →</div>

Modified: trunk/www/docs/reference-bozo.html
==============================================================================
--- trunk/www/docs/reference-bozo.html (original)
+++ trunk/www/docs/reference-bozo.html Thu Mar 6 21:24:55 2008
@@ -28,7 +28,7 @@
<div></div>
</div>
<p>See <a href="bozo.html" title="Bozo Detection">Bozo Detection</a> for more details on the <tt class="varname">bozo</tt> bit.</p>
-<a name="id311326"></a><table class="tip" border="0" summary="">
+<a name="id311935"></a><table class="tip" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/tip.png" alt="Tip" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">
<tt class="varname">bozo</tt> may not be present. Some platforms, such as Mac OS X 10.2 and some versions of FreeBSD, do not include an <acronym title="Extensible Markup Language">XML</acronym> parser in their <span class="application">Python</span> distributions. <span class="application">Universal Feed Parser</span> will still work on these platforms, but it will not be able to detect whether a feed is well-formed. However, it <span class="emphasis"><em>can</em></span> detect whether a feed's character encoding is incorrectly declared. (This is done in <span class="application">Python</span>, not by the <acronym title="Extensible Markup Language">XML</acronym> parser.) See <a href="character-encoding.html" title="Character Encoding Detection">Character Encoding Detection</a> for details.</td></tr>

Modified: trunk/www/docs/reference-bozo_exception.html
==============================================================================
--- trunk/www/docs/reference-bozo_exception.html (original)
+++ trunk/www/docs/reference-bozo_exception.html Thu Mar 6 21:24:55 2008
@@ -28,7 +28,7 @@
<div></div>
</div>
<p>See <a href="bozo.html" title="Bozo Detection">Bozo Detection</a> for more details.</p>
-<a name="id311412"></a><table class="tip" border="0" summary="">
+<a name="id312022"></a><table class="tip" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/tip.png" alt="Tip" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">
<tt class="varname">bozo_exception</tt> will only be present if <tt class="varname">bozo</tt> is <tt class="constant">1</tt>.</td></tr>

Modified: trunk/www/docs/reference-encoding.html
==============================================================================
--- trunk/www/docs/reference-encoding.html (original)
+++ trunk/www/docs/reference-encoding.html Thu Mar 6 21:24:55 2008
@@ -27,11 +27,11 @@
</div>
<div></div>
</div>
-<a name="id310904"></a><table class="note" border="0" summary="">
+<a name="id311513"></a><table class="note" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/note.png" alt="Note" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">The process by which <span class="application">Universal Feed Parser</span> determines the character encoding of the feed is explained in <a href="character-encoding.html" title="Character Encoding Detection">Character Encoding Detection</a>.</td></tr>
</table>
-<a name="id310924"></a><table class="tip" border="0" summary="">
+<a name="id311534"></a><table class="tip" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/tip.png" alt="Tip" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">This element always exists, although it may be an empty string if the character encoding can not be determined.</td></tr>
</table>

Modified: trunk/www/docs/reference-entry-summary.html
==============================================================================
--- trunk/www/docs/reference-entry-summary.html (original)
+++ trunk/www/docs/reference-entry-summary.html Thu Mar 6 21:24:55 2008
@@ -40,7 +40,7 @@
<h3>See also</h3>
<ul><li><a href="reference-entry-summary_detail.html" title="entries[i].summary_detail">entries[i].summary_detail</a></li></ul>
</div>
-<a name="id306023"></a><table class="note" border="0" summary="">
+<a name="id306633"></a><table class="note" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/note.png" alt="Note" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">Some feeds include both a <tt class="literal">summary</tt> and <tt class="literal">description</tt> element for each entry. In this case, the first element will be available in <tt class="varname">entry['summary']</tt> and the second will be available in <tt class="varname">entry['content'][0]</tt>.</td></tr>
</table>

Modified: trunk/www/docs/reference-entry-tags.html
==============================================================================
--- trunk/www/docs/reference-entry-tags.html (original)
+++ trunk/www/docs/reference-entry-tags.html Thu Mar 6 21:24:55 2008
@@ -34,7 +34,7 @@
<li><tt class="literal">/rdf:RDF/rdf:channel/rdf:item/dc:subject</tt></li>
</ul>
</div>
-<a name="id308537"></a><table class="note" border="0" summary="">
+<a name="id309147"></a><table class="note" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/note.png" alt="Note" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">Prior to version 4.0, <span class="application">Universal Feed Parser</span> exposed categories in <tt class="varname">feed.category</tt> (the primary category) and <tt class="varname">feed.categories</tt> (a list of tuples containing the domain and term of each category). These uses are still supported for backward compatibility, but you will not see them in the parsed results unless you explicitly ask for them.</td></tr>
</table>

Modified: trunk/www/docs/reference-entry.html
==============================================================================
--- trunk/www/docs/reference-entry.html (original)
+++ trunk/www/docs/reference-entry.html Thu Mar 6 21:24:55 2008
@@ -31,7 +31,7 @@
<li><tt class="literal">/rdf:RDF/rdf:item</tt></li>
</ul>
</div>
-<a name="id304885"></a><table class="tip" border="0" summary="">
+<a name="id305495"></a><table class="tip" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/tip.png" alt="Tip" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">This element always exists, although it may be an empty list.</td></tr>
</table>

Modified: trunk/www/docs/reference-etag.html
==============================================================================
--- trunk/www/docs/reference-etag.html (original)
+++ trunk/www/docs/reference-etag.html Thu Mar 6 21:24:55 2008
@@ -28,7 +28,7 @@
<div></div>
</div>
<p>The purpose of <tt class="varname">etag</tt> is explained more fully in <a href="http-etag.html" title="ETag and Last-Modified Headers">ETag and Last-Modified Headers</a>.</p>
-<a name="id311128"></a><table class="tip" border="0" summary="">
+<a name="id311738"></a><table class="tip" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/tip.png" alt="Tip" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">
<tt class="varname">etag</tt> will only be present if the feed was retrieved from a web server, and only if the web server provided an ETag <acronym title="Hypertext Transfer Protocol">HTTP</acronym> header for the feed. If the feed was parsed from a local file or from a string in memory, <tt class="varname">etag</tt> will not be present.</td></tr>

Modified: trunk/www/docs/reference-feed-rights.html
==============================================================================
--- trunk/www/docs/reference-feed-rights.html (original)
+++ trunk/www/docs/reference-feed-rights.html Thu Mar 6 21:24:55 2008
@@ -24,7 +24,7 @@
<div class="abstract"><p>A human-readable copyright statement for the feed.</p></div>
<p>If this contains <acronym title="HyperText Markup Language">HTML</acronym> or <acronym title="Extensible HyperText Markup Language">XHTML</acronym>, it is <a href="html-sanitization.html" title="Sanitization">sanitized</a> by default.</p>
<p>If this contains <acronym title="HyperText Markup Language">HTML</acronym> or <acronym title="Extensible HyperText Markup Language">XHTML</acronym>, certain (X)HTML elements within this value may contain relative <acronym title="Uniform Resource Identifier">URI</acronym>s. If so, they are <a href="resolving-relative-links.html" title="Relative Link Resolution">resolved according to a set of rules</a>.</p>
-<a name="id301368"></a><table class="note" border="0" summary="">
+<a name="id301977"></a><table class="note" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/note.png" alt="Note" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">For machine-readable copyright information, see <a href="reference-feed-license.html" title="feed.license">feed.license</a>.</td></tr>
</table>

Modified: trunk/www/docs/reference-feed-tags.html
==============================================================================
--- trunk/www/docs/reference-feed-tags.html (original)
+++ trunk/www/docs/reference-feed-tags.html Thu Mar 6 21:24:55 2008
@@ -34,7 +34,7 @@
<li><tt class="literal">/rdf:RDF/rdf:channel/dc:subject</tt></li>
</ul>
</div>
-<a name="id304421"></a><table class="note" border="0" summary="">
+<a name="id305031"></a><table class="note" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/note.png" alt="Note" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">Prior to version 4.0, <span class="application">Universal Feed Parser</span> exposed categories in <tt class="varname">feed.category</tt> (the primary category) and <tt class="varname">feed.categories</tt> (a list of tuples containing the domain and term of each category). These uses are still supported for backward compatibility, but you will not see them in the parsed results unless you explicitly ask for them.</td></tr>
</table>

Modified: trunk/www/docs/reference-feed-textinput.html
==============================================================================
--- trunk/www/docs/reference-feed-textinput.html (original)
+++ trunk/www/docs/reference-feed-textinput.html Thu Mar 6 21:24:55 2008
@@ -66,7 +66,7 @@
<div class="section" lang="en">
<div class="titlepage">
<div><div><h3 class="title">
-<a name="id303867" class="skip" href="#id303867" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> Annotated example</h3></div></div>
+<a name="id304476" class="skip" href="#id304476" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> Annotated example</h3></div></div>
<div></div>
</div>
<p>This is a text input in a feed:</p>

Modified: trunk/www/docs/reference-feed.html
==============================================================================
--- trunk/www/docs/reference-feed.html (original)
+++ trunk/www/docs/reference-feed.html Thu Mar 6 21:24:55 2008
@@ -31,7 +31,7 @@
<li><tt class="literal">/rdf:RDF/rdf:channel</tt></li>
</ul>
</div>
-<a name="id299786"></a><table class="tip" border="0" summary="">
+<a name="id300395"></a><table class="tip" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/tip.png" alt="Tip" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">This element always exists, although it may be an empty dictionary.</td></tr>
</table>

Modified: trunk/www/docs/reference-headers.html
==============================================================================
--- trunk/www/docs/reference-headers.html (original)
+++ trunk/www/docs/reference-headers.html Thu Mar 6 21:24:55 2008
@@ -27,7 +27,7 @@
</div>
<div></div>
</div>
-<a name="id311249"></a><table class="tip" border="0" summary="">
+<a name="id311859"></a><table class="tip" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/tip.png" alt="Tip" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">
<tt class="varname">headers</tt> will only be present if the feed was retrieved from a web server. If the feed was parsed from a local file or from a string in memory, <tt class="varname">headers</tt> will not be present.</td></tr>

Modified: trunk/www/docs/reference-href.html
==============================================================================
--- trunk/www/docs/reference-href.html (original)
+++ trunk/www/docs/reference-href.html Thu Mar 6 21:24:55 2008
@@ -28,7 +28,7 @@
<div></div>
</div>
<p>If the feed was redirected from the original requested address, <tt class="varname">href</tt> will contain the final (redirected) address.</p>
-<a name="id311068"></a><table class="tip" border="0" summary="">
+<a name="id311678"></a><table class="tip" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/tip.png" alt="Tip" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">
<tt class="varname">href</tt> will only be present if the feed was retrieved from a web server. If the feed was parsed from a local file or from a string in memory, <tt class="varname">href</tt> will not be present.</td></tr>

Modified: trunk/www/docs/reference-modified.html
==============================================================================
--- trunk/www/docs/reference-modified.html (original)
+++ trunk/www/docs/reference-modified.html Thu Mar 6 21:24:55 2008
@@ -28,7 +28,7 @@
<div></div>
</div>
<p>The purpose of <tt class="varname">modified</tt> is explained more fully in <a href="http-etag.html" title="ETag and Last-Modified Headers">ETag and Last-Modified Headers</a>.</p>
-<a name="id311195"></a><table class="tip" border="0" summary="">
+<a name="id311805"></a><table class="tip" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/tip.png" alt="Tip" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">
<tt class="varname">modified</tt> will only be present if the feed was retrieved from a web server, and only if the web server provided a Last-Modified <acronym title="Hypertext Transfer Protocol">HTTP</acronym> header for the feed. If the feed was parsed from a local file or from a string in memory, <tt class="varname">modified</tt> will not be present.</td></tr>

Modified: trunk/www/docs/reference-namespaces.html
==============================================================================
--- trunk/www/docs/reference-namespaces.html (original)
+++ trunk/www/docs/reference-namespaces.html Thu Mar 6 21:24:55 2008
@@ -27,11 +27,11 @@
</div>
<div></div>
</div>
-<a name="id310849"></a><table class="note" border="0" summary="">
+<a name="id311459"></a><table class="note" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/note.png" alt="Note" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">The prefixes listed in the <tt class="varname">namespaces</tt> dictionary may not match the prefixes defined in the original feed. See <a href="namespace-handling.html" title="Namespace Handling">Namespace Handling</a> for more details.</td></tr>
</table>
-<a name="id310868"></a><table class="tip" border="0" summary="">
+<a name="id311478"></a><table class="tip" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/tip.png" alt="Tip" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">This element always exists, although it may be an empty dictionary if the feed does not define any namespaces (such as an RSS 2.0 feed with no extensions).</td></tr>
</table>

Modified: trunk/www/docs/reference-status.html
==============================================================================
--- trunk/www/docs/reference-status.html (original)
+++ trunk/www/docs/reference-status.html Thu Mar 6 21:24:55 2008
@@ -30,7 +30,7 @@
<p>If the feed was redirected from its original <acronym title="Uniform Resource Locator">URL</acronym>, <tt class="varname">status</tt> will contain the redirect status code, not the final status code.</p>
<p>If <tt class="varname">status</tt> is <tt class="constant">301</tt>, the feed was permanently redirected to a new <acronym title="Uniform Resource Locator">URL</acronym>. Clients should update their address book to request the new <acronym title="Uniform Resource Locator">URL</acronym> from now on.</p>
<p>If <tt class="varname">status</tt> is <tt class="constant">410</tt>, the feed is gone. Clients should stop polling the feed.</p>
-<a name="id311013"></a><table class="tip" border="0" summary="">
+<a name="id311623"></a><table class="tip" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/tip.png" alt="Tip" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">
<tt class="varname">status</tt> will only be present if the feed was retrieved from a web server. If the feed was parsed from a local file or from a string in memory, <tt class="varname">status</tt> will not be present.</td></tr>

Modified: trunk/www/docs/reference-version.html
==============================================================================
--- trunk/www/docs/reference-version.html (original)
+++ trunk/www/docs/reference-version.html Thu Mar 6 21:24:55 2008
@@ -66,7 +66,7 @@
<dd><a href="http://diveintomark.org/archives/2004/04/14/hot-rss">Hot <acronym title="Rich Site Summary">RSS</acronym></a></dd>
</dl></div>
<p>If the feed type is completely unknown, <tt class="varname">version</tt> will be an empty string.</p>
-<a name="id310809"></a><table class="tip" border="0" summary="">
+<a name="id311419"></a><table class="tip" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/tip.png" alt="Tip" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">This element always exists, although it may be an empty string if the version can not be determined.</td></tr>
</table>

Modified: trunk/www/docs/reference.html
==============================================================================
--- trunk/www/docs/reference.html (original)
+++ trunk/www/docs/reference.html Thu Mar 6 21:24:55 2008
@@ -113,7 +113,7 @@
<li><span class="section"><a href="reference-feed-textinput.html#reference.feed.textinput.link">feed.textinput.link</a></span></li>
<li><span class="section"><a href="reference-feed-textinput.html#reference.feed.textinput.name">feed.textinput.name</a></span></li>
<li><span class="section"><a href="reference-feed-textinput.html#reference.feed.textinput.description">feed.textinput.description</a></span></li>
-<li><span class="section"><a href="reference-feed-textinput.html#id303867">Annotated example</a></span></li>
+<li><span class="section"><a href="reference-feed-textinput.html#id304476">Annotated example</a></span></li>
</ul>
</li>
<li>

Modified: trunk/www/docs/resolving-relative-links.html
==============================================================================
--- trunk/www/docs/resolving-relative-links.html (original)
+++ trunk/www/docs/resolving-relative-links.html Thu Mar 6 21:24:55 2008
@@ -117,7 +117,7 @@
<p>If no <tt class="literal">Content-Location</tt> <acronym title="Hypertext Transfer Protocol">HTTP</acronym> header is present, the <acronym title="Uniform Resource Locator">URL</acronym> used to retrieve the feed itself is the default base <acronym title="Uniform Resource Identifier">URI</acronym> for all relative links within the feed. If the feed was retrieved via an <acronym title="Hypertext Transfer Protocol">HTTP</acronym> redirect (any <acronym title="Hypertext Transfer Protocol">HTTP</acronym> 3xx status code), then the final <acronym title="Uniform Resource Locator">URL</acronym> of the feed is the default base <acronym title="Uniform Resource Identifier">URI</acronym>.</p>
<p>For example, an <tt class="sgmltag-attribute">xml:base</tt> on the root-level element sets the base <acronym title="Uniform Resource Identifier">URI</acronym> for all <acronym title="Uniform Resource Identifier">URI</acronym>s in the feed.</p>
<div class="example">
-<a name="id294266" class="skip" href="#id294266" title="link to this example"><img src="images/permalink.gif" alt="[link]" title="link to this example" width="8" height="9"></a> <h3 class="title">Example: <tt class="sgmltag-attribute">xml:base</tt> on the root-level element</h3>
+<a name="id294505" class="skip" href="#id294505" title="link to this example"><img src="images/permalink.gif" alt="[link]" title="link to this example" width="8" height="9"></a> <h3 class="title">Example: <tt class="sgmltag-attribute">xml:base</tt> on the root-level element</h3>
<pre class="screen"><tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput"><font color='navy'><b>import</b></font> feedparser</span>
<tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput">d = feedparser.parse("<a href="http://feedparser.org/docs/examples/base.xml">http://feedparser.org/docs/examples/base.xml</a>")</span>
<tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput">d.feed.link</span>
@@ -127,7 +127,7 @@
</div>
<p>An <tt class="sgmltag-attribute">xml:base</tt> attribute on an <tt class="sgmltag-element">&lt;entry&gt;</tt> overrides the <tt class="sgmltag-attribute">xml:base</tt> on the parent <tt class="sgmltag-element">&lt;feed&gt;</tt>.</p>
<div class="example">
-<a name="id294355" class="skip" href="#id294355" title="link to this example"><img src="images/permalink.gif" alt="[link]" title="link to this example" width="8" height="9"></a> <h3 class="title">Example: Overriding <tt class="sgmltag-attribute">xml:base</tt> on an <tt class="sgmltag-element">&lt;entry&gt;</tt>
+<a name="id294593" class="skip" href="#id294593" title="link to this example"><img src="images/permalink.gif" alt="[link]" title="link to this example" width="8" height="9"></a> <h3 class="title">Example: Overriding <tt class="sgmltag-attribute">xml:base</tt> on an <tt class="sgmltag-element">&lt;entry&gt;</tt>
</h3>
<pre class="screen"><tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput"><font color='navy'><b>import</b></font> feedparser</span>
<tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput">d = feedparser.parse("<a href="http://feedparser.org/docs/examples/base.xml">http://feedparser.org/docs/examples/base.xml</a>")</span>
@@ -138,7 +138,7 @@
</div>
<p>An <tt class="sgmltag-attribute">xml:base</tt> on <tt class="sgmltag-element">&lt;content&gt;</tt> overrides the <tt class="sgmltag-attribute">xml:base</tt> on the parent <tt class="sgmltag-element">&lt;entry&gt;</tt>. In addition, whatever the base <acronym title="Uniform Resource Identifier">URI</acronym> is for the <tt class="sgmltag-element">&lt;content&gt;</tt> element (whether defined directly on the <tt class="sgmltag-element">&lt;content&gt;</tt> element, or inherited from the parent element) is used as the base <acronym title="Uniform Resource Identifier">URI</acronym> for the embedded <acronym title="HyperText Markup Language">HTML</acronym> or <acronym title="Extensible HyperText Markup Language">XHTML</acronym> markup within the <tt class="sgmltag-element">content</tt>.</p>
<div class="example">
-<a name="id294475" class="skip" href="#id294475" title="link to this example"><img src="images/permalink.gif" alt="[link]" title="link to this example" width="8" height="9"></a> <h3 class="title">Example: Relative links within embedded <acronym title="HyperText Markup Language">HTML</acronym>
+<a name="id294713" class="skip" href="#id294713" title="link to this example"><img src="images/permalink.gif" alt="[link]" title="link to this example" width="8" height="9"></a> <h3 class="title">Example: Relative links within embedded <acronym title="HyperText Markup Language">HTML</acronym>
</h3>
<pre class="screen"><tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput"><font color='navy'><b>import</b></font> feedparser</span>
<tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput">d = feedparser.parse("<a href="http://feedparser.org/docs/examples/base.xml">http://feedparser.org/docs/examples/base.xml</a>")</span>
@@ -149,7 +149,7 @@
</div>
<p>The <tt class="sgmltag-attribute">xml:base</tt> affects other attributes in the element in which it is declared.</p>
<div class="example">
-<a name="id294537" class="skip" href="#id294537" title="link to this example"><img src="images/permalink.gif" alt="[link]" title="link to this example" width="8" height="9"></a> <h3 class="title">Example: <tt class="sgmltag-attribute">xml:base</tt> and sibling attributes</h3>
+<a name="id294776" class="skip" href="#id294776" title="link to this example"><img src="images/permalink.gif" alt="[link]" title="link to this example" width="8" height="9"></a> <h3 class="title">Example: <tt class="sgmltag-attribute">xml:base</tt> and sibling attributes</h3>
<pre class="screen"><tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput"><font color='navy'><b>import</b></font> feedparser</span>
<tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput">d = feedparser.parse("<a href="http://feedparser.org/docs/examples/base.xml">http://feedparser.org/docs/examples/base.xml</a>")</span>
<tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput">d.entries[0].links[1].rel</span>
@@ -159,7 +159,7 @@
</div>
<p>If no <tt class="sgmltag-attribute">xml:base</tt> is specified on the root-level element, the default base <acronym title="Uniform Resource Identifier">URI</acronym> is given in the <tt class="literal">Content-Location</tt> <acronym title="Hypertext Transfer Protocol">HTTP</acronym> header. This can still be overridden by any child element that declares an <tt class="sgmltag-attribute">xml:base</tt> attribute.</p>
<div class="example">
-<a name="id294634" class="skip" href="#id294634" title="link to this example"><img src="images/permalink.gif" alt="[link]" title="link to this example" width="8" height="9"></a> <h3 class="title">Example: <tt class="literal">Content-Location</tt> <acronym title="Hypertext Transfer Protocol">HTTP</acronym> header</h3>
+<a name="id294873" class="skip" href="#id294873" title="link to this example"><img src="images/permalink.gif" alt="[link]" title="link to this example" width="8" height="9"></a> <h3 class="title">Example: <tt class="literal">Content-Location</tt> <acronym title="Hypertext Transfer Protocol">HTTP</acronym> header</h3>
<pre class="screen"><tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput"><font color='navy'><b>import</b></font> feedparser</span>
<tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput">d = feedparser.parse("<a href="http://feedparser.org/docs/examples/http_base.xml">http://feedparser.org/docs/examples/http_base.xml</a>")</span>
<tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput">d.feed.link</span>
@@ -169,7 +169,7 @@
</div>
<p>Finally, if no root-level <tt class="sgmltag-attribute">xml:base</tt> is declared, and no <tt class="literal">Content-Location</tt> <acronym title="Hypertext Transfer Protocol">HTTP</acronym> header is present, the <acronym title="Uniform Resource Locator">URL</acronym> of the feed itself is the default base <acronym title="Uniform Resource Identifier">URI</acronym>. Again, this can still be overridden by any element that declares an <tt class="sgmltag-attribute">xml:base</tt> attribute.</p>
<div class="example">
-<a name="id294743" class="skip" href="#id294743" title="link to this example"><img src="images/permalink.gif" alt="[link]" title="link to this example" width="8" height="9"></a> <h3 class="title">Example: Feed <acronym title="Uniform Resource Locator">URL</acronym> as default base <acronym title="Uniform Resource Identifier">URI</acronym>
+<a name="id294982" class="skip" href="#id294982" title="link to this example"><img src="images/permalink.gif" alt="[link]" title="link to this example" width="8" height="9"></a> <h3 class="title">Example: Feed <acronym title="Uniform Resource Locator">URL</acronym> as default base <acronym title="Uniform Resource Identifier">URI</acronym>
</h3>
<pre class="screen"><tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput"><font color='navy'><b>import</b></font> feedparser</span>
<tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput">d = feedparser.parse("<a href="http://feedparser.org/docs/examples/no_base.xml">http://feedparser.org/docs/examples/no_base.xml</a>")</span>
@@ -177,6 +177,33 @@
<span class="computeroutput">u'http://feedparser.org/docs/examples/index.html</span>
<tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput">d.entries[0].link</span>
<span class="computeroutput">u'http://example.org/archives/000001.html'</span></pre>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h3 class="title">
+<a name="advanced.base.disable" class="skip" href="#advanced.base.disable" title="link to this section"><img src="images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> Disabling Relative <acronym title="Uniform Resource Identifier">URI</acronym>s Resolution</h3></div></div>
+<div></div>
+</div>
+<p>Though not recommended, it is possible to disable <span class="application">Universal Feed Parser</span>'s relative <acronym title="Uniform Resource Identifier">URI</acronym> resolution by setting <tt class="literal">feedparser.RESOLVE_RELATIVE_URIS</tt> to <tt class="constant">0</tt>.</p>
+<div class="example">
+<a name="example.base.disable" class="skip" href="#example.base.disable" title="link to this example"><img src="images/permalink.gif" alt="[link]" title="link to this example" width="8" height="9"></a> <h3 class="title">Example: How to disable relative <acronym title="Uniform Resource Identifier">URI</acronym> resolution</h3>
+<pre class="screen"><tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput"><font color='navy'><b>import</b></font> feedparser</span>
+<tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput">d = feedparser.parse('<a href="http://feedparser.org/docs/examples/base.xml">http://feedparser.org/docs/examples/base.xml</a>')</span>
+<tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput">d.entries[0].content[0].base</span>
+<span class="computeroutput">u'http://example.org/archives/000001.html'</span>
+<tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput"><font color='navy'><b>print</b></font> d.entries[0].content[0].value</span>
+<span class="computeroutput">&lt;p id="anchor1"&gt;&lt;a href="http://example.org/archives/000001.html#anchor2"&gt;skip to anchor 2&lt;/a&gt;&lt;/p&gt;
+ &lt;p&gt;Some content&lt;/p&gt;
+ &lt;p id="anchor2"&gt;This is anchor 2&lt;/p&gt;</span>
+<tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput">feedparser.RESOLVE_RELATIVE_URIS = 0</span>
+<tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput">d2 = feedparser.parse('<a href="http://feedparser.org/docs/examples/base.xml">http://feedparser.org/docs/examples/base.xml</a>')</span>
+<tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput">d2.entries[0].content[0].base</span>
+<span class="computeroutput">u'http://example.org/archives/000001.html'</span>
+<tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput"><font color='navy'><b>print</b></font> d2.entries[0].content[0].value</span>
+<span class="computeroutput">&lt;p id="anchor1"&gt;&lt;a href="#anchor2"&gt;skip to anchor 2&lt;/a&gt;&lt;/p&gt;
+ &lt;p&gt;Some content&lt;/p&gt;
+ &lt;p id="anchor2"&gt;This is anchor 2&lt;/p&gt;</span></pre>
</div>
</div>
</div>

Modified: trunk/www/docs/uncommon-atom.html
==============================================================================
--- trunk/www/docs/uncommon-atom.html (original)
+++ trunk/www/docs/uncommon-atom.html Thu Mar 6 21:24:55 2008
@@ -70,7 +70,7 @@
'href': u'http://www.example.com/movie.mp4',
'length': u'42301'}</span></pre>
</div>
-<a name="id286990"></a><table class="note" border="0" summary="">
+<a name="id287020"></a><table class="note" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/note.png" alt="Note" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">For more examples of accessing Atom elements, see the annotated examples <a href="annotated-atom10.html" title="Atom 1.0">Atom 1.0</a> and <a href="annotated-atom03.html" title="Atom 0.3">Atom 0.3</a>.</td></tr>
</table>

Modified: trunk/www/docs/uncommon-rss.html
==============================================================================
--- trunk/www/docs/uncommon-rss.html (original)
+++ trunk/www/docs/uncommon-rss.html Thu Mar 6 21:24:55 2008
@@ -74,7 +74,7 @@
'registerprocedure': u'pingMe',
'protocol': u'soap'}</span></pre>
</div>
-<a name="id286709"></a><table class="note" border="0" summary="">
+<a name="id286737"></a><table class="note" border="0" summary="">
<tr><td rowspan="2" align="center" valign="top" width="1%"><img src="images/note.png" alt="Note" title="" width="24" height="24"></td></tr>
<tr><td colspan="2" align="left" valign="top" width="99%">For more examples of accessing <acronym title="Rich Site Summary">RSS</acronym> elements, see the annotated examples: <a href="annotated-rss10.html" title="RSS 1.0">RSS 1.0</a>, <a href="annotated-rss20.html" title="RSS 2.0">RSS 2.0</a>, and <a href="annotated-rss20-dc.html" title="RSS 2.0 with Namespaces">RSS 2.0 with Namespaces</a>.</td></tr>
</table>
Reply all
Reply to author
Forward
0 new messages