Hi,
I would like to print a comment containing only a dash (i.e., <!----->) , but this is not allowed. I tried to use "-" instead of - in comment { "-” }, but such a string is converted to ‘-', so the error is still there. How can I print <!-----> ? Should I simply use <----->? In any case, I see that data(<!----->) does not convert - into -: how can I get the conversion? Thanks.
Best, Giuseppe
On Fri, 2020-06-12 at 03:46 +0200, Giuseppe G. A. Celano wrote:
Hi,
I would like to print a comment containing only a dash (i.e., <!-----
) , but this is not allowed.
This is not permitted in XML; it's a syntax error. A - in a comment must be followed by a character that is not a hyphen. You can do, <!--- --> or <!-- - --> but not <!----->
There are no tricks or workarounds, it's illegal.
Liam
https://www.w3.org/TR/REC-xml/#sec-comments
basex-talk@mailman.uni-konstanz.de