Project

Profile

Help

Support #6500

closed

output.principalResult always NULL when using transform

Added by Moreno Andreo 4 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2024-08-09
Due date:
% Done:

0%

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

Description

I need to get an HTML document from an XML file and its XSL. I'm running on node.js 18.16, Windows 11

Here's the code:

const xmlString = fs.readFileSync('path/to/xml'); const xslString = fs.readFileSync('path/to/xsl');

const transformationOptions = { styleSheetText: xslString, sourceType: 'xml', destination: 'serialized', logLevel: 10 } SaxonJS.transform(transformationOptions, "async") .then(output=>{ console.log(output.principalResult); }) .catch(err => { console.error(err) }

And here's the output (running on command line, node transform.js) Asynchronous transform with options: stylesheetText={"N":"package", "version":"30",(string, sourceType=xml(string), sourceText=<xfa:datasets xmlns xfa="http:(string), destination=raw(string), logLevel=10(string), SEF generated by SaxonJS 2.6 at 2024-08-08T14:38:31.398+02:00 null

As you can see there's no error, but while the other output properties are filled, this one remains null.

Am I missing something? Thanks in advance Moreno.


Files

CDAit_v5.xsl (85.9 KB) CDAit_v5.xsl Moreno Andreo, 2024-08-09 15:24
CDAit.xsl (85.9 KB) CDAit.xsl Moreno Andreo, 2024-08-09 15:26
fullCDA2.xml (99 KB) fullCDA2.xml Moreno Andreo, 2024-08-12 11:53
cda2.xml (198 KB) cda2.xml Moreno Andreo, 2024-08-12 13:10
cda2.xml (198 KB) cda2.xml Moreno Andreo, 2024-08-12 13:35

Please register to edit this issue

Also available in: Atom PDF Tracking page