[erlang-questions] beginner: Generating HTML with ">" from Erlang

Richard Carlsson carlsson.richard@REDACTED
Thu Feb 13 15:31:12 CET 2014


On 2014-02-13 15:12 , Bengt Kleberg wrote:
> My problem is that Javascript in the HTML file look like this (when
> created by xmerl):
>
> if (i > 0) {
>
> and that does not run.

Out of curiosity, if it had been < instead, which of the following would 
work?

   if (i < 0) {

   if (i < 0) {

If it is the first case, there is presumably a very specific rule for 
this, which doesn't do full handling of XML escape sequences on the 
source code level (since > didn't work). Which seems moronic, but 
wouldn't surprise me...

If it's the second case, how is the script text really supposed to be 
handled by XML tools? As CDATA (then, how is it delimited?) or as normal 
XML text (and then how can the < be accepted by the parser, and why 
wasn't > converted to > before the Javascript parser got hold of the 
text)?

     /Richard




More information about the erlang-questions mailing list