XML query language

Mark Birbeck Mark.Birbeck at iedigital.net
Wed Mar 31 10:40:54 BST 1999

Paul Prescod wrote:
> And that model has a concept of nodelist -- this is the most 
> appropriate return value for query results.

What do you mean by nodelist? Does it take into account that result
nodes may be returned from different parts of the tree, or even at
different depths? It would be quite inefficient to encode the entire
path of each node and just list each result.

We use a variation on the fragment spec that allows both of these
conditions to be met, for example:

<p:package xmlns:p="http://www.w3.org/XML/Package/1.0">
    <f:fcs xmlns:f="http://www.w3.org/XML/Fragment/1.0"
            <f:fragbody IDREF="#1"/>
            <f:fragbody IDREF="#2"/>
    <p:page ID="1">
    <p:page ID="2">

[Note that the ID/IDREF part is not in the fragment spec. Only one
fragbody/page pair is allowed.]

I think the useful things about the fragment spec are:
- the initial query is encoded in the container of the results
- you get the context of your results set. An application could now
  these results - say add a paragraph of text - and have enough info to
  the work
- nodes could be returned from anywhere in the hierarchy
- a remote application could keep its own DOM model of the hierarchy,
  only request nodes it needs as and when it needs them

In fact, we love it so much that we use it for everything that is
returned from our server! Even one article is returned as a fragment.

Interested to know what people think of this approach.



Mark Birbeck
Managing Director
Intra Extra Digital Ltd.
39 Whitfield Street
w: http://www.iedigital.net/
t: 0171 681 4135
e: Mark.Birbeck at iedigital.net

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;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)

More information about the Xml-dev mailing list