Fetch JSON from an API
Posted: Mon Mar 06, 2023 6:56 pm
I need to get a JSON file from API like this http://dme-intern.mozarteum.local/digit ... -info/4087
As far it seems that the extension would yield the needed result:
(cf. https://www.ibm.com/docs/en/datapower-g ... dpurl-open)
However, executing of this code
triggers a Saxon error "Unknown extension instruction".
I suppose the extension should be declared somewhere. Am I correct? How to do it in oXygen (25.0, build 2023013006)?
P.S. I've searched in the Oxygen documentation for "Saxon extension" and also Saxon documentation like this section:
https://www.saxonica.com/html/documenta ... nsibility/
but did not find what I need.
Regards,
Oleksii
As far it seems that the extension
Code: Select all
dp:url-open
(cf. https://www.ibm.com/docs/en/datapower-g ... dpurl-open)
However, executing of this code
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<stylesheet exclude-result-prefixes="xs xd dme functx dp" version="3.0"
xmlns:dp="http://www.datapower.com/extensions" extension-element-prefixes="dp"
xmlns="http://www.w3.org/1999/XSL/Transform" xmlns:dme="http://www.mozarteum.at/ns/dme"
xmlns:functx="http://www.functx.com" xmlns:map="http://www.w3.org/2005/xpath-functions/map"
xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl" xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xpath-default-namespace="http://www.music-encoding.org/ns/mei">
<template match="/">
<result-document href="out.txt">
<dp:url-open target="http://dme-intern.mozarteum.local/digital-editions/api/work-info/4087"
> </dp:url-open>
</result-document>
</template>
</stylesheet>
I suppose the extension should be declared somewhere. Am I correct? How to do it in oXygen (25.0, build 2023013006)?
P.S. I've searched in the Oxygen documentation for "Saxon extension" and also Saxon documentation like this section:
https://www.saxonica.com/html/documenta ... nsibility/
but did not find what I need.
Regards,
Oleksii