Closed MennerM closed 2 years ago
The diagram extension isn't really involved in any of this. It invokes UMLet as follows: java -jar <umlet.jar> -action=convert -format=<output format> -filename=<input filename> -output=<output filename>
. For some reason it doesn't like your XML preamble; no idea why.
Could you attach one of your problematic uxf files? That should allow me to reproduce this problem locally and then I might be able to tell you more.
If I use asciidoc-kroki to get a preview in eclipse from my asciidoc, everything works fine.
I made a reproduction setup with the following asciidoc document and that works fine for me; must be some environmental difference. Is your system configured with a non-utf8 locale perhaps?
= Foo
:umlet: /Users/pepijn/Downloads/Umlet/umlet.sh
== Bar
umlet::test.uxf[]
If I take your example it also works at my site. My system is configured with utf8.
The difference is that I don't use :umlet: /Users/pepijn/Downloads/Umlet/umlet.sh
I have attached my asciidoc file for comparison:
= Overview
tbd
== Test
test
[umlet, "diagrams/test", png]
....
include::diagrams/test.uxf[]
....
Aha that explains it. Drop the leading empty line before include::
and it should work fine. The execution model to keep in mind is that the extension will read the block contents as
include::diagrams/test.uxf[]
Then it will apply macro substitution on that so you get something like
<?xml ... ?>
<diagram program="umlet" version="14.3.0">
...
</diagram>
That then gets written out as such to a temp file, including the leading empty line, and that temp file is passed on to umlet. Umlet will then try to parse an XML file with a leading empty line before the XML prolog and that's causing the parsing error.
Tanks. It is so simple when you know it
I have created a diagram with umlet and include this in my adoc file:
the command
asciidoctor -r asciidoctor-diagram overview.adoc
don't works. I get the following error:To fix this I have to delete the first line (
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
) of the uxf-File.Is there another way? I don't want to edit every uxf file.