Skip to main content
bhaskarc1289447
Level 3
Jun 14, 2019 11:39 AM UTC
Solved

Getting error on Creating an Open Office document

I am using the Out-of-the-box code to  create an open office document. The code is:

var strXslt = "nl:dbdToOdt.xsl"

var strTemplate = installDirectory("datakit/nl/dbd-template.odt")

var strOutputFile = "/tmp/database-description.odt"

var sql = xtk.sqlSchema.create()

sql.Generate()

var strDbXml = db = sql.toXML().toXMLString()

var strOdt = applyXsl(strXslt, strDbXml)

strOdt = strOdt.replace(/^<\?xml .*\?>\r?\n/, '<?xml version="1.0" encoding="UTF-8"?>\r\n')

var mbContent = new MemoryBuffer

mbContent.fromString(strOdt, "utf-8")

var zip = new ZipFile(strTemplate)

zip.open()

zip.setEntry("content.xml", mbContent)

zip.save(strOutputFile)

But I am getting the error:

SCR-160012 JavaScript: error while evaluating script 'WKF6/js'.

Element '0' unknown (see definition of schema 'Visitor delivery logs (nms:broadLogVisitor)').

Element '0' unknown (see definition of schema 'Recipient delivery logs (nms:broadLogRcp)').

Element '0' unknown (see definition of schema 'Visitor delivery logs (nms:broadLogVisitor)').

Element '0' unknown (see definition of schema 'Recipient delivery logs (nms:broadLogRcp)').

Can you please guide me and point out where I am making the mistake

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Jonathon_wodnicki
Jonathon_wodnickiAccepted solution
Community Advisor
Jun 14, 2019 7:24 PM UTC

Hi,

If you're following this guide, that's the expected behavior:

Thanks,

-Jon

4 replies

Jonathon_wodnicki
Community Advisor
Jonathon_wodnickiCommunity AdvisorAccepted solution
Community Advisor
Jun 14, 2019 7:24 PM UTC

Hi,

If you're following this guide, that's the expected behavior:

Thanks,

-Jon

Translate
bhaskarc1289447
Level 3
Jun 17, 2019 6:46 AM UTC

Dear Jon,

But it shows the below error and my javascript is not working because of it

Regards

Bhaskar

Translate
pablo_rosero1
Level 9
Jun 21, 2019 5:53 PM UTC

Any ideas, wodnicki​?

Thank you for your contribution so far!

Translate
Jonathon_wodnicki
Community Advisor
Community Advisor
Jun 21, 2019 6:32 PM UTC

In the doc they're running it from the shell, maybe it's not intended for js activity.

Try using an nlserver module activity with the command instead ?

Translate