PROGRAM uri [typeOfInput] -> [typeOfOutput] [THROWS typeOfException1] [meta data]
LET [type] variable := expressionVariables need not be declared before being used. However, the (XML schema) type of a variable can optionally be set as part of the first assignment to this variable. The scope of a variable is the whole XL program. Expressions can be any expression defined by the W3C XQuery proposal [Que]. XQuery is very powerful and a great deal of the power of XL is gained by simply leveraging the expressive power of XQuery. XQuery expressions include normal XML elements, function calls, arithmetic expressions (i.e., use of built-in operators), XPath, and more complex queries similar in nature with the SELECT-FROM-WHERE constructs of SQL. As in XPath and XQuery, we denote variables with a $ sign.
LET \$harry := <person> <name>Harry Potter</name> <hobby>Quidditch</hobby> <hobby>Broomsticks</hobby> </person>As mentioned earlier, typing is optional, but it is strictly enforced if it is used.
INSERT <age>14</age> INTO $harry
DELETE $harry/hobby[.=``Broomsticks"]
REPLACE $harry/age WITH <age>{ $harry/age + 1 }</age>
RENAME $harry/name AS ``fullname''
expression --> uri [--> variable]The semantics is rather straightforward. A message with the value of expression is sent to the service identified by uri. The execution is halted until the called service finishes it execution and returns the entire result (also wrapped in an SOAP message). If a variable is given as part of the call, then the body of the message returned by the called service is copied into this variable. The exact semantics of synchronous calls in the presence of transactions, will be discussed in a later subsection on transactions.
expression ==> uri [==> uriOfHandler]In this case the execution of the XL program will not block and the program will immediately continue executing the next statement after the message to the called service is sent. If the output of the called service (errors or any other reply message) needs to be processed, then the URI of the Web service in charge with this processing can be given as part of the call. The exact semantics of asynchronous calls in the presence of transactions will be discussed in a later subsection on transactions.
statement1; statement2
statement1 ? statement2
statement1 | statement2
statement1 || statement2
statement1 & statement2
ALIAS uri AS variableIf such a variable is involved in the rest of the program in an expression, then the persistent data will be queried. If the variable is on the left side of a LET statement, then a new value will be assigned to the persistent data (the old value of the persistent data will be lost). Furthermore, persistent data can be manipulated using the update statements described before (or the equivalent constructs once XQuery has been extended in this direction). For instance, if HTTP://personDB.com/coordinates is the URI identifying the XML view of a table in a relational database containing information about mobile telephone numbers and owls of wizzards, then the following sequence of statements will insert a new record into this database:
ALIAS HTTP://personDB.com/coordinates AS $coordinates; INSERT <person> <name>Harry Potter</name> <mobile> (160) 644-7107 </mobile> <owl>Hedwig</owl> <person> INTO $coordinatesOf course such updates will only work if the source of the persistent data (e.g., a Web server or a relational database) supports updates. If not, then the execution of such an INSERT statement will fail; i.e., an exception will be raised. Similarly, the execution of LET, DELETE, RENAME, and REPLACE statements can fail if the data source does not support updates. Web pages, for instance, will typically not be updatable, but, of course, Web pages can easily be queried.
ATOMIC statement ENDATOMIC
[AM95] M. P. Atkinson and R. Morrison. Orthogonally persistent object systems. The VLDB Journal, 4(3), 1995.
[Biz] BizTalk.org. Biztalk initiative. http://www.biztalk.org/home/default.asp.
[BN96] P. A. Bernstein and E. Newcomer. Principles of Transaction Processing. Morgan-Kaufmann Publishers, 1996.
[BPM] BPMI.org. Business management initiative. http://www.bpmi.org/index.esp.
[CCMW] E. Christensen, F. Curbera, G. Meredith, and S. Weerawarana. Web Services Description Language (WSDL) 1.1. http://www.w3.org/TR/wsdl.
[CD99] L. Cardelli and R. Davies. Service combinators for Web computing. In IEEE Transactions on Software Engineering (TSE), 1999.
[CIJ + 00] F. Casati, S. Ilnicki, L. Jin, V. Krishnamoorthy, and M.-C. Shan. eFlow: a platform for developing and managing composite e-services. Technical report, Hewlett Packard Software Technology Laboratory, 2000.
[CM84] G. Copeland and D. Maier. Making Smalltalk a database system. In Proceedings of the 1984 ACM SIGMOD International Conference on Management of Data, pages 316–325. ACM, 1984.
[Con] W3C Consortium. Workshop on Web services. http://www.w3.org/2001/01/WSWS.
[deb01] Special issue on Infrastructure for Advanced E-services. Data Engineering Bulletin, 24(1), March 2001.
[Enc] XML Encryption. http://www.w3.org/encryption/2001/.
[eSp] eSpeak. The universal language of e-services. http://www.e-speak.hp.com/.
[FK01] D. Florescu and D. Kossmann. An XML Programming Language for Web Service Specification and Compos[it]ion. Technical report, TU Munich, June 2001.
[Hoa85] C.A.R. Hoare. Communicating Sequential Processes. Prentice-Hall International, 1985.
[JAK] JAKARTA. The JAKARTA project. http://jakarta.apache.org/.
[JXT] JXTA. Project JXTA. http://www.jxta.org/.
[Lam] L. Lamport. The temporal logic of actions. Technical report, Digital Systems Research Center.
[Moh00a] C. Mohan. Transaction processing and distributed computing in the internet age. Technical report, 2000.
[Moh00b] C. Mohan. Workflow management in the internet age. Technical report, 2000.
[oWF] XForms: The Next Generation of Web Forms. http://www.w3.org/markup/forms/.
[Proa] Simple Object Access Protocol. http://www.w3.org/tr/soap/.
[Prob] XML Protocol. http://www.w3.org/2000/xp/.
[Que] XML Query. http://www.w3.org/xml/query.
[Sch] XML Schema. http://www.w3.org/xml/schema.
[UDD] UDDI.org. Universal description, discovery and integration of businesses for the web. http://www.uddi.org/.
[Web] WebL. Compaq's web language. http://www.research.compaq.com/SRC/WebL/.
[WSF] WSFL. Web services flow language. http://www-4.ibm.com/software/solutions/webservices/pdf/WSFL.pdf.
[XPa] XML Path Language XPath. http://www.w3.org/tr/xpath.
[XSL] Extensible Stylesheet Language XSLT. http://www.w3.org/style/xsl/.