Standards
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   Web Development Archives Mailing Lists Standards

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Web Development Archives Sponsor:
  #1  
Old July 1st, 2008, 06:50 AM
Bijan Parsia
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
comparing XML and RDF data models

1 Jul 2008, at 11:21, Maciej Gawinecki wrote:

In one of the article comparing two data models: XML and RDF I
found a statement stating that (I'm loosely citing from my memory):
>

Searching XML with XPath query expression is easy if you know the
schema of the document being quiried.

I don't think that knowing the schema is remotely necessary. XPath is
not schema aware, for example. I'd hazard that most XPath is over
merely well formed XML.

You do need to know something about the structure, but, for example,
it's pretty easy to use ancestor and descendent queries to ignore
quite a bit of structure.

However, the same query will not
work any a document, which is differently structured, but contains
equivalent information.

If the structure is *far* enough away, then of course. If you renamed
everything and leave the structure intact, this is true too. It's
also true for RDF>

This can be solved by usage of RDF model,
which can be then queried with RDQL or SPARQL query.
>

Is that really true, that XPath-based XML search is limited due to
its structure?

In a restricted sense, yes.

Yes, that's why there is a great research on keyword-based quering
of XML documents (not knowing schema in advance).

This won't help if names change (which is a kind of structural change).

But is it RDF really better for this issue ?
[snip]

Not even a little bit.

Consider changing from a data valued property to an intermediate
object. I.e.,

s weighs "10".

to
s weighs _:x.
_x: weightvalue "10".
_x: atTime "".

You have to change the query in SPARQL. In XML it's pretty easy to
maintain your xpath, e.g.,

<Weight name="S" value="10"/>

vs

<Weight name="S" value=10 timeRecorded=""/>

The same xpath will get the name and value.

course if you shift from attributes to elements, you'll have made
too big a structural change for that xpath. But so?

Bijan.

Reply With Quote
  #2  
Old July 1st, 2008, 06:50 AM
Maciej Gawinecki
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
comparing XML and RDF data models

In one of the article comparing two data models: XML and RDF I found a
statement stating that (I'm loosely citing from my memory):

Searching XML with XPath query expression is easy if you know the
schema of the document being quiried. However, the same query will not
work any a document, which is differently structured, but contains
equivalent information. This can be solved by usage of RDF model,
which can be then queried with RDQL or SPARQL query.

Is that really true, that XPath-based XML search is limited due to its
structure? Yes, that's why there is a great research on keyword-based
quering of XML documents (not knowing schema in advance). But is it RDF
really better for this issue ?

I will try to give a few example what I exactly mean. [ course, I'm
ommiting here the problem of knowning the name a tag/property/resource,
only the structure can be different.] Let's see two XML documents:

<Sensor>
<name>Sensor220</name>
<isLocatedNearBy>
<Road>
E330
</Road>
<isLocatedNearBy>
</Sensor>

Here road value can be check through XPath expression:
\\Sensor\isLocatedNearBy\Road

And let's see differently structured document (road defined by name
property)

<Sensor>
<name>Sensor220</name>
<isLocatedNearBy>
<Road>
<name>E330</name>
</Road>
<isLocatedNearBy>
</Sensor>

With XPath expression: \\Sensor\isLocatedNearBy\Road\name

yet another one (road is ancestor tag to the sensor tag, not the oposite)

<Road>
<name>E330</name>
<hasSensor>
<Sensor>
<name>Sensor 220</name>
</Sensor>
</hasSensor>
</Road>

XPath: \\Road\name

The same problem would be with RDF. Let see the first model

:Sensor220 :isLocatedNearBy :Road_E330 .

WHERE clause of SPARQL query would be then like a

?s :isLocatedNearBy :Road_E330 .

For other version we define a road with a specific value of hasName
property:

:Sensor220 :isLocatedNearBy :RoadXXX .
:RoadXXX :hasName "E330" .

the SPARQL query part:

?s :isLocatedNearBy ?r .
?r :hasName "E330" .

or by analogy to the third XML representation (road "has" a sensor, not
the opposite):

:RoadXXX :hasName "E330" .
:RoadXXX :hasSensor :Sensor220 .

the SPARQL query part:

?r :hasName "E330" .
?r :hasSensor ?s .

Can someone comment it ?

Thanks,
Maciej

Reply With Quote
  #3  
Old July 2nd, 2008, 06:31 AM
Bijan Parsia
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
comparing XML and RDF data models

Good job, Paul.

I considered making this point (or a variant) but was waaaaaay too
lazy to work out the details.

I hope we can put the "myth of the structure problem" behind us. It
really is anti-evangelism!

Cheers,
Bijan.

Reply With Quote
  #4  
Old July 2nd, 2008, 06:31 AM
Bijan Parsia
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
RDF(S) & OWL goodness ( comparing XML and RDF data models

Let's change the thread. Instead of talking about whether XML and RDF
are better and worse for preserving queries under structural change
(since Paul has shown that, in principle, there's an equivalence),
let's talk about the goodness!

Here's a first cut (to be fleshed out). I asterisk the ones I'm not
sure are true or that I can show:

1) RDF, and RDF culture, has some good affordances for "more
compatible" structural modeling. That is, one is more likely to get
(structure) compatible models if you start with RDF and model
"normally".
Why? Well, there are insignificant representational choices that XML
puts up front (e.g., attributes vs. elements) that have a big effect
on queries. Also, since XML's model is of the *data* (not the world)
there's less incentive to find "natural fits" (e.g., properties model
relations whereas in XML nesting could model a relation or a hierarchy).
I find this pretty weak. I've seen plenty of highly variant
modeling. I have trouble believing that two people sitting down will
reliably come up with anything similar.

2) RDF allows you to keep everything in "one model". I.e., you
can just keep adding stuff to your pile o triples and sort things out
later.
Is this actually a strength? In principle, you can do that in an xml
database and you can have queries that span more than one document/
schema.

