<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6001.18226" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=698212507-29042009><FONT face=Arial 
color=#0000ff size=2>XQuery is Turing-complete, so there shouldn't be any 
theoretical problems.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=698212507-29042009><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=698212507-29042009><FONT face=Arial 
color=#0000ff size=2>It could be that there are issues to do with data model 
coverage - for example XQuery 1.0 doesn't give access to unparsed entities, and 
doesn't provide any way to create namespaces whose names aren't known 
statically. But I think those are unlikely to be stopper 
issues.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=698212507-29042009><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=698212507-29042009><FONT face=Arial 
color=#0000ff size=2>Michael Kay</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=698212507-29042009><FONT face=Arial 
color=#0000ff size=2>http://www.saxonica.com/</FONT></SPAN></DIV><BR>
<BLOCKQUOTE dir=ltr 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> David A. Lee [mailto:dlee@calldei.com] 
  <BR><B>Sent:</B> 29 April 2009 01:33<BR><B>To:</B> Michael Kay<BR><B>Cc:</B> 
  'McBeath, Darin W (ELS-STL)'; talk@x-query.com; 'Vyacheslav 
  Sedov'<BR><B>Subject:</B> Re: [xquery-talk] SPARQL to XQuery 
  transformation<BR></FONT><BR></DIV>
  <DIV></DIV>I don't believe its impossible either, but I was thinking, as a 
  purely functional language (if that makes a difference?)<BR>Is there any set 
  of computations that xquery couldn't theoretically execute, that say a 
  procedural language could ?<BR><BR><BR>Michael Kay wrote: 
  <BLOCKQUOTE cite=mid:9DD2F7971B654583A07553A4E3C3348D@Sealion type="cite">
    <BLOCKQUOTE type="cite"><PRE wrap="">It might be *possible* to do in XQuery but its not a simple 
"translation" of one query language to another, it would take 
writing an inference engine in xquery.  quite a project.
    </PRE></BLOCKQUOTE><PRE wrap=""><!---->
If you can write an interpreter for a query language then you can write a
compiler for it. And compiling into XQuery is probably easier than compiling
into machine code. So as far as I can see, it doesn't look intrinsically
impossible at all.

Michael Kay
<A class=moz-txt-link-freetext href="http://www.saxonica.com/">http://www.saxonica.com/</A>

_______________________________________________
<A class=moz-txt-link-abbreviated href="mailto:talk@x-query.com">talk@x-query.com</A>
<A class=moz-txt-link-freetext href="http://x-query.com/mailman/listinfo/talk">http://x-query.com/mailman/listinfo/talk</A>
  </PRE></BLOCKQUOTE><BR><PRE class=moz-signature cols="72">-- 
-----------------------------------------------------------
David A. Lee
<A class=moz-txt-link-abbreviated href="mailto:dlee@calldei.com">dlee@calldei.com</A>  
<A class=moz-txt-link-freetext href="http://www.calldei.com">http://www.calldei.com</A></PRE></BLOCKQUOTE></BODY></HTML>