Lists Home |
Date Index |
- From: Paul Prescod <email@example.com>
- To: XML List <firstname.lastname@example.org>
- Date: Tue, 30 Mar 1999 12:16:10 -0600
Oren Ben-Kiki wrote:
> I don't follow. You yourself have said:
> >The IDL for an XML QL should be something like:
> >NodeList XMLQuery( DOC doc, String query )
> Well, them, what other way is to return a list of XPointers then to store
> each in an "element"?
You don't need an element. You just need a nodelist. Look at the DOM's
brutally named "getElementsByTagName" method.
Also consider the XSL specification:
> A select pattern must match the production for SelectExpr; it returns
> the list of nodes that results from evaluating the SelectExpr with the
> current node as context; the nodes are in the list are in document order.
XPointer is interesting because it doesn't support either interpretation:
"The result of a spanning selection cannot generally be expressed as a
well-formed XML document, nor as a node or list of nodes from an element
If you are asking me what is the syntax for a nodelist then I'll say it
has no syntax. It is an abstraction like the record set returned by a
database. If you have to move the query result between machines then you
can choose an encoding (quite likely XML) but that's outside of the realm
of the query language itself -- it is akin to report writing.
If you aren't moving data between processes then you shouldn't be forced
to encode it in XML (even a DOM). This is just a general principle that
> This is assuming that you prefer the query engine to
> return a list of pointers as a result, which I don't. The one nice thing
> about this scheme is that you can add extra data per XPointer - a relevancy
> score, for example.
I'm not convinced that this is the domain of the query language, but even
if it is then you are asking for an annotated nodelist, not a DOM. If we
do decide to go ahead with annotated nodelists then we would have to add
that to the XML data model.
That still doesn't have anything to do with generating XML elements:
*unless the application wants to do so*.
> I stand corrected. I think you've phrased it perfectly above - the output
> should be defined in the terms of the XML data model.
And that model has a concept of nodelist -- this is the most appropriate
return value for query results.
Paul Prescod - ISOGEN Consulting Engineer speaking for only himself
"Perpetually obsolescing and thus losing all data and programs every 10
years (the current pattern) is no way to run an information economy or
a civilization." - Stewart Brand, founder of the Whole Earth Catalog
xml-dev: A list for W3C XML Developers. To post, mailto:email@example.com
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:firstname.lastname@example.org the following message;
To subscribe to the digests, mailto:email@example.com the following message;
List coordinator, Henry Rzepa (mailto:firstname.lastname@example.org)