[erlang-questions] beginner: Generating HTML with ">" from Erlang
Ivan Uemlianin
ivan@REDACTED
Thu Feb 13 16:00:09 CET 2014
Include an external js file into html like this:
<script type="text/javascript" src="path/to/file.js"></script>
Ivan
On 13/02/2014 14:54, Bengt Kleberg wrote:
> Yes, the Javascript could be in a separate file that I would generate.
>
> Is it possible to do some sort of "-include()" from the HTML?
>
>
> bengt
>
> On Thu, 2014-02-13 at 14:46 +0000, Ivan Uemlianin wrote:
>> Does all of the javascfript have to be generated dynamically from the
>> erlang? Or could you have a static javascript file for most or all of it?
>>
>> Ivan
>>
>>
>> On 13/02/2014 14:43, Bengt Kleberg wrote:
>>> The use-case is not supposed to include XML.
>>>
>>> My Erlang server creates a log file. A python script generates HTML from
>>> the log file. I now consider generating the HTML directly from Erlang
>>> since I have to call upon another person to fix the python script every
>>> time the log file format changes. Only the log file format changes, the
>>> neccessary contents are still present in the Erlang server.
>>>
>>> My previous method of HTML generation has been to use xmerl. If I do
>>> that now then the Javascript part of the HTML will not run.
>>>
>>>
>>> bengt
>>>
>>> On Thu, 2014-02-13 at 15:31 +0100, Richard Carlsson wrote:
>>>> 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
>>>>
>>>> _______________________________________________
>>>> erlang-questions mailing list
>>>> erlang-questions@REDACTED
>>>> http://erlang.org/mailman/listinfo/erlang-questions
>>>
>>> _______________________________________________
>>> erlang-questions mailing list
>>> erlang-questions@REDACTED
>>> http://erlang.org/mailman/listinfo/erlang-questions
>>>
>>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
--
============================================================
Ivan A. Uemlianin PhD
Llaisdy
Speech Technology Research and Development
ivan@REDACTED
www.llaisdy.com
llaisdy.wordpress.com
github.com/llaisdy
www.linkedin.com/in/ivanuemlianin
festina lente
============================================================
More information about the erlang-questions
mailing list