Is XPATH the way to search a data model?

David Berry dsb at ast.man.ac.uk
Tue May 18 03:28:45 PDT 2004


Guy,

> > 2) Can it have astronomical knowledge built into it, or is it just a
> > sort of dumb regexp system for structured text?
>
> It's the dumb one. But, as i said above, it's regexp for a data graph, not for
> text; this makes it more powerful.  If we want to use XPath for astronomical
> inference, then we have to do that via the details of the data model.

Are you saying that it *is* possible to somehow supplement XPath with "details
of the data model" so that it can do astronomical inference? Or are you
saying that astronomical inferencing is nothing to do with XPath?


> > What I mean is, if for
> > instance you searched a StandardQuantity for a Frame (Frame "A") holding
> > the 3 axes:
> >
> > (heliocentric radio velocity, ICRS RA, ICRS Dec)
> >
> > could XPATH do anything sensible if the StdQ did not contain this exact
> > Frame, but instead contained a Frame (Frame "B") containing the 3 axes:
> >
> > (Galactic longitude, geocentric frequency, galactic latitude)
> >
> > ?? Obviously Frame A and Frame B are not identical, but given a
> > position in Frame B it is possible to convert it into Frame A without
> > needing any extra information over and above that stored in the
> > Frames. What we want is a search system which has enough astronomical
> > knowledge to be able to do this. What you want from your search system is
> > for it to say "no I cannot find Frame A but Frame B looks very similar and
> > I can give you a Mapping which will convert positions in Frame B into the
> > corresponding positions in Frame A". Such recoverable mis-matches between
> > what the client wants and what the server can provide is bound to happen
> > over and over again in the VO. So can XPATH be used to do this sort of
> > searching? If not, then should we not drop XPATH in favour of building
> > customised intelligent searching into our code which searches the data
> > model itself rather than just some specific data format?
>
> If Frame A and Frame B are of types that share some common ancestor in the
> inheritence scheme, then I _think_ that XPath can be set to search for that
> ancestor.  I.e., you could ask it to find a StandardQuantity containing a
> CoordinateFrame, say. Or you could pattern-match the UCDs looking for "POS.".
>
> XPath does searching; it doesn't do transformation.  See XSLT for
> transformation, and note that XSLT is built around XPath: it looks for
> patterns using XPath and applies transformations to them. In principle, we
> could build an astronomical search-and-transform thingy using XSLT scripts.

OK, so XSLT can in principle be told how to convert between FK4 B1968.2
(RA,Dec) and FK5 J2003.2 (RA,Dec)?  Presumably this conversion would not
be done by XSLT itself but by some extrenal transformation code. But are
you even saying that XSLT could infer the *need* to convert between
these two systems?

David



More information about the dm mailing list