Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

capabilities: add IVO ids in output formats to support TAPRegExt #153

Open
jontxu opened this issue Feb 2, 2024 · 3 comments
Open

capabilities: add IVO ids in output formats to support TAPRegExt #153

jontxu opened this issue Feb 2, 2024 · 3 comments
Assignees

Comments

@jontxu
Copy link

jontxu commented Feb 2, 2024

Hi, I was notified by @mbtaylor that the capabilities endpoint from our TAP service does not follow the TAPRegExt recommendation as it lacks the ivo-id attribute for the relevant output formats (outputFormat in the XML). This ID is used by some clients to interpret (for the time being) VOTable types, as shown on the recommendation: https://www.ivoa.net/documents/TAPRegExt/20120827/REC-TAPRegExt-1.0.html#outforms

Current output:

<outputFormat>
  <mime>application/x-votable+xml</mime>
  <alias>votable</alias>
</outputFormat>
<outputFormat>
  <mime>application/x-votable+xml;serialization=BINARY2</mime>
  <alias>votable/b2</alias>
</outputFormat>
<outputFormat>
  <mime>application/x-votable+xml;serialization=TABLEDATA</mime>
  <alias>votable/td</alias>
</outputFormat>

Expected (TapRegExt-supporting) output:

<outputFormat ivo-id="ivo://ivoa.net/std/TAPRegExt#output-votable-td">
  <mime>application/x-votable+xml</mime>
  <alias>votable</alias>
</outputFormat>
<outputFormat ivo-id="ivo://ivoa.net/std/TAPRegExt#output-votable-binary2">
  <mime>application/x-votable+xml;serialization=BINARY2</mime>
  <alias>votable/b2</alias>
</outputFormat>
<outputFormat ivo-id="ivo://ivoa.net/std/TAPRegExt#output-votable-td">
  <mime>application/x-votable+xml;serialization=TABLEDATA</mime>
  <alias>votable/td</alias>
</outputFormat>

Looking into the code, seems like its implementation is somewhat trivial, by adding support for a ivoId field in tap.formatter.OutputFormat (and the classes which implement it) and adding the attribute when getting the output formats when writing the capabilities in tap.resource.TAP.

@mbtaylor
Copy link
Contributor

mbtaylor commented Feb 2, 2024

To clarify, the existing behaviour is not non-compliant, since TAPRegExt only suggests rather than requires the ivo-id attributes as above, but it would be nicer if the VOLLT implementation did include them.

@jontxu jontxu changed the title capabilities: add IVO ids in output formats to comply with TAPRegExt capabilities: add IVO ids in output formats to support TAPRegExt Feb 2, 2024
@jontxu
Copy link
Author

jontxu commented Feb 2, 2024

Thanks for the clarification, I edited the title and comment accordingly.

@gmantele gmantele self-assigned this Feb 7, 2024
@gmantele
Copy link
Owner

gmantele commented Feb 7, 2024

Indeed, this attribute is optional. When I developed this part of VOLLT, I guess I did not know which IVO-ID to write in this attribute and whether it would be useful or not. It seems to be now useful and thanks to your example, I have a clear idea on the value to write for this attribute. Thanks to both of you for this feedback. It is indeed a trivial change to implement. I'll include that in the next stable release of VOLLT/TAP-Lib.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants