- From: Mark Baker <distobj@acm.org>
- Date: Fri, 29 Aug 2003 10:29:19 -0400
- To: Dave Beckett <dave.beckett@bristol.ac.uk>
- Cc: www-rdf-interest@w3.org
Thanks for the detailed response, Dave. On Fri, Aug 29, 2003 at 06:16:25AM -0400, Dave Beckett wrote: > The correct reference is in 7.2.1 of RDF/XML Syntax Specification (Revised) > > If the RDF/XML is a standalone XML document (known by having been > given the RDF MIME Type) then the grammar starts with Root Event doc. > > If the content is known to be RDF/XML by context, such as when > RDF/XML is embedded inside other XML content, then the grammar can > either start at Element Event RDF (only when an element is legal at > that point in the XML) or at production nodeElementList (only when > element content is legal, since this is a list of elements). > > -- http://www.w3.org/TR/rdf-syntax-grammar/#start > > [Aside: In the next version, Paragraph 1 has been reworded to: > > If the RDF/XML is a standalone XML document (identified by > presentation as an application/rdf+xml RDF MIME type object, or > by some other means) then the grammar starts with Root Event doc. > ] > > > What *context* means is really outside of a description of a document > format. It could mean that the protocol that delivered the document > provided the RDF/XML mime type application/rdf+xml (being registered, > it is on its 3rd internet draft) or the file system maps ".rdf" > suffixed files to RDF/XML. Hmm. That last paragraph makes sense to me, but seems to contradict the first paragraph you quoted above (and the revised version), as it seems to imply that the media type does *not* provide sufficient context. Am I misinterpreting something? > It could also mean that the application just knows. Most RDF/XML > parsers let you give it a flag that allows you to tell it to assume > the content is RDF/XML - this is the flag that Ryan mentioned above. > > It could be that you have another XML format that says "RDF/XML is > inside <metadata> here" so that for example you could have > <foo> > <metadata> > ... RDF/XML content, no rdf:RDF needed > </metadata> > ... > </foo> > > For conformance of RDF/XML and on a public validator, I think this > assumption should be off by default. It probably should be around > somewhere but maybe under advanced options on another page. Interesting. As I see it, the fact that it's an *RDF* validator should provide sufficient context. 8-) Perhaps, when a non-rdf:RDF using RDF/XML document is validated, the validator could mention that context still needs to be provided? Dunno. > > Is there an upside to requiring it? > > You really should have a single document element for an XML format. I've heard that too, but I honestly don't know what it buys me. On the contrary, sometimes it's quite valuable to not be so constrained, as XSLT demonstrates (though its use of media types in this respect, is horribly broken); http://www.w3.org/TR/xslt#result-element-stylesheet > You can possibly recognise RDF/XML by heuristics inside some unknown XML > or some general XML mime type (application/xml, text/xml, text/plain :). Let's not go there 8-) http://www.w3.org/2001/tag/doc/mime-respect.html#silent-recovery > The use of the RDF namespace URI at the start of the document isn't > always enough. Right. Mark. -- Mark Baker. Ottawa, Ontario, CANADA. http://www.markbaker.ca
Received on Friday, 29 August 2003 10:27:02 UTC