XML Question

David Bovill david at openpartnership.net
Fri Aug 29 05:10:20 EDT 2008


OK. I have not yet had to pay much attention to these XML DTD / name space
issues - so help me out on this. AFAIK the name space is defined in the
header of the XML, i this case the standard Atom header:

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="
http://purl.org/rss/1.0/modules/content/" xmlns:wfw="
http://wellformedweb.org/CommentAPI/" xmlns:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="
http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/">

So my guess is that this would work in Rev if i tell the external how to
interpret the name spaces by pointin it to the DTD. however changeing the
revXmlcreateTree function to be strict and not ignore badly formed XML makes
no odds - and there does not sseem to be a way of hooking the external up to
the external DTDs other than a simple check.

2008/8/29 Malte Brill <revolution at derbrill.de>

> While this is inconvenient behaviour, it might be argued that it is
> correct, or at least standard compliant. ;-)


This is a standard Atom feed - the XML name spaces are defined in the
headers with valid DTDs - or am I missing something?


> There are XML libraries for other environments, that handle the 1st case
> exactly the way rev does, others do not lose the namespace. As far as I can
> tell version 2 is W3C compliant while version 1 is not. A bug in Revs
> external? Not sure about that but eager to hear other opinions.


I am not really able to comment on this knowledgeably. I'd be pretty
confident it is all standards compliant - but that is relying on the source
and my scattered reading around XML DTDs. From a user point of view - you
want to make it as easy as possible to parse the most common XML feeds out
here. It looks bad if it breaks with Atom feeds, and bad = bug in my
language.



More information about the use-livecode mailing list