Re: DITA XML to JSON conversion #JSON


Nicholas Mucks
 

We convert dita to json so that a ditamap structure can feed a python app. It’s a lot like creating a text output.

What’s your json data structure?


Take care,
- Nick

Sent from mobile

On Feb 24, 2020, at 12:15 PM, "ekimber@contrext.com" <ekimber@contrext.com> wrote:

Note that XSLT 3 (supported by recent Saxon versions, so including latest OT 2.x and 3.x versions) has features for reading and writing JSON, so if you know what the JSON should look like it shouldn't be too hard to generate it. There's also a generic JSON serialization option but it's unlikely it would provide satisfactory results due to the inherent difficulty in mapping from XML to JSON.

I think the larger challenge is probably knowing what the JSON should look like--that's going to be very specific to the consumer of the JSON.

Cheers,

Eliot
--
Eliot Kimber
http://contrext.com


On 2/24/20, 11:43 AM, "main@dita-users.groups.io on behalf of patrick.wright73@gmail.com" <main@dita-users.groups.io on behalf of patrick.wright73@gmail.com> wrote:

Is anyone converting DITA to JSON format? I've seen OT plugins to convert JSON to DITA topics, and Oxygen (and other) single-file converters for JSON to DITA. But I'm curious if there is either a bulk conversion tool available (for DITA->JSON) or a toolkit plugin to convert a map's worth of topics.

Thank you.
Pat







Join main@dita-users.groups.io to automatically receive all group messages.