RE: container problem

> I have a problem with the use of a container I cannot
> resolve :-(
>
> I want to describe the elements within a container but
> get the following error message:
>
> Error: {E201} Syntax error when processing start
> element rdf:Description. rdf:Description elements
> generally may only occur to describe an object.[Line =
> 32, Column = 4]
>
> (I know that these elements are 'predicates' and not
> objects but isn't there a way to attach descriptions to
> them ??)
> Any help is greatly appreciated !!

Your problem is a serialisation one, that is your RDF is okay, but your
RDF/XML is buggy.

You placed the rdf:Description element directly inside another
rdf:Description element. This breaks the object/predicate/object alternation
of RDF/XML (what Danbri labelled "striped"). Instead you should either:
1. Place the rdf:Description element directly inside a predicate element,
like you did with dc:date.
2. Place the rdf:Description directly inside the rdf:RDF element, like you
did with the first one.
3. Not use rdf:Description; rdf:Description isn't needed in cases where you
have rdf:Resource attributes on a predicate element, or where you use the
qualified name of an element to state its type (e.g. the rdf:Bag element).

One way to fix the XML is to place the rdf:Description for <#subjects>
outside of the rdf:Description for
<http://expmed.rd.astrazeneca.net/knowledgeobject/KNO1/combrxresp1.rdf>,
another is to not use rdf:Description, but rather place the dc:Description
directly inside the rdf:Bag element. Examples of both of these follow. Note
that while the XML differs the RDF of each is identical:

<?xml version="1.0" encoding="ISO-8859-1"?>
<rdf:RDF
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns:dc="http://purl.org/dc/elements/1.0/"
 xmlns:dcq="http://purl.org/dc/qualifiers/1.0/"
 xmlns:azkno="http://expmed.rd.astrazeneca.net/knowledgeobject/">
<rdf:Description

rdf:about="http://expmed.rd.astrazeneca.net/knowledgeobject/KNO1/combrxresp1
.rdf">
 <dc:title>Title here</dc:title>
 <dc:identifier>combrxresp1</dc:identifier>
 <dc:creator>snell_n</dc:creator>
 <dc:date>
  <rdf:Description>
   <dcq:dateScheme>WTN8601</dcq:dateScheme>
   <rdf:value>2003-02-17</rdf:value>
  </rdf:Description>
 </dc:date>
 <dc:subject>
  <rdf:Bag rdf:ID="subjects">
   <rdf:li>BM1</rdf:li>
   <rdf:li>BM2</rdf:li>
   <rdf:li>Ind1</rdf:li>
   <rdf:li>Ind2</rdf:li>
   <rdf:li>Ind3</rdf:li>
   <dc:description>These are in fact keywords</dc:description>
  </rdf:Bag>
 </dc:subject>
 <dc:description>
Text of the KNO here
 </dc:description>
</rdf:Description>
</rdf:RDF>

<?xml version="1.0" encoding="ISO-8859-1"?>
<rdf:RDF
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns:dc="http://purl.org/dc/elements/1.0/"
 xmlns:dcq="http://purl.org/dc/qualifiers/1.0/"
 xmlns:azkno="http://expmed.rd.astrazeneca.net/knowledgeobject/">
<rdf:Description

rdf:about="http://expmed.rd.astrazeneca.net/knowledgeobject/KNO1/combrxresp1
.rdf">
 <dc:title>Title here</dc:title>
 <dc:identifier>combrxresp1</dc:identifier>
 <dc:creator>snell_n</dc:creator>
 <dc:date>
  <rdf:Description>
   <dcq:dateScheme>WTN8601</dcq:dateScheme>
   <rdf:value>2003-02-17</rdf:value>
  </rdf:Description>
 </dc:date>
 <dc:subject>
  <rdf:Bag rdf:ID="subjects">
   <rdf:li>BM1</rdf:li>
   <rdf:li>BM2</rdf:li>
   <rdf:li>Ind1</rdf:li>
   <rdf:li>Ind2</rdf:li>
   <rdf:li>Ind3</rdf:li>
  </rdf:Bag>
 </dc:subject>
 <dc:description>
Text of the KNO here
 </dc:description>
</rdf:Description>
<rdf:Description rdf:about="#subjects">
 <dc:description>These are in fact keywords</dc:description>
</rdf:Description>
</rdf:RDF>

Received on Thursday, 8 May 2003 07:02:48 UTC