W3C home > Mailing lists > Public > www-rdf-interest@w3.org > March 2004

Re: rdf parse-able

From: Dave Beckett <dave.beckett@bristol.ac.uk>
Date: Wed, 10 Mar 2004 11:03:04 +0000
To: Keith Bohnenberger <kbohnenberger@mcdonaldbradley.com>
Cc: www-rdf-interest <www-rdf-interest@w3.org>
Message-Id: <20040310110304.3bc2d6be@hoth.ilrt.bris.ac.uk>

On Tue, 9 Mar 2004 12:54:39 -0500, Keith Bohnenberger <kbohnenberger@mcdonaldbradley.com> wrote:

> Where do I find information on the requirements for writing XML so that
> it is RDF parse-able.  I believe some people might refer to this as
> embedded RDF.
>  
> I have read through the RDF/XML Syntax Specification and section 2.6
> states that the RDF-XML must be enclosed in an rdf:RDF tag.

Actually it says you can omit it:

  [[... When there is only
    one top-level node element inside rdf:RDF, the rdf:RDF can be
    omitted although any XML namespaces must still be declared.  ]]

  -- 2.6 Completing the Document: Document Element and XML Declaration
    http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210/#section-Syntax-complete-document

The section above outlines the rules informally (and correctly I hope).

The section
  7.2.1 Grammar start
  http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210/#start
on starting the RDF/XML grammar gives you the rules about exactly when.

> However, the rdf validator page (http://www.w3.org/RDF/Validator/) has a
> check box to specify that the XML entered does not have the RDF tag.
>  
> So I think my question is, when you check that checkbox and you paste in
> some XML what are the rules you need to follow in order for that XML to
> be validated as RDF parse-able?
> What spec are these rules in or where can I find them?

There are no formal such rules, but in general you need to make the
XML either flat (triple-like) or what is normally called striped
(alternating node elements and property elements).

Striped can be seen in Example 1 in the syntax spec:
http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210/#example1

or in an older document by Dan Brickley http://www.w3.org/2001/10/stripes/

> I am trying to make sure that an XML schema we are creating is RDF parse
> able because an instance of that schema will end up as instances in our
> RDF/RDF ontology.

That seems likely to be fraught with problems, especially when
refering to xsi:type attributes.

Dave
Received on Wednesday, 10 March 2004 06:06:34 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 18 February 2014 13:20:06 UTC