The magic string
jcm at head.cfa.harvard.edu
Thu May 25 10:39:10 PDT 2006
Alasdair - I don't know the VOEvent context details, but in general
you might have more than one STC coord sys in a document. I'd rather
<AstroCoords coord_system_xlink="ivo://STClib/CoordSys#UTC-FK5-GEO/" />
or something similar, i.e. AstroCoordSystem is in the library
and not in the document at all. There are probably XML reasons we
can't do this that Arnold has already explained, I didn't follow
the discussion in detail. As it stands the <AstroCoordSystem> element
is just there to provide a short alias
alias UTC-FK5-GEO = "ivo://STClib/CoordSys#UTC-FK5-GEO/"
but it isn't that short an alias! (in this sense, "banana" has some merit.)
The "repeated boilerplate" is specifying the namespace prefix, and
as such doesn't really offend me, although I concede it's not
100 percent elegant.
You are making three statements in Arnold's version of the magic string:
1) I'm going to be using a coord system called UTC-FK5-GEO
2) You can find its details in "ivo://STClib/CoordSys"
2b) In that file, it's also called UTC-FK5-GEO
3) Here's a coordinate set, and it's in the UTC-FK5-GEO system.
sorry, that's 4 statements...
1) and 3) are redundant only in this voevent case where you are
guaranteeing that there is one coordinate set and one coordinate
system in the document. Imagining documents where several coordinate
systems might be defined, and you have to say which one is being
used by this particular AstroCoords instance, is not a big stretch.
I think forcing this redundancy here so that you can use the
same convention in the slightly more complicated case is *more*
elegant in the bigger picture. Standardization is good.
2b) is redundant because we've agreed to use the same local name
and global name for the coordinate system. I agree this bit is
inelegant, and omitting the "id=" or the trailing "#UTC-FK5-GEO"
would be nicer, but this one may be constrained by the fact that
we are using XML and the id and xlink:href attributes have specific
meanings that we can't change.
So I'll mostly defend Arnold in this one, unless there is some way
we can make my first suggestion work. Perhaps
Arnold can comment on it (I know he's on travel right now.)
More information about the dm