Page 1 of 1

What's the possible cause of DOTJ013E error when compiling a markdown in a ditamap?

Posted: Mon Sep 04, 2023 3:29 pm
by galanohan
image.png
I'm having this type of error when building a webhelp containing md and dita files.
image.png
For example, this document.
Anomaly_Detection_Engine.zip
I don't see any error of it, it follows the syntax of markdown but the error message said :


[DOTJ013E] Failed to parse the referenced file 'file:/D:/dita_gitlab/sandbox/dita/md/Anomaly_Detection_Engine.md'.: file:/D:/dita_gitlab/sandbox/dita/md/Anomaly_Detection_Engine.md Line 1:Content is not allowed in prolog.

but for line 1 of this document, it's the title of heading 1.

Is is caused by the encoding?

Thanks!

Re: What's the possible cause of DOTJ013E error when compiling a markdown in a ditamap?

Posted: Mon Sep 04, 2023 4:17 pm
by Radu
Hi,
Can you attach a sample which contains a small complete DITA project (Map + topics) exhibiting the problem? Just by creating a map and referencing the markdown file seems to work for me when publishing to HTML5 for example.
Regards,
Radu

Re: What's the possible cause of DOTJ013E error when compiling a markdown in a ditamap?

Posted: Tue Sep 05, 2023 4:47 am
by galanohan
Looks like the error was caused by the attribute format in <xref/> element in dita.
image.png
I set a xref to a md file but didn't specify the format of this md file in <xref/>.
After adding the attribute and value, no error was reported.

Thanks!

Re: What's the possible cause of DOTJ013E error when compiling a markdown in a ditamap?

Posted: Tue Sep 05, 2023 7:30 am
by Radu
Hi,
You are correct, the xref needs to have format=markdown.
Regards,
Radu