ietf-tools / bibxml-service

Django-based Web service implementing IETF BibXML APIs
https://bib.ietf.org
BSD 3-Clause "New" or "Revised" License
17 stars 19 forks source link

Anchor override from GET query not working for xml2rfc-style paths #276

Closed ronaldtse closed 2 years ago

ronaldtse commented 2 years ago

Description

From @rjsparks (https://github.com/ietf-ribose/bibxml-project/issues/24):

This is an xml2rfc.tools.ietf.org behavior that we missed, and a few things are using it.

Note that https://xml2rfc.tools.ietf.org/public/rfc/bibxml-doi/reference.DOI.10.1145/2975159.xml?anchor=JUPITER returns bibxml with the anchor set to "JUPITER".

How difficult would it be to add that behavior to the current bibxml implementation?

Code of Conduct

ronaldtse commented 2 years ago

Originally from https://github.com/ietf-ribose/bibxml-project/issues/24#issuecomment-1222026801

@rjsparks sorry for the delay here (probably should go into the bibxml-service repo), I missed this.

I believe we already support specifying a custom anchor, but not sure about in DOI. Ping @strogonoff .

ronaldtse commented 2 years ago

Originally from @strogonoff (https://github.com/ietf-ribose/bibxml-project/issues/24#issuecomment-1222029934)

  1. This is supported for all API endpoints that return XML, if not this must be a bug! Anchor parameter is documented here: https://bib.ietf.org/api/v1/#operation/getBibItemByDocId
  2. But, this appears to not work for xml2rfc paths.
strogonoff commented 2 years ago

It was supposed to be working but it was working only for some documents.

kesara commented 2 years ago

Fix deployed to https://bib.ietf.org

curl https://bib.ietf.org/public/rfc/bibxml4/reference.W3C.REC-xml-stylesheet-20101028.xml?anchor=foobar
<reference anchor="foobar" target="https://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/">
...

curl https://bib.ietf.org/public/rfc/bibxml-rfcsubseries/reference.STD.0080.xml?anchor=foobar
<referencegroup anchor="foobar" target="https://www.rfc-editor.org/info/std80">
...

curl https://bib.ietf.org/public/rfc/bibxml-doi/reference.DOI.10.1145/2975159.xml?anchor=FooBar
<reference anchor="FooBar" target="http://dx.doi.org/10.1145/2975159">
...