Simple RDF writer or good tutorial?

Andrew Dalke adalke at mindspring.com
Tue Oct 7 16:31:13 EDT 2003


amk:
> Note that you can't really use RDFlib's .save() method to write RSS files
> that most aggregators can parse, because RDFlib will write out the triples
> in arbitrary order, and most RSS parsers don't use a real RDF parser, so
> they expect elements to be in a certain order.

A goal of XML was to make it easy to write parsers.  Despite tools
like XMLGenerator, people insist on using print/write to generate XML
output, and often forget to escape elements correctly. The result is
"XML" output that isn't XML, with unescaped text like "AT&T".  This
is especially a problem in the RSS world so cause people like Mark
Pilgrim to write an "Ultra-liberal RSS parser" to workaround those errors,
Thus was have people using the wrong tools to write output, causing
others to write specialized tools to capture wild type data, again raising
the bar on getting data from point A to point B.

Now here's the opposite case, where the data is correct but the parsers
only handle a subset of the definition.

What's the advantage of XML again? [1]

                    Andrew
                    dalke at dalkescientific.com

[1] My answer is that it gives a way to handle Unicode even
if your character encoding doesn't support all Unicode.  Even
then, there's a lot of data I've seen which claims to be Latin-1
when it isn't.






More information about the Python-list mailing list