[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [syndication] Incorrect RSS-1.0 example?
The DOCTYPE and ENTITY example is fine.
I've just checked it in RXP [1].
A Validating XML parser will throw errors, because the elements
used in the document are not declared in the DTD. In this case
the DTD is this section:
<!DOCTYPE rdf:RDF[
...
]>
This is a separate issue to the use of entities. To confirm this
with RXP, add the above to the top of an RSS 1.0 document
(without the ... ) and do:
rxp -xVs myfile.rss
You'll see errors complaining about undeclared elements.
Add in the ENTITY declaration as shown in the spec, and you'll
get the same result.
Now, if add an entity in that file, e.g. WITHOUT
the ENTITY declaration, you'll get an additional error complaining
abotu the undeclared entity. Add the ENTITY declaration and
that one will go away.
If you do the same thing with a non-validating parser, then you
won't get any errors about undeclared elements, because
a non-validating parser won't bother to check. The majority of them
do check for entity declarations, however. So if you did an entity
you'll get an error WITHOUT the ENTITY declaration, but not WITH.
You can confirm this with:
rxp -x myfile.rss
So the short answer is: the entity declarations are perfectly legal
XML. Errors will appear if you attempt to validate an RSS 1.0
document, because it doesn't have a DTD. The guidance for
aggregators is to therefore use a non-validating parser, and
for authors to check the validity of the RSS 1.0 file in another
way, e.g. using my validator [2].
Hope that helps,
L.
[1]. http://www.cogsci.ed.ac.uk/~richard/rxp.html
[2]. http://www.ldodds.com/rss_validator/1.0/validator.html
> -----Original Message-----
> From: Bill Kearney [mailto:wkearney99@hotmail.com]
> Sent: 28 March 2002 19:00
> To: rss-dev; syndication
> Subject: [syndication] Incorrect RSS-1.0 example?
>
>
> Hi all,
>
> I'm confused. The usage example listed in section 5.0 of the RSS-1.0 spec won't
> parse.
> http://groups.yahoo.com/group/rss-dev/files/specification.html
>
> The use of that DOCTYPE and ENTITY text seems to confuse it.
> Why? Is this example not correct?
>
> The MSXML parser being used by XML Notepad complains:
> "The element 'rdf:RDF' is used but not declared in the DTD/Schema."
>
> I'd like to get this cleared up. What's the proper header for a document
> expecting to use RDF and HTML entities?
>
> This is pertinent to RSS-1.0 and to OCS formatted files.
>
> Thanks,
> Bill Kearney
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>