3) Inference can help with schema alignment.
I believe this. Even consistency checking of classes can be helpful.
See ICM. Plus there are presentational benefits to a class hierarchy.

, ran out of steam and have no references. Feel free to add,
question, or elaborate!

Cheers,
Bijan.

Reply With Quote
  #5  
Old July 2nd, 2008, 06:31 AM
Dan Brickley
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
comparing XML and RDF data models

Bijan Parsia wrote:

In general, if you are inclined to make a general "betterness" claim
based on some abstract feature, don't. If you are going to anyway, make
sure you have every detail nailed with concrete, preferably real
examples ready to hand. Even then, one is better off just presenting the
goodness without contrast. If it's good enough, people will come.

Well said (though hard to live by)

Reply With Quote
  #6  
Old July 2nd, 2008, 06:31 AM
Bijan Parsia
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
comparing XML and RDF data models

2 Jul 2008, at 08:43, Rossel wrote:

>Any XML instance can be considered a compact, early-bound
>serialization of
>an infoset RDF graph.
>

+1.
XML is very powerful when it comes to presenting data (because it
details how data imbricate with each other). But XML is very unnatural

No, please no. Don't make such claims without backup. What's
unnatural for you may be very natural to other people. And
naturalness doesn't matter if *effectiveness* is at issue.

