Re: About Refactoring RDF/XML Syntax Rivision 1.43

At 06 Sep 2001 17:25:37 +0100 Graham Klyne wrote:
> I therefore suggest the above syntax is appropriate, and the current RDF 
> specification is about right on this 
> point. 
> (http://lists.w3.org/Archives/Public/www-archive/2001Jun/att-0021/00-part#54)

I think it is nearly impossible to determine which element is the
boundaries for 'generic' RDF/XML parsers without rdf:RDF. We can even
write RDF/XML without rdf-ns declaration.

For example:

<x:foo xmlns:x="..." xmlns:y="...">
  <y:bar>baz<y:bar>
</x:foo>

This XML is legal RDF/XML document. But there is no hint to determine
whether it is RDF/XML (generate 1 triple) or some other kind of XML
document (generate no triple). I think that only the parser can do is to
treat whole document as RDF/XML.

In addition, parsers based on event-based XML API cannot start processing
before they find rdf:RDF element which may not be present. If there is
rdf:RDF element, a parser should treat only its contents as RDF/XML, and
if not, parser should treat whole document as RDF/XML. So a parser need to
create a tree model (such as DOM) or something to hold contents which may
be RDF/XML and may not be. I think it is useless to hold 1MB XML contents
to get few embeded RDF/XML contents.

Thanks.

---
Satoshi Nakamura <snakamura@infoteria.co.jp>
Infoteria Corporation

Received on Thursday, 6 September 2001 19:45:44 UTC