Basics
Active XML relies on two key notions:
- AXML documents, that contain
calls to web services, and
- AXML services, that are declaratively
defined as XQuery queries over AXML documents.
They are used in a peer-to-peer
architecture, where each AXML peer holds a repository of AXML
documents and provides some AXML services.
AXML
documents
Here is a sample AXML document:
<directory> <dep name="Toy"> <sc>toy.xyz.com/GetToyPersonel()</sc>
</dep>
<dep name="DVD">
<sc>dvd2000.com/GetDVDPersonnel()</sc>
</dept>
</directory>
The <sc> elements
are interpreted as calls to web services. After, say, the first service
is called, the result of the call is integrated in the document, which
becomes:
<directory> <dep name="Toy"> <sc>toy.xyz.com/GetToyPersonel()</sc>
<person pname="Smith"> <phone>01...</phone> <pda>
<sc>toy.xyz.com/GetPDA(../../@pname)</sc>
</pda> </phone> </person>
</dep>
<dep name="DVD">
<sc>dvd2000.com/GetDVDPersonnel()</sc>
</dept>
</directory>
Note that the service results and parameters
can themselves be AXML documents. Therefore, AXML peers exchange intensional
data.
The language also provide extra features to
control when the web services are invoked and how long
their results should be kept in the document.
AXML
services
Here is a sample service definition:
let service Get-Toy-Personnel( ) be for $a in document("toy.xyz.com/members.axml")/member, $b in $a//name, $c in $a//phone, $d in $a//pda return <person pname={ $b/text() }> { $c } { $d } </person>
Each AXML service is defined as a parameterized
query over the peer's repository documents. They can be invoked
using the SOAP protocol.
We also provide for continuous services,
in the style of Pub/Sub systems.
|