Project

Profile

Help

Feature #4806

closed

Transforming JSON input

Added by Michael Kay about 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Command line
Sprint/Milestone:
-
Start date:
2020-10-25
Due date:
% Done:

100%

Estimated time:
Applies to JS Branch:
2
Fix Committed on JS Branch:
2
Fixed in JS Release:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-

Description

I propose to implement a -json option on the command line, as recently done for the Java product; this allows the principal input of the transformation to be JSON rather than XML.

To achieve this I propose to extend the SaxonJS.transform() API so that the options sourceLocation, sourceFileName, and sourceText can be JSON rather than XML; to indicate this we add another option sourceMediaType whose values can be application/xml or applicationi/jsonfor JSON, defaulting toapplication/xml`.

Note: it appears that the SaxonJS.transform() API supports a globalContextItem option that is missing from the documentation.

Please register to edit this issue

Also available in: Atom PDF Tracking page