[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: The use of XML syntax in XML Query


input xml syntax

I wrote:
>
>Dare Obasanjo wrote:
>> I'm still waiting for someone with a theoretical background to debunk the
>> statements in the paper "On Database Theory and XML"[0] that it is is an
>> unsolvable problem to guarantee that one can create a query that for any
>> given XML input will generate output that conforms to a specified XML schema.
>>
> [0] http://www.cs.washington.edu/homes/suciu/files/_F2066943700.ps
> [...]
> As for Suciu's claim that "When one adds joins, typechecking
> becomes undecidable" [p. 5]:  I'm not quite up to debunking it,
> but it sounds bogus to me; regular languages are closed under
> cartesian product and homomorphisms, which is basically what
> a join gives you.
>

Having taken a look at the paper where Dan actually *proves*
this to be the case [1], I take that back :-)

But this paper appears to be using a stronger than usual
definition of the typechecking problem:

    "Given an input DTD tau_1, an output DTD tau_2 [...],
    and a query q, we say that q _typechecks_ (wrt. tau_1 and tau_2)
    iff q(inst(tau_1)) [is a proper subset of] inst(tau_2)"

That is, it demands that the algorithm be both sound *and*
complete.  The paper then presents some (impressive!) results
showing that this problem is decidable for certain restricted
classes of query languages and DTDs [2], but for "specialized DTDs" 
(roughly speaking: something at the level of RELAX-NG) or full XQuery,
the typechecking problem as stated is undecidable.

On the other hand, in practice a weaker definition of typechecking
is often satisfactory: "if a query q typechecks wrt. L1 and L2,
then for all s in L1, q(s) is in L2".  A guarantee from a type
checker that a program never produces bad output from good input is
a useful thing to have, even if the typechecker rejects some
correct programs.


[1] "XML with Data Values: Typechecking Revisited",
    <URL: http://www.cs.washington.edu/homes/suciu/files/_F1359680672.ps >

[2] the term "DTD" is used in the paper as a generic term for 
    grammar-based schema languages, not XML DTDs per se.

--Joe English

  jenglish@f...

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.