From: Suman Nath (sknath@cs.cmu.edu)
Date: 01/30/03
All,
Hope your mini projects are going well.
1. The query processing code included in the IrisNet release we gave you
is what we had at the end of the last summer, and the code we developed
later is still not polished enough to be distributed. For this earlier
version, you need to specify the entire query (all the idable nodes) even
though you want to fetch everything.
For example, suppose, in you schema, the IDable nodes are sknPTROOT,
USRegion, state, county, city, neighborhood, region (= CMU) and building
(= WH and HH). If you want to query for WH, the corresponding XPATH query will be..
/sknPTROOT/usRegion/state/county/city/neighborhood/region[@id='CMU']/building[@id='WH']
Similarly, if you want to query about all the buildings at CMU, the query
* SHOULD BE *
/sknPTROOT/usRegion/state/county/city/neighborhood/region[@id='CMU']
***IMPORTANT***
However, in the specific version of the OA code you are using requires
that your query specify all the IDable nodes along the tree. So, the the
second query given above will not work -- wince it misses the "building"
node (note that, the 2nd query is a completely valid XPATH query -- only
the specific version of IrisNet code you are using does not support that).
So, you need to use the following query to know about all the buildings at
CMU.
/sknPTROOT/usRegion/state/county/city/neighborhood/region[@id='CMU']/building
Note that, the last element 'building' does not include the 'id'
attribute, to mean that any building within CMU is fine.
We have noticed this problem later and fixed it in a later version. The
code is not polished yet, so it will take a while for us to release the
code.
2. After you run the OA and distribute the XML schema among the OAs, you
can use OA's command line interface (which is run by "make runcl") to see
if your query works. The command line interface supports a command "query
<ip> <XPATH query>", where <ip> denotes the OA containing the root
element. You may find the tool useful.
3. You need to split and distribute the schema *ONLY ONCE*. AFter you do
it, the local XML databases should contain the part of the schema they are
given by the "add" and "breakfile" commands. Subsequent query processing
with OAs will use the local database.
If you need to re-distribute the schema, first delete the existing
distribution using the "delete <ip> <databasename>" command (databasename
= root-element of the schema).
If you are too curious about the contents of the local XML database, do
the following ($IRISNET is your IrisNet installation directory):
export XINDICE_HOME=$IRISNET/packages/xml-xindice-1.0/
export JAVA_HOME=$IRISNET/packages/jdk1.3.1_06/
export PATH=$PATH:$IRISNET/packages/xml-xindice-1.0/bin/
xindiceadmin rd -c /db/PSF6789 -n <your-andrew-id>PTROOT
It should show you the content of the local XML document.
- Suman
This archive was generated by hypermail 2.1.5 : 01/30/03 EST