STC and XPath

Matthew Graham mjg at cacr.caltech.edu
Mon Jun 4 19:23:17 PDT 2007


Hi,

I'm trying to extract data from the STC component of a VOEvent packet 
using XPath (1.0) with the sample expression that we have always touted 
as being able to do this:

/voe:VOEvent/WhereWhen/ObsDataLocation/ObservationLocation/AstroCoords/Position2D/Value2/C1

but this gives me nothing. I've tried it both in a stylesheet with 
xsltproc (where the voe namespace is properly qualified) and Saxon, on 
the command line with xalan (using the stuff we shipped in the summer 
school software package) and with a couple of online XPath sandboxes - 
all to no avail. It fails with VOEvents that have been sent around and 
the sample VOEvent in the spec.

However, if I amend the XPath to:

/voe:VOEvent/*:WhereWhen/*:ObsDataLocation/*:ObservationLocation/*:AstroCoords/*:Position2D/*:Value2/*:C1 


then it all works. Now I thought that the whole point of using 
elementFormDefault="unqualified" in the schema was that it allowed us to 
use namespace-unaware XPath statements - clearly I'm missing something.

    Cheers,

    Matthew



More information about the voevent mailing list