jed-users mailing list

[2002 Date Index] [2002 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: little problem with xmlmode


the new version fixed it.

Thanks a lot.


--On Mittwoch, April 17, 2002 18:17:14 +0300 Juho Snellman <jsnell@xxxxxx> wrote:

On Wed, Apr 17, 2002 at 10:55:21AM +0200, Joachim Schmitz wrote:
When the javascript contains a "<" like here:

function changeImages() {
if (document.images && (preloadFlag == true)) {
for (var i=0; i < changeImages.arguments.length; i+=2) {
                 document[changeImages.arguments[i]].src =
changeImages.arguments[i+1];
                 }
                 }
                 }


the indentation gets confused, is there anyway to avoid this ?

Ah, there's a bug involved. '<' followed by whitespace shouldn't
really be considered the start of an element. Does the new version
at <http://www.cs.helsinki.fi/u/jesnellm/software/files/xmlmode.sl>
work better?

If separating the '<' or '>' from the surrounding text is for some
reason impossible, you could use a CDATA segment:

<html>

<![CDATA[
  function changeImages() {
  if (document.images && (preloadFlag == true)) {
  for (var i=0; i < changeImages.arguments.length; i+=2) {
  ]]>

  <foo>
    bar
  </foo>
</html>

--
Juho Snellman
"C:stä on kehitetty Massachusettsin teknillisessä korkeakoulussa kieli
 nimeltä BCPL."



Mit freundlichen Grüßen                              Joachim Schmitz
--------------------------------------------------------------------
AixtraWare Ingenieurbüro für Internetanwendungen
Hüsgenstr. 33a, D-52457 Aldenhoven
Telefon: +49-2464-8851, FAX: +49-2464-905163
--------------------------------------------------------------------
Key fingerprint = DA10 CC82 62F8 1DBB 39A1  1EDC 725B 3317 A8D7 C3A6
Keyserver: http://germany.keyserver.net/en/

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2002 date index] [2002 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]