- From: Karsten Otto <otto@math.fu-berlin.de>
- Date: Wed, 28 Jan 2004 15:11:25 +0100 (CET)
- To: "Morcom, Harvey" <Harvey.Morcom@KPMG.co.uk>
- Cc: www-rdf-interest@w3.org
On Tue, 27 Jan 2004, Morcom, Harvey wrote: > > I am trying to create a triple where an XML document is associated with > a particular topic, or in the majority of cases topics. These topics > have a hierarchy to them which I wish to capture i.e. 'Consolidation' is > the top-level topic and 'Consolidation Procedures' is one of many > sub-topics of 'Consolidation'. > > Would I be right in assuming that the following syntax included within > the XML is correct. My concern is that a property/predicate cannot > contain more than one container. > > <Document xmlns:km="www.kpmg.com" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> > <rdf:RDF> > <rdf:Description about=""> > <km:topics> > <rdf:seq> > <rdf:li>Consolidation</rdf:li> > <rdf:li>Consolidation Procedures</rdf:li> > </rdf:seq> > <rdf:seq> > <rdf:li>Accounting</rdf:li> > <rdf:li>Others</rdf:li> > </rdf:seq> > </km:topics> > etc..... Your concern is right, you cannot annotate the document in this way. However, it is perfectly legal to have multiple occurrences of a property, in this case km:topics : <rdf:Description about=""> <km:topics> <rdf:seq> <rdf:li>Consolidation</rdf:li> <rdf:li>Consolidation Procedures</rdf:li> </rdf:seq> </km:topics> <km:topics> <rdf:seq> <rdf:li>Accounting</rdf:li> <rdf:li>Others</rdf:li> </rdf:seq> </km:topics> etc..... It seems to me that this models your original intent in a natural fashion. If you do not like this, you could of course use nested containers, but that might look rather messy. Note that in any case you wind up with *multiple* triples: <> km:topics _:s1 . _:s1 rdf:type rdf:Seq . _:s1 rdf:_1 "Consolidation" . _:s1 rdf:_2 "Consolidation Procedures" . <> km:topics _:s2 . etc.... You could also omit the rdf:Seq altogether, use an URI to identify "Consolidation Procedures", and define somewhere else that this is a subtopic of "Consolidation". Then you get only one triple per km:topic. Hope this helps, Karsten Otto
Received on Wednesday, 28 January 2004 09:11:53 UTC