On 19 Aug 2009, at 16:48, BenoitX wrote:
I need to generate an XDOC with a header that contains a link to a
javascript. So far, no problem.
However, the URL where the code is contains a "&"
<script type="text/javascript" charset="utf-8"
src="http://bit.ly/javascript-api.js?version=latest&login=statsvn&apiKey=R_2c362b417d0517c27876cbaca1bb68cc
"></script>
This causes the xdoc plugin to fail (not valid XML).
That's correct behaviour — you have to escape all ampersands in XML in
order for it to be well-formed.
If I replace this "&" by "&" the xdoc does not complain BUT I
end up
with & in the html generated and this means that the link does
not work
as planned...
It certainly should do. Which browser is interpreting the link
incorrectly?
I've tried to read as much a possible on xdoc format... and I tried:
1/ <escapeXml> : it fails
2/ <!CDATA[[ ... : the script is NOT included in the HTML at the
end...
How could I do this?
You can't. You have to escape the ampersand.
-Dom