4 ms·
doesn't seem to work great with https://ap-playerservices.streamtheworld.com/api/livestream?station=NOVA_919&version=1.9 so xqilla and learning xlst et al
by its-summertime 4y ago
doesn't seem to work great with
https://ap-playerservices.streamtheworld.com/api/livestream?station=NOVA_919&version=1.9
so xqilla and learning xlst et al still seems like my to-go for complex documents
- manbart 4y agoHadn’t heard of XQilla, but looks like it’s limited to XPath 2. You should try an XPath 3 based implementation. XQuery 3.1 has some nice features not found in XPath 2 implementations e.g. native JSON support, the arrow operator (piping), group by clause in FWLORs. XSLT 3.0 has some nice new stuff too, but I use that less
- its-summertime 4y agoI would switch but, finding a simple binary that does what I want (input -> complex query -> output) is so frustrating. Everything is a framework or library. Thankfully XQilla has its own json support which was all I needed so far
- alecthomas 4y agoWorks fine for me, what doesn't work? $ curl -fsSL 'https://ap-playerservices.streamtheworld.com/api/livestream?station=NOVA_919&version=1.9' | xq -x //transport http hls hlsts http http hls hlsts http hls hlsts
- its-summertime 4y agoit works if you need to not use the structured nature of the document for $mp in /ls:live_stream_config/ls:mountpoints/ls:mountpoint for $server in $mp/ls:servers/ls:server return { concat( "https://", $server/ls:ip, "/", $mp/ls:mount, ".", local:codec-to-ext($mp/ls:media-format/ls:audio/@codec) ) } is the core of my xqilla work, its something I could replicate in jq, I don't think I could replicate it in xq however