⚲
Project
Profile
Help
Tour this page
Frequent Planio Questions
Learning Resources
Sign in
Register
Switch Planio account
Open in Planio App
Share current page
Search
:
Projects
All Projects
Help
Tour this page
Frequent Planio Questions
Learning Resources
Sign in
Register
Switch Planio account
Open in Planio App
Share current page
Saxon
»
SaxonJS
Overview
Roadmap
Issues
Blog
Documents
Forums
Files
Download (587 Bytes)
Bug #6132
» testDocumentPool1.js
direct use of documentPool with SaxonJS.transform works -
Martin Honnen
, 2023-07-18 18:51
const
path
=
require
(
'
path
'
);
const
url
=
require
(
'
url
'
);
const
SaxonJS
=
require
(
'
saxon-js
'
);
var
xmlResource1
=
SaxonJS
.
getResource
({
'
type
'
:
'
xml
'
,
'
text
'
:
'
<root>foo</root>
'
});
var
doc1Uri
=
'
doc1.xml
'
;
var
docPool
=
{};
xmlResource1
.
then
(
doc
=>
{
docPool
[
url
.
pathToFileURL
(
path
.
resolve
(
'
.
'
,
doc1Uri
))]
=
doc
;
})
.
then
(()
=>
{
//console.log(docPool);
SaxonJS
.
transform
({
documentPool
:
docPool
,
stylesheetLocation
:
'
documentPoolTest1.xsl.sef.json
'
},
'
async
'
).
then
(
result
=>
{
console
.
log
(
SaxonJS
.
serialize
(
result
.
principalResult
));
});
});
« Previous
1
…
3
4
5
6
Next »
(5-5/6)
Loading...