- From: Ian Stuart <Ian.Stuart@ed.ac.uk>
- Date: 01 Nov 2001 12:52:29 +0000
- To: RDF Interest list <www-rdf-interest@w3.org>
Hi all,
I'm trying to understand RDF/XML, and have got it (mostly) understood.
I'm using the W3C validator to check my work, and I'm getting an error
for a construction that I think is right.
Here is my default 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>
<dc:Description>Full text electronic serials service for subscribing
institutions.</dc:Description>
<dc:Rights>IOP Publishing Ltd.</dc:Rights>
<my:infoURL>http://stacks.iop.org/</my:infoURL>
<my:logoURL>http://stacks.iop.org/images/stacks.gif</my:logoURL>
<my:query rdf:parseType = "Resource">
<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">http://stacks.iop.org/0001-3072//L</my:search>
<dc:Description>journal search</dc:Description>
<dc:Type>text</dc:Type>
<dc:Format>text/html</dc:Format>
<dc:Rights>IOP Publishing Ltd.</dc:Rights>
<my:genre>journal</my:genre>
<my:field my:name = "issn">0001-3072</my:field>
</rdf:Description>
</my:query>
</rdf:Description>
</rdf:RDF>
--- end code ---
The validator gives me the following error:
"Error: {E201} Syntax error when processing start element
rdf:Description. rdf:Description elements generally may only occur to
describe an object.[Line = 11, Column = 9]"
Line 11 is the second rdf:Description line.
Upon removing the nested rdf:Description tages, I get two error2:
'Error: {E201} Syntax error when processing
"http://stacks.iop.org/0001-3072//L". Encountered
"http://stacks.iop.org/0001-3072//L" Was expecting one of: end element
tag property attributes attribute rdf:type [Line = 11, Column = 92]'
and
'Error: {E201} Syntax error when processing "0001-3072". Encountered
"0001-3072" Was expecting one of: end element tag property attributes
attribute rdf:type [Line = 17, Column = 36]'
If I remove the 'rdf:parseType = "Resource"' from the 'my:query' tag,
the contents of the 'my:query' tag don't get passed.
My question is:
What am I missing here? how do I get the contents of the query parsed?
As a sub-question, I also have further elements within the 'my:query'
tag:
--- extra code ---
<rdf:seq>
<rdf:li>
<rdf:Alt>
<rdf:li rdf:parseType = "Resource">
<my:type mime = "text/plain">foo</my:type>
</rdf:li>
</rdf:Alt>
<rdf:Alt>
<rdf:li rdf:parseType = "Resource">
<my:type mime =
"text/html"><pre>foo</pre></my:type>
</rdf:li>
</rdf:Alt>
</rdf:li>
<rdf:li>
<rdf:Alt>
<rdf:li rdf:parseType = "Resource">
<my:type mime = "text/plain">bar</my:type>
</rdf:li>
</rdf:Alt>
<rdf:Alt>
<rdf:li rdf:parseType = "Resource">
<my:type mime =
"text/html"><pre>bar</pre></my:type>
</rdf:li>
</rdf:Alt>
</rdf:li>
</rdf:seq>
-- end extra code --
and this *really* annoys the validator..
Again, how should I do this properly?
As a final question, when I come to write a schema for my xml instances,
what to I need for xsi:schemaLocation?
--
--==++
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 07:45:08 UTC