I agree with Elias that because we probably won't have rules
implemented in the forseable future, it's impossible to write queries
without a common predicate such as :body used.
Here are my questions/issues.
- Just to get it out of the way, I assume it would it be completely
wrong to set both :body and one of (:xml, :html, etc...)
- If I choose to set only :body, then should all of my :Content
resources only be of rdf:type :Content or :TextContent ?
- Or is it ok to set the proper rdf:type, i.e. :PlainText, :XHTML, and
use the :body property, setting the correct datatype depending on the
rdf:Type? I think this approach is correct.
Going one step further, I don't believe there is a great need for
subpropeties of :body. Why not use an allValuesFrom restriction on the
:body property to restrict the range to the proper datatype in the
context of the given subclass of :Content ? (I appologize if this
approach was already discussed in another thread)
BenSzekely wrote:
> For correctness, I currently (and for a fleeting moment) have our
> implementation populate the specific content property (i.e. :xml)
> instead of the generic :body.
>
> I agree with Elias that because we probably won't have rules
> implemented in the forseable future, it's impossible to write queries
> without a common predicate such as :body used.
>
> Here are my questions/issues.
>
> - Just to get it out of the way, I assume it would it be completely
> wrong to set both :body and one of (:xml, :html, etc...)
It's not wrong to set both, right? It would be just like if you have
serialized an inferred model based on our ontology.
>
> - If I choose to set only :body, then should all of my :Content
> resources only be of rdf:type :Content or :TextContent ?
Top of my head I know it would be :Content, however :TextContent could
also be ok at the same time. It just depends on the definition of the
class, correct?
>
> - Or is it ok to set the proper rdf:type, i.e. :PlainText, :XHTML, and
> use the :body property, setting the correct datatype depending on the
> rdf:Type? I think this approach is correct.
Since there's no restriction on :body for :Content, we should always set
it and with the correct datatype. ie. XMLLiteral or not. Is there a
xsd:base64? Now the actual rdf:type depends on the querying audience. If
they depend on the rdf:type to be there or just the :type attribute.
>
> Going one step further, I don't believe there is a great need for
> subpropeties of :body. Why not use an allValuesFrom restriction on the
> :body property to restrict the range to the proper datatype in the
> context of the given subclass of :Content ? (I appologize if this
> approach was already discussed in another thread)
>
>
All these questions seem to be directed at what should the basic RDF
representation of an Atom feed look like without depending on inference.
I'm not an expert, but it seems like something we should keep in the
back of our mind is a "basic normal form" of Atom OWL. We then should
add all of the extra OWL statements to create new classes that could be
inferred from the basic model such as :XHTML or re-ified link statements.
-Elias
[ a :Content;
:body "hello";
:text "hello"
]
:body and :text would refer of course to the same literal since :text
is a owl:subPropertyOf :body.
Now I am not sure what the problems with the following is:
[ a :Content;
:body [ owl:sameAs "A really long...... literal";
owl:sameAs _:body ];
:text _:body;
] .
It probably breaks OWL-DL. But it could help save you disk space. It
all depends of course on how the database stores literals. A good
database should never duplicate literals.
>>
>> - If I choose to set only :body, then should all of my :Content
>> resources only be of rdf:type :Content or :TextContent ?
>
> Top of my head I know it would be :Content, however :TextContent could
> also be ok at the same time. It just depends on the definition of the
> class, correct?
You could use :TextContent to help infer that the literal pointed to
by the body is a pure text literal.
We need to verify this. Can one deduce from
:c a :HTML;
:body "<b>hello</b>".
that
:c :html "<b>hello</b>" .
or indeed that
:c :html "<b>hello</b>";
:type "text/html" .
>>
>> - Or is it ok to set the proper rdf:type, i.e. :PlainText, :XHTML,
>> and
>> use the :body property, setting the correct datatype depending on the
>> rdf:Type? I think this approach is correct.
>
> Since there's no restriction on :body for :Content, we should
> always set
> it and with the correct datatype. ie. XMLLiteral or not. Is there a
> xsd:base64? Now the actual rdf:type depends on the querying
> audience. If
> they depend on the rdf:type to be there or just the :type attribute.
yes.
>>
>> Going one step further, I don't believe there is a great need for
>> subpropeties of :body. Why not use an allValuesFrom restriction
>> on the
>> :body property to restrict the range to the proper datatype in the
>> context of the given subclass of :Content ? (I appologize if this
>> approach was already discussed in another thread)
>
> All these questions seem to be directed at what should the basic RDF
> representation of an Atom feed look like without depending on
> inference.
> I'm not an expert, but it seems like something we should keep in the
> back of our mind is a "basic normal form" of Atom OWL. We then should
> add all of the extra OWL statements to create new classes that
> could be
> inferred from the basic model such as :XHTML or re-ified link
> statements.
I think you are right. You could do everything just with
[ a :Content;
:body "<b>blah</b>";
:type "text/html"
] .
The :html relation is just a way of creating a datatype literal, so
that one can write
"<b>blah</b>"^:html .
Ie. It puts in some of the syntactic sugar that we find in the xml
syntax.
Now perhaps there exists, or we could define a class of SPARQL basic
relations, and classes
( :Content :type :length ...) a :SPARQLbasic .
These would be the ones to be favored by sparql engines.
Henry
> -Elias
Strong claim ;-)
I think "A good database should never duplicate literals longer than
n" for some nonzero n is more likely to be defensible ;-)
(Not that this contributes much to the question at hand. Sorry. I'll relurk.)
- Benja