Per my discussion in answer to the original problem, I think what you
are tripping on is that the way you want to do this effectively trying
to make a triple with two objects. I believe it is not really a
modeling question, but rather a question of how RDF/XML is translated
into triples.
Bob Morris
On Wed, May 19, 2010 at 9:52 PM, Steve Baskauf
<steve.baskauf@vanderbilt.edu> wrote:
This recent discussion reminds me of a question that I have been
wondering about for several months and hadn't gotten around to
bringing
up: can you have a Darwin Core XML representation where an element
has a
literal value and an attribute? If the XML is RDF, then I think the
answer is pretty much "no" as I just found out with the W3C
Validator.
However, in generic XML I don't think there is any rule that says
that
one can't have any attribute that one wants. The only guidance I
know
of on the subject is:
http://rs.tdwg.org/dwc/terms/guides/xml/index.htm#implement
It states that the value of a Darwin Core property should be the
content
of the element rather than stating the value as an attribute.
However,
I have the situation where I want to store or transfer two somewhat
equivalent representations of the value of a property: a string
literal
form and a URI form. In the example we've been talking about, I
would
like my generic (non-RDF) XML to do something like this:
<?xml version="1.0" encoding="UTF-8"?>
<dwr:SimpleDarwinRecordSet
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dwc="http://rs.tdwg.org/dwc/terms/"
xmlns:dwr="http://rs.tdwg.org/dwc/xsd/simpledarwincore/
"
>
<dwr:SimpleDarwinRecord>
<dwc:occurrenceID
rdf:resource="http://herbarium.org/hb123456">http://herbarium.org/hb123456
</dwc:occurrenceID>
<dwc:recordedBy
rdf:resource="http://people.vanderbilt.edu/~steve.baskauf/
foaf.rdf#me">Steve
Baskauf</dwc:recordedBy>
<dwc:basisOfRecord
rdf:resource="http://rs.tdwg.org/dwc/dwctype/
PreservedSpecimen">PreservedSpecimen</dwc:basisOfRecord>
... more elements, mostly with string literal values...
</dwr:SimpleDarwinRecord>
</dwr:SimpleDarwinRecordSet>
This would meet the basic guidelines of the Darwin Core XML Guide in
that the literal values would be the contents of the elements.
What I
don't know is if the inclusion of the rdf:resource attributes would
invalidate the XML if it were validated against someone's schema that
was silent about attributes or if the schema would have to explicitly
say that having an rdf:resource attribute was a valid option. I
think I
don't know enough about XML schemas ...
The reason why I would like to maintain/transfer both types of values
(literal and URI) is so that I could use the XML data to generate
both
HTML and RDF if I wanted. The HTML would tell humans that the
occurrence was a PreservedSpecimen, but the RDF would tell a linked
data
client that the occurrence was a
http://rs.tdwg.org/dwc/dwctype/PreservedSpecimen . I realize that
for
my own internal use, the XML can have any format I want, but if I
were
exporting XML for general public use, would it be bad to use the
approach above?
Steve
As an aside, I wanted to see exactly what the definition was for
rdf:resource However, the usual namespace for rdf:
(http://www.w3.org/1999/02/22-rdf-syntax-ns#) doesn't seem to include
"resource" in the defined properties. Very odd! Maybe I'm just
missing
something...
--
Steven J. Baskauf, Ph.D., Senior Lecturer
Vanderbilt University Dept. of Biological Sciences
postal mail address:
VU Station B 351634
Nashville, TN 37235-1634, U.S.A.
delivery address:
2125 Stevenson Center
1161 21st Ave., S.
Nashville, TN 37235
office: 2128 Stevenson Center
phone: (615) 343-4582, fax: (615) 343-6707
http://bioimages.vanderbilt.edu
_______________________________________________
tdwg-tag mailing list
tdwg-tag@lists.tdwg.org
http://lists.tdwg.org/mailman/listinfo/tdwg-tag
--
Robert A. Morris
Emeritus Professor of Computer Science
UMASS-Boston
100 Morrissey Blvd
Boston, MA 02125-3390
Associate, Harvard University Herbaria
email: ram@cs.umb.edu
web: http://bdei.cs.umb.edu/
web: http://etaxonomy.org/FilteredPush
http://www.cs.umb.edu/~ram
phone (+1)617 287 6466
_______________________________________________
tdwg-tag mailing list
tdwg-tag@lists.tdwg.org
http://lists.tdwg.org/mailman/listinfo/tdwg-tag