You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment I've written code in TroveProxy to fix these broken URLs, and it seems to me that the Trove API actually could incorporate this same fix, so I'd like to be able to move this fix "upstream" to Trove, so that other people who aren't using TroveProxy don't experience these broken links.
The XML response includes <records> elements with next attributes whose values are URLs which include a single category parameter whose value is a list of category names, separated by a (URL-encoded) comma. If I replace that category parameter with one whose value is taken from the code attribute of the parent (i.e. <category>) element of the <records> element, then the resulting URL does work.
At the moment I've written code in
TroveProxy
to fix these broken URLs, and it seems to me that the Trove API actually could incorporate this same fix, so I'd like to be able to move this fix "upstream" to Trove, so that other people who aren't usingTroveProxy
don't experience these broken links.The XML response includes
<records>
elements withnext
attributes whose values are URLs which include a singlecategory
parameter whose value is a list of category names, separated by a (URL-encoded) comma. If I replace thatcategory
parameter with one whose value is taken from thecode
attribute of the parent (i.e.<category>
) element of the<records>
element, then the resulting URL does work.e.g. take the following query URL:
https://api.trove.nla.gov.au/v3/result?category=book&category=newspaper&q=water%20dragon&s=*&n=1&bulkHarvest=true
The result looks like this:
Those "next" URLs are broken, but if I change them like so, they do appear to work correctly:
The code I'm using to fix these broken URLs is here:
TroveProxy/src/xslt/fix-trove-response.xsl
Line 4 in 0778f71
TroveProxy/src/xslt/fix-trove-response.xsl
Lines 13 to 23 in 0778f71
The text was updated successfully, but these errors were encountered: