The HTTP Query Method

https://news.ycombinator.com/rss Hits: 18
Summary

The request below uses XSLT to extract errata information summarized per year and the defined errata types.露 QUERY /errata.json HTTP/1.1 Host: example.org Content-Type: application/xslt+xml Accept: application/xml, text/csv <transform xmlns="http://www.w3.org/1999/XSL/Transform" xmlns:j="http://www.w3.org/2005/xpath-functions" version="3.0"> <output method="text"/> <param name="input"/> <variable name="json" select="json-to-xml(unparsed-text($input))"/> <variable name="sc">errata_status_code</variable> <variable name="sd">submit_date</variable> <template match="/"> <text>year, total, rejected, verified, hdu, reported</text> <text>&#10;</text> <variable name="en" select="$json//j:map"/> <for-each-group select="$en" group-by="substring-before(j:string[@key=$sd],'-')"> <sort select="current-grouping-key()"/> <variable name="year" select="current-grouping-key()"/> <variable name="errata" select= "$en[$year=substring-before(j:string[@key=$sd],'-')]"/> <value-of select="concat( $year, ', ', count($errata), ', ', count($errata['Rejected'=j:string[@key=$sc]]), ', ', count($errata['Verified'=j:string[@key=$sc]]), ', ', count( $errata['Held for Document Update'=j:string[@key=$sc]]), ', ', count($errata['Reported'=j:string[@key=$sc]]), '&#10;')"/> </for-each-group> </template> </transform> 露 HTTP/1.1 200 OK Content-Type: text/csv Accept-Query: "application/jsonpath", "application/xslt+xml" Date: Wed, 19 Feb 2025, 17:10:01 GMT year, total, rejected, verified, hdu, reported 2000, 14, 0, 14, 0, 0 2001, 72, 1, 70, 1, 0 2002, 124, 8, 104, 12, 0 2003, 63, 0, 61, 2, 0 2004, 89, 1, 83, 5, 0 2005, 156, 10, 96, 50, 0 2006, 444, 54, 176, 214, 0 2007, 429, 48, 188, 193, 0 2008, 423, 52, 165, 206, 0 2009, 331, 39, 148, 144, 0 2010, 538, 80, 232, 222, 4 2011, 367, 47, 170, 150, 0 2012, 348, 54, 149, 145, 0 2013, 341, 61, 169, 106, 5 2014, 342, 73, 180, 72, 17 2015, 343, 79, 145, 89, 30 2016, 295, 46, 122, 82, 45 2017, 303, 46, 120, 84, 53 2018, 350, 61, 118, 98, 73 2019, 335, 47, 131, 94, 6...

First seen: 2025-11-30 01:45

Last seen: 2025-11-30 18:47