when it comes to crawling the data in an unexpected and ever-changing
manner (because XML tree structure is chosen once for all,
[snip]

And this is just false. Google for "open content model". Look at XML
Schema's "lax" and "skip" validation modes. Consider transformations.
(I.e., many XML people are perfectly comfortable treating the "input
tree" as just one step, not a fixed one)

RDF structure is similarly fixed in advanced (by and large).

This kind of talk, aside from being wrong, helps marginalize the
semantic web and related technologies.

In general, if you are inclined to make a general "betterness" claim
based on some abstract feature, don't. If you are going to anyway,
make sure you have every detail nailed with concrete, preferably real
examples ready to hand. Even then, one is better off just presenting
the goodness without contrast. If it's good enough, people will come.

Cheers,
Bijan.

Reply With Quote
  #7  
Old July 2nd, 2008, 06:31 AM
Olivier Rossel
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
comparing XML and RDF data models

Any XML instance can be considered a compact, early-bound serialization of
an infoset RDF graph.

+1.
XML is very powerful when it comes to presenting data (because it
details how data imbricate with each other). But XML is very unnatural
when it comes to crawling the data in an unexpected and ever-changing
manner (because XML tree structure is chosen once for all, usually
before even knowing which queries will be applied upon itself).

Reply With Quote
  #8  
Old July 2nd, 2008, 07:10 AM
Bijan Parsia
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
comparing XML and RDF data models

2 Jul 2008, at 12:19, Mark Birbeck wrote:

Hi Tim,
>

I'm not sure that this is where the differences lie.
>

In my view the key point is that with RDF we have unique identifiers
for concepts that is the things we're talking about, or the
vocabulary we're using to talk about them.
[snip]

I stop reading here.

Here's why. At best we have unambiguous (not unique) identifiers and
we don't have those either.

This isn't even a coordination issue. In a single ontology it's
highly nontrivial to establish formal uniqueness (i.e., two names
aren't equivalent/equal; requires lots of reasoning) and even harder
to establish intended uniqueness (I might coin a term twice because I
didn't recognize them to be the same).

Thus, whatever argument follows cannot depend on this point (and be
sound). Therefore it cannot be the key point. It's also hard to see
that XML is any worse off with regard to identifiers.

Cheers,
Bijan.

Reply With Quote
  #9  
Old July 3rd, 2008, 08:50 AM
Bijan Parsia
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
No universal things comparing XML and RDF data models

3 Jul 2008, at 10:52, Bernard Vatant wrote:

[Bijan] I don't know what a universal thing (is).

>>

>[Peter] Sorry, I thought that would be obvious. In my realist view
>there are
>things that people are trying to describe using RDF and those things
>have identities, which we are labelling with names, or describing
>through identifying properties. These are universal things. If you
>want to establish equality you are likely to be doing it at this
>level, unless you assume that markup is everything and a thing is
>only
>in existence because there is a description of it, and the
>description
>of the thing causes the thing to exist.
>>

Peter, sorry to be as harsh on that as Bijan has been, but I
consider this viewpoint as not sustainable, and dangerously naive.
>

I for one assume very strongly indeed that 'the description of the
thing causes the thing to exist', and my hunch is that Bijan will
follow me on this (at least I hope so).
[snip]

My official position, scarily enough, is that you don't need a
definite metaphysical view in order to build good ontologies ;)

I do think that the family of views in computational ontologies
generally called "realist" is indeed naive and fundamentally wrong
headed. Whether it's a "useful fiction" that helps people write
better or more compatible ontologies is an open empirical question.

But I, for one, wouldn't bet on it.

(I kinda wish it werethen we'd have realism justified as a useful
fiction and it doesn't get better than that :))

Interestingly, we've had three sorts of claim about RDF that tries to
support the "xpath is too structure sensitive"):

1) RDF just has the kind of structure for which this doesn't happen
(that seems to be the original claim, plus some "it's easier to
explore")
2) RDF is Python to XML's Perl. The strong version is that RDF really
only has Way to Say It. The weaker claims is that RDF encourages
standard ways to say it or has fewer ways to say it.
3) RDF aligns with reality (or better with reality) thus ends up with
reasonably similar models.

(Argh. These are more than a bit facile. I'm trying to sloganize to
get the feel for different positions. Please don't take these as my
full account of the various perspectives.)

What's strange about all of them is that they are conceptual
arguments, almost purely and simply. I remember a class I co-taught
at UMD. CS graduate students interested in AI. They had an assignment
to write 20 things about themselves (in English) and then translate
them into WL.

I would bet that there was more convergence on *content* than on how
to represent that content!

I remember also a project where we were trying to get people to write
simple triples. They got that they needed triples. But what they
ended up putting into the tool was things like

S P
"The cat is" "on the" "mat".
"Mary eats" "pudding" "on toast"

They just split up the sentences into somewhat equal parts!

None of this is to say that there aren't differences and benefits
worth exploring. But representation is *hard*. Using representations
is *hard*. Evolving systems with representations and queries is
*hard*. We hope to make all this easier, but there really is no
semantic bullet.

Cheers,
Bijan.

Reply With Quote
  #10  
Old July 3rd, 2008, 12:30 PM
Bijan Parsia
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
No universal things comparing XML and RDF data models

3 Jul 2008, at 15:00, Dan Brickley wrote:

(as an aside)
>

Bijan Parsia wrote:
>
>I remember also a project where we were trying to get people to
>write simple triples. They got that they needed triples. But what
>they ended up putting into the tool was things like
>S P
>"The cat is" "on the" "mat".
>"Mary eats" "pudding" "on toast"
>They just split up the sentences into somewhat equal parts!
>

I wonder how that experiment would work in other countries. US
schooling seems to teach English grammar with something called
"sentence graphing" or "sentence diagramming".

Yep. And these were US people, by and large. But sentence diagramming
generally would produce better triples (since you look at parts of
speech). They really just divided the sentences into three roughly
equal parts :)

Cheers,
Bijan.

Reply With Quote
  #11  
Old July 4th, 2008, 09:01 AM
Bijan Parsia
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
No universal things comparing XML and RDF data models

= 4 Jul 2008, at 14:37, Azamat wrote:

Thursday, July 03, 2008 4:45 PM, Bijan wrote:
My official position, scarily enough, is that you don't need a
definite metaphysical view in order to build good ontologies ;)
>I do think that the family of views in computational ontologies
>generally called "realist" is indeed naive and fundamentally
>wrong headed. Whether it's a "useful fiction" that helps people
>write better or more compatible ontologies is an open empirical
>question.
>

Thursday, July 03, 2008 12:52 PM, Bernard wrote:
>If you think my statement is senseless, feel free to explain why,
>as Alan took the time to do.
>

Bernard and Bijan,
>

Your ''official'' position, hope hardly prescribed by the W3
Consortium office, falls into a category of bad intellectual fashion:
to see the world as ontologically unreal.
[snip]

Definitely not. And you clearly don't have much experience with the
spectrum of views and arguments in philosophy of science and
mathematics or you would recognize that there are a variety of "non
realist" views.

More importantly, you don't seem to be a very careful reader. I *did
not give* my metaphysical views in the above quote. I claimed that
metaphysical views of the sort being bandied about aren't necessary
to building good ontologies. They also aren't necessary to doing good
science. You can be a social constructives, even a strong one, and
still do good science.

So, you know, spend more time being careful in your reading and
attributing of views and less time blathering.

Furthermore, in order to discuss the original question of this
thread, we certainly don't need any grand metaphysics. If one is
going to appeal to some metaphysics, do so concrete, as Tim did, and
show how it drives concrete behavior.

Cheers,
Bijan.

Reply With Quote
Reply

Viewing: Web Development Archives Mailing Lists Standards > comparing XML and RDF data models


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT