XQL Challenge (also, Design for Queryability)
costello at mitre.org
Mon Jul 5 15:23:31 BST 1999
I have created an XML document that contains Cellphone data.
I have organized the data in this XML document similar to how
it might be organized in a database:
- one subtree contains Cellphone hardware data (weight,
- one subtree contains Cellphone feature data (caller id, one
touch dialing, etc).
- one subtree maps Cellphone hardware data to Cellphone feature
data (in databases this would be called an "association
Why am I organizing the data in this fashion? My hope is that
this approach will facilitate queryability of the data. That
remains to be seen ...
Here's a sample query that I would like to perform:
"What features does the NOKIA 252 Cellphone have?"
If the data were in a database, such a query would be simple:
FROM features, cellphones, cellphone-features
WHERE features.id = cellphone-features.feature-id AND
cellphone-features.cellphone-id = cellphones.id AND
cellphones.brand = "NOKIA" AND
cellphone.model = "252"
I am thinking (hoping) that I can perform a similar type of
query using XQL. Here's what I tried (among many other attempts):
This XQL query doesn't work (it returns the empty set).
Below is sample data from my Cellphone XML document. Any thoughts
on how to structure the XQL query? /Roger
<model brand="NOKIA" name="252" technology="analog"
<battery type="nickel-cadmium">1100 mAh</battery>
<price currency="$US" with-contract="false">400</price>
<price currency="$US" with-contract="true">180</price>
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev