<!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.6000.16608" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=142030412-03042008><FONT face=Arial 
color=#0000ff size=2>1. It's certainly possible to get meaningful information 
out of Microsoft Office XML formats - but it's not easy! I haven't used XQuery 
on this, but I've done it using XSLT 2.0, making fairly heavy use of the 
positional grouping facilities which have no direct equivalent in XQuery 1.0; I 
think that for this kind of data structure XSLT's template rules are also very 
useful. So my first choice would have been XSLT rather than XQuery. However, the 
degree of difficulty depends very much on what information you are hoping to 
extract, and on the degree of regularity present in the input 
documents.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=142030412-03042008><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=142030412-03042008><FONT face=Arial 
color=#0000ff size=2>2. XQuery doesn't currently have update support (though 
it's coming soon and is available in some products). But you'll find equivalents 
to most of SQL's set operators in XQuery. It's a different data model (sequences 
rather than sets, hierarchies rather than tables, nodes with identity rather 
than only values), so the details are obviously rather different. But one could 
argue that the SQL operators (with some exceptions such as "group by") drop out 
as a subset of the XQuery operators.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=142030412-03042008><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=142030412-03042008><FONT face=Arial 
color=#0000ff size=2>Michael Kay</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=142030412-03042008><FONT face=Arial 
color=#0000ff size=2><A 
href="http://www.saxonica.com/">http://www.saxonica.com/</A></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> talk-bounces@x-query.com 
  [mailto:talk-bounces@x-query.com] <B>On Behalf Of </B>Tsao, 
  Scott<BR><B>Sent:</B> 03 April 2008 13:30<BR><B>To:</B> 
  talk@x-query.com<BR><B>Subject:</B> [xquery-talk] A Couple of Questions - 
  OOXML and SQL<BR></FONT><BR></DIV>
  <DIV></DIV>
  <DIV><FONT face=Arial size=2>During a recent XQuery&nbsp;<SPAN 
  class=508502405-03042008>O</SPAN>verview&nbsp;<SPAN 
  class=508502405-03042008>presentation</SPAN>, there were a couple of questions 
  raised which I&nbsp;<SPAN class=508502405-03042008>am</SPAN> searching for 
  answers:</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>&nbsp;&nbsp; 1. Office Open XML (OOXML) is a file 
  format used by the Microsoft Office 2007 applications. Can XQuery be used to 
  get meaningful information from an OOXML document, or would it only return 
  items based on formatting aspects (all heading 1s, or all list 
  items).</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>&nbsp;&nbsp; 2. SQL is based in part on Set 
  theory from Mathematics, and Set algebra. It allows set operations "update all 
  red projects to green." Does XQuery support set algebra? For example, SQL join 
  is a set operation that has inner, outer, Cartesian forms. <A 
  href="http://en.wikipedia.org/wiki/Algebra_of_sets">http://en.wikipedia.org/wiki/Algebra_of_sets</A></FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>Do you have answers to those questions? If you 
  do, please do share!</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV>&nbsp;</DIV>
  <DIV><SPAN class=508502405-03042008><FONT face=Arial 
  size=2>Thanks,</FONT></SPAN><SPAN class=508502405-03042008></DIV>
  <DIV>
  <P><B><I><FONT face="MS Sans Serif" color=#ff0000 size=2>Scott 
  Tsao</FONT></I></B> <BR><FONT face="MS Sans Serif" size=2>Associate Technical 
  Fellow</FONT> <BR><FONT face="MS Sans Serif" size=2>The Boeing Company</FONT> 
  </P></SPAN></DIV></BLOCKQUOTE></BODY></HTML>