Re: Trying to understand valid RDF [long]

On Thu, 2001-11-01 at 12:49, Dan Brickley wrote:
> 
> try removing the parseType=Resource that comes immediately before the 2nd
> rdf:Description
Thanks for the quick reply...

I have cut my test down to the following code:

---- code ----
<?xml version = "1.0" encoding = "UTF-8"?>
<rdf:RDF xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc = "http://purl.org/dc/elements/1.1/" xmlns:my =
"http://lucas.ucs.ed.ac.uk/"> 

  <rdf:Description rdf:about = "http://stacks.iop.org/">  
    <dc:Title>Institute of Physics STACKS</dc:Title>  
    <my:query>
      <rdf:Description rdf:about="http://stacks.iop.org/0001-3072//L">
        <my:search my:attempted = "1" my:available = "1" my:result = "1"
my:verified = "0"/>
        <dc:Description>journal search</dc:Description>   
        <my:field my:name = "issn">0001-3072</my:field>  
     </rdf:Description> 
    </my:query>
  </rdf:Description> 
</rdf:RDF>
-- end code --

and this is giving me the error:
'Error: {E201} Syntax error when processing "0001-3072". Encountered
"0001-3072" Was expecting one of: end element tag property attributes
attribute rdf:type [Line = 10, Column = 36]'
         (line 10 is the <my:field ...</..> line)

I then tried this code:
---- alternative code ----
<?xml version = "1.0" encoding = "UTF-8"?>
<rdf:RDF xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc = "http://purl.org/dc/elements/1.1/" xmlns:my =
"http://lucas.ucs.ed.ac.uk/"> 

  <rdf:Description rdf:about = "http://stacks.iop.org/">  
    <dc:Title>Institute of Physics STACKS</dc:Title>  
    <my:query my:attempted = "1" my:available = "1" my:result = "1"
my:verified = "0">
      <rdf:Description rdf:about="http://stacks.iop.org/0001-3072//L">
        <dc:Description>journal search</dc:Description>   
        <my:field my:name = "issn">0001-3072</my:field>  
     </rdf:Description> 
    </my:query>
  </rdf:Description> 
</rdf:RDF>
---- end alternative ----

which gives me the error:
'Error: {E201} Syntax error when processing " ". Encountered " " Was
expecting one of: end element tag property attributes attribute rdf:type
[Line = 6, Column = 87]'
      (Line 6 is the <my:query.... > line )
 - the valisator also bombs out, and doesn't parse any further down the
tree..

There seems to be some complex legality about having attributes for
non-rdf elements.

Also, my reading of http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/
(section 2.2.1) imples that this is correct..

What am I missing here?

-- 
--==++
Ian Stuart: Edinburgh University Data Library.
I build things: computer programs (with code); or cars (with metal)

 Personal web site: http://lucas.ucs.ed.ac.uk/ 

Received on Thursday, 1 November 2001 08:24:27 UTC