Page 1 of 1

Integrating external data into an XML project

Posted: Wed Dec 03, 2025 1:50 pm
by Mileey
Hi,

I'm working on a technical guide in DITA with Oxygen, and I'd like to automatically include information from an external service for mobile users, such as activation or network coverage data for an eSIM. Has anyone ever tried to retrieve this type of JSON or XML data to generate a table in PDF or WebHelp without breaking validation?

Re: Integrating external data into an XML project

Posted: Wed Dec 03, 2025 3:33 pm
by Radu
Hi,
I created this dita-json open source DITA OT plugin some time ago, it's available here:
https://github.com/oxygenxml/dita-json

Basically as per its samples, one refers in the DITA Map to a JSON file with format="json":

Code: Select all

<keydef href="ui-strings.json" format="json" keys="uiStrings"/>
The JSON file gets automatically converted at publishing time first to XML and then an XSLT is applied to it so that it gets converted to a DITA XML topic which has phrases with IDs and the values from the JSON file:

https://github.com/oxygenxml/dita-json/ ... o-dita.xsl

Then from another DITA XML topic one can use conkeyref to refer to content from the JSON file.

Regards,
Radu